Commit e366f85a authored by Eddie.Wu's avatar Eddie.Wu

Merge branch 'dev_mysql_ken' into 'dev_mysql'

fix Vat view bug ---Ken

See merge request root/atms!392
parents b01c2bc0 9f0fdeb8
......@@ -385,11 +385,6 @@ public class DataPreviewSerivceImpl extends BaseService {
ProfitLossStatementCondition condition = new ProfitLossStatementCondition();
beanUtil.copyProperties(param, condition);
List<ProfitLossStatementPrc> profitLossStatements = profitLossStatementPrcManualMapper.selectByCondition1(condition);
//List<ProfitLossStatementExportDto> exportDtos = Lists.newArrayList();
// profitLossStatements.forEach(id -> {
// ProfitLossStatementExportDto exportDto = beanUtil.copyProperties(id, new ProfitLossStatementExportDto());
// exportDtos.add(exportDto);
// });
ProfitLossHeader header=new ProfitLossHeader();
if(profitLossStatements.size()>0){
Organization org = organizationMapper.selectByPrimaryKey(param.getOrgId());
......
......@@ -209,8 +209,8 @@
$scope.queryParams.periodStart = $scope.startMonth;
//$scope.queryParams.periodEnd = $scope.endMonth;
$scope.queryParams.orgId = vatSessionService.project.organizationID;
loadTrialBalanceDataFromDB(1);
$('.filter-button').popover("hide");
//loadTrialBalanceDataFromDB(1);
//$('.filter-button').popover("hide");
};
var prepareSummary = function () {
......@@ -251,6 +251,7 @@
}).on('changeDate', function (e) {
// 开始月份
var startMonth = vatSessionService.project.year * 100 + e.date.getMonth() + 1;
$scope.startMonth = startMonth;
$scope.queryParams.periodStart = startMonth;
loadTrialBalanceDataFromDB(1);
});
......
......@@ -174,7 +174,7 @@
autoclose: true,//选中之后自动隐藏日期选择框
clearBtn: true,//清除按钮
todayBtn: false,//今日按钮
format: $scope.dateFormat//日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
format: $scope.dateFormatMomth//日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
}).on('changeDate', function (e) {
// 开始月份
var startMonth = vatSessionService.project.year * 100 + e.date.getMonth() + 1;
......
......@@ -9,8 +9,10 @@
</div>
<div style="margin-bottom: 10px;margin-left: 20px;margin-top: 10px;">
{{'EnterpriseAccountSetName' | translate }}:<span class="numAmount">{{ledgerNameFirst}}</span>&nbsp;&nbsp;&nbsp;
<!-- {{'EnterpriseAccountSetName' | translate }}:<span class="numAmount">{{ledgerNameFirst}}</span>&nbsp;&nbsp;&nbsp;-->
{{'ImportTime' | translate }}:<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>
<!-- {{'ImportTime' | translate }}:<span class="numAmount">{{ importDate| date:'yyyy-MM'}}</span>-->
</div>
<div id="mainAreaDiv" class="main-area">
......
......@@ -305,7 +305,7 @@
$scope.gridOptions = {
bindingOptions: {
dataSource: 'gridDataSource'
},
},
columns: [
// {caption: $translate.instant('ApprovalStatus'),dataField: "approvalStatus",width: 120},
// {caption: $translate.instant('Posting'), dataField: "postedStatus",width: 120},
......
......@@ -9,7 +9,7 @@
$scope.endMonth = vatSessionService.month;
$scope.totalMoneyAmount = 0;
$scope.totalTaxAmount = 0;
$scope.pageSize = constant.vatPagesize;
$scope.pageSize = constant.page.pageSizeArrary[3];
$scope.selectedDate = new Date(vatSessionService.year, vatSessionService.month - 1, 1);
$scope.dateFormatMomth = $translate.instant('dateFormat4YearMonth');
......@@ -104,7 +104,6 @@
$scope.queryBalanceSheetResult.pageInfo = data;
computeBalanceSheetPage();
if(data.size>0){
$scope.ledgerName = data.list[0].ledgerName;
$scope.currencyCode = data.list[0].ledgerCurrencyCode;
$scope.status = data.list[0].status;
$scope.importDate = $filter('date')(data.list[0].date, "yyyy-MM-dd hh:mm:ss");
......@@ -170,7 +169,7 @@
pageInfo: {
totalCount: -1,
pageIndex: 1,
pageSize: constant.pagesize,
pageSize: constant.page.pageSizeArrary[3],
totalPage: 0,
}
}
......
......@@ -15,7 +15,6 @@
</div>
<div style="margin-bottom: 8px;margin-left: 30px">
{{'EnterpriseAccountSetName' | translate}}<span class="numAmount">{{ledgerName}}</span>&nbsp;&nbsp;&nbsp;
{{'EnterpriseAccountSetCurrency' | translate}}<span class="numAmount">{{currencyCode}}</span>&nbsp;&nbsp;&nbsp;
{{'IsCloseAccount' | translate}}<span class="numAmount">{{status}}</span>
{{'ImportTime' | translate}}<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>
......
......@@ -103,7 +103,6 @@
$scope.queryProfitLossResult.pageInfo = data;
computeProfitLossPage();
if(data.size>0){
$scope.ledgerName = data.list[0].ledgerName;
$scope.currencyCode = data.list[0].ledgerCurrencyCode;
$scope.status = data.list[0].status;
$scope.importDate = $filter('date')(data.list[0].date, "yyyy-MM-dd hh:mm:ss");
......
......@@ -15,7 +15,6 @@
</div>
<div style="margin-bottom: 8px;margin-left: 30px">
{{'EnterpriseAccountSetName' | translate}}<span class="numAmount">{{ledgerName}}</span>&nbsp;&nbsp;&nbsp;
{{'EnterpriseAccountSetCurrency' | translate}}<span class="numAmount">{{currencyCode}}</span>&nbsp;&nbsp;&nbsp;
{{'IsCloseAccount' | translate}}<span class="numAmount">{{status}}</span>
{{'ImportTime' | translate}}<span class="numAmount">{{importDate| date:'yyyy-MM-dd hh:mm:ss'}}</span>
......
vatModule.controller('VatPreviewTheBalanceSheetController', ['$rootScope','$scope', '$log','$filter', '$translate', '$timeout', 'SweetAlert', '$q', 'uiGridConstants', '$interval', 'vatPreviewService', 'browserService', 'vatSessionService', 'region', 'enums', 'vatExportService',
function ($rootScope,$scope, $log,$filter, $translate, $timeout, SweetAlert, $q, uiGridConstants, $interval, vatPreviewService, browserService, vatSessionService, region, enums, vatExportService) {
vatModule.controller('VatPreviewTheBalanceSheetController', ['$rootScope', '$scope', '$log', '$filter', '$translate', '$timeout', 'SweetAlert', '$q', 'uiGridConstants', '$interval', 'vatPreviewService', 'browserService', 'vatSessionService', 'region', 'enums', 'vatExportService',
function ($rootScope, $scope, $log, $filter, $translate, $timeout, SweetAlert, $q, uiGridConstants, $interval, vatPreviewService, browserService, vatSessionService, region, enums, vatExportService) {
'use strict';
$scope.startDate = new Date(vatSessionService.project.year, 0, 1);
......@@ -9,7 +9,9 @@
$scope.endMonth = vatSessionService.month;
$scope.totalMoneyAmount = 0;
$scope.totalTaxAmount = 0;
$scope.pageSize = constant.vatPagesize;
// $scope.pageSize = constant.vatPagesize;
$scope.pageSize = 100;
var balancePageSize = 100;
var minDate = [1, vatSessionService.project.year];
// var minDate = moment().startOf('month').subtract(0, 'months');
......@@ -27,33 +29,33 @@
};
$scope.monthList = [$translate.instant('Month01'),
$translate.instant('Month02'),
$translate.instant('Month03'),
$translate.instant('Month04'),
$translate.instant('Month05'),
$translate.instant('Month06'),
$translate.instant('Month07'),
$translate.instant('Month08'),
$translate.instant('Month09'),
$translate.instant('Month10'),
$translate.instant('Month11'),
$translate.instant('Month12')
$translate.instant('Month02'),
$translate.instant('Month03'),
$translate.instant('Month04'),
$translate.instant('Month05'),
$translate.instant('Month06'),
$translate.instant('Month07'),
$translate.instant('Month08'),
$translate.instant('Month09'),
$translate.instant('Month10'),
$translate.instant('Month11'),
$translate.instant('Month12')
];
//认证结果
$scope.cetificationResultList = [
{ id: 999, name: $translate.instant('AllTheItems') },
{ id: 1, name: $translate.instant('CertificationPass') },
{ id: 2, name: $translate.instant('CertificationNotPass') }
{id: 999, name: $translate.instant('AllTheItems')},
{id: 1, name: $translate.instant('CertificationPass')},
{id: 2, name: $translate.instant('CertificationNotPass')}
];
//发票类型
$scope.invoiceTypeList = [
{ id: 999, name: $translate.instant('AllTheItems') },
{ id: enums.invoiceType.VATInvoice, name: $translate.instant('VATInvoice') },
{ id: enums.invoiceType.FreightTransport, name: $translate.instant('FreightTransport') },
{ id: enums.invoiceType.MotorVehicle, name: $translate.instant('MotorVehicle') },
{ id: enums.invoiceType.AgriculturalProduct, name: $translate.instant('AgriculturalProduct') }
{id: 999, name: $translate.instant('AllTheItems')},
{id: enums.invoiceType.VATInvoice, name: $translate.instant('VATInvoice')},
{id: enums.invoiceType.FreightTransport, name: $translate.instant('FreightTransport')},
{id: enums.invoiceType.MotorVehicle, name: $translate.instant('MotorVehicle')},
{id: enums.invoiceType.AgriculturalProduct, name: $translate.instant('AgriculturalProduct')}
];
......@@ -91,7 +93,7 @@
$scope.getDataFromDatabase($scope.queryParams);
};
$scope.getDataFromDatabase = function (queryParams){
$scope.getDataFromDatabase = function (queryParams) {
vatPreviewService.getBalanceSheetDataForDisplay(queryParams).success(function (data) {
if (data) {
// minDate = data.
......@@ -127,8 +129,7 @@
//计算本页记录数
if ($scope.queryBalanceSheetResult.pageInfo.pageNum === totalPage) {
$scope.curPageItemCount = $scope.queryBalanceSheetResult.pageInfo.total % $scope.pageSize;
}
else {
} else {
$scope.curPageItemCount = $scope.pageSize;
}
......@@ -167,7 +168,7 @@
pageInfo: {
totalCount: -1,
pageIndex: 1,
pageSize: constant.pagesize,
pageSize: balancePageSize,
totalPage: 0,
}
}
......@@ -237,7 +238,8 @@
return;
}
crit = new Object;
crit.name = $translate.instant('InvoiceRZRQQuery') + crits.certificationDateStart + "-" + crits.certificationDateEnd;;
crit.name = $translate.instant('InvoiceRZRQQuery') + crits.certificationDateStart + "-" + crits.certificationDateEnd;
;
crit.fullName = $translate.instant('InvoiceRZRQQuery') + crits.certificationDateStart + "-" + crits.certificationDateEnd;
crit.valueFrom = crits.certificationDateStart;
crit.valueTo = crits.certificationDateEnd;
......@@ -253,8 +255,7 @@
crit.propertyName = "certificationDateStart|certificationDateEnd";
$scope.criteriaList.push(crit);
}
else if (PWC.isNullOrEmpty(crits.certificationDateStart) && !PWC.isNullOrEmpty(crits.certificationDateEnd)) {
} else if (PWC.isNullOrEmpty(crits.certificationDateStart) && !PWC.isNullOrEmpty(crits.certificationDateEnd)) {
crit = new Object;
crit.name = $translate.instant('InvoiceRZRQQuery') + crits.certificationDateEnd + $translate.instant('Before');
crit.fullName = $translate.instant('InvoiceRZRQQuery') + crits.certificationDateEnd + $translate.instant('Before');
......@@ -311,8 +312,7 @@
crit.valueTo = crits.amountEnd;
crit.propertyName = "amountStart|amountEnd";
$scope.criteriaList.push(crit);
}
else if (!PWC.isNullOrEmpty(crits.amountStart) && PWC.isNullOrEmpty(crits.amountEnd)) {
} else if (!PWC.isNullOrEmpty(crits.amountStart) && PWC.isNullOrEmpty(crits.amountEnd)) {
crit = new Object;
crit.name = $translate.instant('InvoiceJEQuery') + PWC.limitString(crits.amountStart, 5) + $translate.instant('MoreThan');
crit.fullName = $translate.instant('InvoiceJEQuery') + crits.amountStart + $translate.instant('MoreThan');
......@@ -320,8 +320,7 @@
crit.valueTo = crits.amountEnd;
crit.propertyName = "amountStart|amountEnd";
$scope.criteriaList.push(crit);
}
else if (PWC.isNullOrEmpty(crits.amountStart) && !PWC.isNullOrEmpty(crits.amountEnd)) {
} else if (PWC.isNullOrEmpty(crits.amountStart) && !PWC.isNullOrEmpty(crits.amountEnd)) {
crit = new Object;
crit.name = $translate.instant('InvoiceJEQuery') + PWC.limitString(crits.amountEnd, 5) + $translate.instant('LessThan');
crit.fullName = $translate.instant('InvoiceJEQuery') + crits.amountEnd + $translate.instant('LessThan');
......@@ -346,8 +345,7 @@
crit.propertyName = "taxAmountStart|taxAmountEnd";
$scope.criteriaList.push(crit);
}
else if (!PWC.isNullOrEmpty(crits.taxAmountStart) && PWC.isNullOrEmpty(crits.taxAmountEnd)) {
} else if (!PWC.isNullOrEmpty(crits.taxAmountStart) && PWC.isNullOrEmpty(crits.taxAmountEnd)) {
crit = new Object;
crit.name = $translate.instant('InvoiceSEQuery') + PWC.limitString(crits.taxAmountStart, 5) + $translate.instant('MoreThan');
crit.fullName = $translate.instant('InvoiceSEQuery') + crits.taxAmountStart + $translate.instant('MoreThan');
......@@ -356,8 +354,7 @@
crit.propertyName = "taxAmountStart|taxAmountEnd";
$scope.criteriaList.push(crit);
}
else if (PWC.isNullOrEmpty(crits.taxAmountStart) && !PWC.isNullOrEmpty(crits.taxAmountEnd)) {
} else if (PWC.isNullOrEmpty(crits.taxAmountStart) && !PWC.isNullOrEmpty(crits.taxAmountEnd)) {
crit = new Object;
crit.name = $translate.instant('InvoiceSEQuery') + PWC.limitString(crits.taxAmountEnd, 5) + $translate.instant('LessThan');
crit.fullName = $translate.instant('InvoiceSEQuery') + crits.taxAmountEnd + $translate.instant('LessThan');
......@@ -406,8 +403,7 @@
if ($scope.criteriaList.length > 6) {
$scope.criteriaListFirstRow = $scope.criteriaList.slice(0, 6);
$scope.criteriaListSecondRow = $scope.criteriaList.slice(6, $scope.criteriaList.length);
}
else {
} else {
$scope.criteriaListFirstRow = $scope.criteriaList.slice(0, $scope.criteriaList.length);
}
$('.filter-button').popover("hide");
......@@ -490,7 +486,7 @@
//导出进项发票数据
var downloadBS = function () {
vatPreviewService.initExportBalanceSheetData($scope.queryParams).success(function (data, status, headers) {
if(status===204){
if (status === 204) {
SweetAlert.warning("没有数据可以下载");
return;
}
......@@ -515,20 +511,20 @@
ConfirmBtnText: $translate.instant('Confirm'),
CancelBtnText: $translate.instant('ButtonCancel')
})
.on('datePicker.done', function (e, result) {
//开始月份
var startMonth = result[0][1] * 100 + result[0][0];
//结束月份
var endMonth = result[1][1] * 100 + result[1][0];
$scope.startMonth = startMonth;
$scope.endMonth = endMonth;
$scope.queryParams.periodStart = startMonth;
$scope.queryParams.periodEnd = endMonth;
loadBalanceSheetDataFromDB(1);
});
.on('datePicker.done', function (e, result) {
//开始月份
var startMonth = result[0][1] * 100 + result[0][0];
//结束月份
var endMonth = result[1][1] * 100 + result[1][0];
$scope.startMonth = startMonth;
$scope.endMonth = endMonth;
$scope.queryParams.periodStart = startMonth;
$scope.queryParams.periodEnd = endMonth;
loadBalanceSheetDataFromDB(1);
});
$scope.gridOptions = {
rowHeight: constant.UIGrid.rowHeight,
selectionRowHeaderWidth: constant.UIGrid.rowHeight,
......@@ -536,7 +532,7 @@
virtualizationThreshold: 50,//默认加载50条数据,避免在数据展示时,只显示前面4条
enableSorting: false,
enableColumnMenus: false,
enableHorizontalScrollbar : 1,
enableHorizontalScrollbar: 1,
columnDefs: [
{
name: $translate.instant('ProjectName'),
......@@ -544,12 +540,12 @@
},
{
name: $translate.instant('EndingBalance'),
headerCellClass:'rightHeader',
headerCellClass: 'rightHeader',
cellTemplate: '<div class="ui-grid-cell-contents" style="text-align: right"><span>{{row.entity.endBal | number:2}}<span></div>'
},
{
name: $translate.instant('InitialBalance'),
headerCellClass:'rightHeader',
headerCellClass: 'rightHeader',
cellTemplate: '<div class="ui-grid-cell-contents" style="text-align: right"><span>{{row.entity.begBal | number:2}}</span></div>'
}
]
......@@ -567,9 +563,9 @@
$scope.queryParams.periodStart = vatSessionService.year * 100 + vatSessionService.month;
$scope.queryParams.periodEnd = vatSessionService.year * 100 + vatSessionService.month;
$scope.queryParams.orgId = vatSessionService.project.organizationID;
if($rootScope.currentLanguage === 'en-us'){
if ($rootScope.currentLanguage === 'en-us') {
$('.periodInput')[0].style.left = "260px";
}else{
} else {
$('.periodInput')[0].style.left = "150px";
}
loadBalanceSheetDataFromDB(1);
......
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