Commit 17b8b48c authored by sherlock's avatar sherlock

dffs\jffs\gl export number format

parent b8504a11
......@@ -55,7 +55,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
year = year + yearOffset;
List<ReportCellDataSourceDto> dataSource = Lists.newArrayList();
if(type == 0){
if(type == 1){
EnterpriseAccountSetOrgExample example = new EnterpriseAccountSetOrgExample();
example.createCriteria().andEffectiveDateLessThanOrEqualTo(DateUtils.getNow()).andExpiredDateGreaterThanOrEqualTo(DateUtils.getNow()).andOrganizationIdEqualTo(orgId);
List<EnterpriseAccountSetOrg> enterpriseAccountSetOrgs = SpringContextUtil.enterpriseAccountSetOrgMapper.selectByExample(example);
......@@ -76,7 +76,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
saveFormulaBlock(period, ec, formulaExpression, new BigDecimal(result), dataSoureId, formulaContext.getProjectId());
return new NumberEval(result);
} else if(type == 1){
} else if(type == 0){
double result = count(code, dataSource, period, year);
Long dataSoureId = saveDataSource(ec, Collections.singletonList(dataSource),
......
......@@ -51,7 +51,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
year = year + yearOffset;
List<ReportCellDataSourceDto> dataSource = Lists.newArrayList();
if(type == 0){
if(type == 1){
EnterpriseAccountSetOrgExample example = new EnterpriseAccountSetOrgExample();
example.createCriteria().andEffectiveDateLessThanOrEqualTo(DateUtils.getNow()).andExpiredDateGreaterThanOrEqualTo(DateUtils.getNow()).andOrganizationIdEqualTo(orgId);
List<EnterpriseAccountSetOrg> enterpriseAccountSetOrgs = SpringContextUtil.enterpriseAccountSetOrgMapper.selectByExample(example);
......@@ -72,7 +72,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
saveFormulaBlock(period, ec, formulaExpression, new BigDecimal(result), dataSoureId, formulaContext.getProjectId());
return new NumberEval(result);
} else if(type == 1){
} else if(type == 0){
double result = count(code, dataSource, period, year);
Long dataSoureId = saveDataSource(ec, Collections.singletonList(dataSource),
......
......@@ -157,8 +157,10 @@
if (isExportOnly !== null && isExportOnly) {
$scope.exportDataList = newTree;
_.each($scope.exportDataList, function(exportData){
if(exportData.begDebitBal && parseFloat(exportData.begDebitBal.replace(/,/g, "")).toString() != "NaN")
if(exportData.begDebitBal && parseFloat(exportData.begDebitBal.replace(/,/g, "")).toString() != "NaN") {
$scope.totalBegDebitBal += parseFloat(exportData.begDebitBal.replace(/,/g, ""));
exportData.begDebitBal
}
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")
......@@ -169,7 +171,13 @@
$scope.totalEndDebitBal += parseFloat(exportData.endDebitBal.replace(/,/g, ""));
if(exportData.endCreditBal && parseFloat(exportData.endCreditBal.replace(/,/g, "")).toString() != "NaN")
$scope.totalEndCreditBal += parseFloat(exportData.endCreditBal.replace(/,/g, ""));
})
});
$scope.totalEndCreditBal = $scope.totalEndCreditBal .toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
$scope.totalEndDebitBal = $scope.totalEndDebitBal .toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
$scope.totalCreditBal = $scope.totalCreditBal .toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
$scope.totalDebitBal = $scope.totalDebitBal .toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
$scope.totalBegCreditBal = $scope.totalBegCreditBal .toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
$scope.totalBegDebitBal = $scope.totalBegDebitBal .toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
}
else {
$scope.gridOptions.data = newTree;
......
......@@ -101,12 +101,12 @@
<tr ng-repeat="exportData in exportDataList" on-finish-render="ngRepeatFinished">
<td>{{exportData.acctCode}}</td>
<td>{{exportData.accountName}}</td>
<td>{{exportData.begDebitBal}}</td>
<td>{{exportData.begCreditBal}}</td>
<td>{{exportData.debitBal}}</td>
<td>{{exportData.creditBal}}</td>
<td>{{exportData.endDebitBal}}</td>
<td>{{exportData.endCreditBal}}</td>
<td style="text-align:right;">{{exportData.begDebitBal}}</td>
<td style="text-align:right;">{{exportData.begCreditBal}}</td>
<td style="text-align:right;">{{exportData.debitBal}}</td>
<td style="text-align:right;">{{exportData.creditBal}}</td>
<td style="text-align:right;">{{exportData.endDebitBal}}</td>
<td style="text-align:right;">{{exportData.endCreditBal}}</td>
</tr>
<tr>
<td></td>
......
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