Commit e0f1eb62 authored by sherlock's avatar sherlock

glBalance export

parent 19fc7c4a
......@@ -156,7 +156,7 @@ public class InputInvoiceImportController {
inputInvoiceDetailExportDto.setAmount(inputInvoiceDetail.getJE() != null ? new BigDecimal(inputInvoiceDetail.getJE().replace(",","")) : BigDecimal.ZERO);
inputInvoiceDetailExportDto.setInvoiceCode(inputInvoiceDetail.getFPDM());
inputInvoiceDetailExportDto.setInvoiceNumber(inputInvoiceDetail.getFPHM());
inputInvoiceDetailExportDto.setPeriodId(Integer.parseInt(item.getRZSJ().substring(5, 7)));
inputInvoiceDetailExportDto.setPeriodId(Integer.parseInt(item.getRZSQ().substring(4, 6)));
inputInvoiceDetailExportDto.setProductionName(inputInvoiceDetail.getSPMC());
inputInvoiceDetailExportDto.setTaxAmount(inputInvoiceDetail.getSE() != null ? new BigDecimal(inputInvoiceDetail.getSE().replace(",","")) : BigDecimal.ZERO);
inputInvoiceDetailExportDto.setTaxRate(inputInvoiceDetail.getSLV());
......
......@@ -6,8 +6,15 @@
$scope.startDate = new Date($scope.project.year, 0, 1);
$scope.endDate = new Date($scope.project.year, 11, 31);
$scope.dateFormat = $translate.instant('dateFormat4YearMonthDay');
$scope.isReadOnly = false;
$scope.isReadOnly = false;
$scope.totalBegDebitBal = 0;
$scope.totalBegCreditBal = 0;
$scope.totalDebitBal = 0;
$scope.totalCreditBal= 0;
$scope.totalEndDebitBal = 0;
$scope.totalEndCreditBal= 0;
var minDate = [1, $scope.project.year];
var maxDate = [12, $scope.project.year];
var setDate = [
......@@ -116,7 +123,7 @@
//************ EXCEL EXPORT FUNCTION ***************/
$scope.$on('ngRepeatFinished', function (ngRepeatFinishedEvent) {
if ($scope.isToPrint)
export_table_to_excel('exportTable', 'GL', 'xlsx', '');
export_table_to_excel('exportTable', '试算平衡表', 'xlsx', '');
$scope.isToPrint = false;
});
......@@ -149,7 +156,20 @@
if (isExportOnly !== null && isExportOnly) {
$scope.exportDataList = newTree;
_.each($scope.exportDataList, function(exportData){
if(exportData.begDebitBal && parseFloat(exportData.begDebitBal.replace(/,/g, "")).toString() != "NaN")
$scope.totalBegDebitBal += parseFloat(exportData.begDebitBal.replace(/,/g, ""));
if(exportData.begCreditBal && parseFloat(exportData.begCreditBal.replace(/,/g, "")).toString() != "NaN")
$scope.totalBegCreditBal += parseFloat(exportData.begCreditBal.replace(/,/g, ""));
if(exportData.debitBal && parseFloat(exportData.debitBal.replace(/,/g, "")).toString() != "NaN")
$scope.totalDebitBal += parseFloat(exportData.debitBal.replace(/,/g, ""));
if(exportData.creditBal && parseFloat(exportData.creditBal.replace(/,/g, "")).toString() != "NaN")
$scope.totalCreditBal += parseFloat(exportData.creditBal.replace(/,/g, ""));
if(exportData.endDebitBal && parseFloat(exportData.endDebitBal.replace(/,/g, "")).toString() != "NaN")
$scope.totalEndDebitBal += parseFloat(exportData.endDebitBal.replace(/,/g, ""));
if(exportData.endCreditBal && parseFloat(exportData.endCreditBal.replace(/,/g, "")).toString() != "NaN")
$scope.totalEndCreditBal += parseFloat(exportData.endCreditBal.replace(/,/g, ""));
})
}
else {
$scope.gridOptions.data = newTree;
......
......@@ -108,6 +108,16 @@
<td>{{exportData.endDebitBal}}</td>
<td>{{exportData.endCreditBal}}</td>
</tr>
<tr>
<td></td>
<td></td>
<td>{{totalBegDebitBal}}</td>
<td>{{totalBegCreditBal}}</td>
<td>{{totalDebitBal}}</td>
<td>{{totalCreditBal}}</td>
<td>{{totalEndDebitBal}}</td>
<td>{{totalEndCreditBal}}</td>
</tr>
</table>
</div>
<!--For Export ONLY-->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment