Commit e0f1eb62 authored by sherlock's avatar sherlock

glBalance export

parent 19fc7c4a
...@@ -156,7 +156,7 @@ public class InputInvoiceImportController { ...@@ -156,7 +156,7 @@ public class InputInvoiceImportController {
inputInvoiceDetailExportDto.setAmount(inputInvoiceDetail.getJE() != null ? new BigDecimal(inputInvoiceDetail.getJE().replace(",","")) : BigDecimal.ZERO); inputInvoiceDetailExportDto.setAmount(inputInvoiceDetail.getJE() != null ? new BigDecimal(inputInvoiceDetail.getJE().replace(",","")) : BigDecimal.ZERO);
inputInvoiceDetailExportDto.setInvoiceCode(inputInvoiceDetail.getFPDM()); inputInvoiceDetailExportDto.setInvoiceCode(inputInvoiceDetail.getFPDM());
inputInvoiceDetailExportDto.setInvoiceNumber(inputInvoiceDetail.getFPHM()); 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.setProductionName(inputInvoiceDetail.getSPMC());
inputInvoiceDetailExportDto.setTaxAmount(inputInvoiceDetail.getSE() != null ? new BigDecimal(inputInvoiceDetail.getSE().replace(",","")) : BigDecimal.ZERO); inputInvoiceDetailExportDto.setTaxAmount(inputInvoiceDetail.getSE() != null ? new BigDecimal(inputInvoiceDetail.getSE().replace(",","")) : BigDecimal.ZERO);
inputInvoiceDetailExportDto.setTaxRate(inputInvoiceDetail.getSLV()); inputInvoiceDetailExportDto.setTaxRate(inputInvoiceDetail.getSLV());
......
...@@ -7,6 +7,13 @@ ...@@ -7,6 +7,13 @@
$scope.endDate = new Date($scope.project.year, 11, 31); $scope.endDate = new Date($scope.project.year, 11, 31);
$scope.dateFormat = $translate.instant('dateFormat4YearMonthDay'); $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 minDate = [1, $scope.project.year];
var maxDate = [12, $scope.project.year]; var maxDate = [12, $scope.project.year];
...@@ -116,7 +123,7 @@ ...@@ -116,7 +123,7 @@
//************ EXCEL EXPORT FUNCTION ***************/ //************ EXCEL EXPORT FUNCTION ***************/
$scope.$on('ngRepeatFinished', function (ngRepeatFinishedEvent) { $scope.$on('ngRepeatFinished', function (ngRepeatFinishedEvent) {
if ($scope.isToPrint) if ($scope.isToPrint)
export_table_to_excel('exportTable', 'GL', 'xlsx', ''); export_table_to_excel('exportTable', '试算平衡表', 'xlsx', '');
$scope.isToPrint = false; $scope.isToPrint = false;
}); });
...@@ -149,7 +156,20 @@ ...@@ -149,7 +156,20 @@
if (isExportOnly !== null && isExportOnly) { if (isExportOnly !== null && isExportOnly) {
$scope.exportDataList = newTree; $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 { else {
$scope.gridOptions.data = newTree; $scope.gridOptions.data = newTree;
......
...@@ -108,6 +108,16 @@ ...@@ -108,6 +108,16 @@
<td>{{exportData.endDebitBal}}</td> <td>{{exportData.endDebitBal}}</td>
<td>{{exportData.endCreditBal}}</td> <td>{{exportData.endCreditBal}}</td>
</tr> </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> </table>
</div> </div>
<!--For Export ONLY--> <!--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