Commit b64d1a22 authored by Cheng C Yang's avatar Cheng C Yang

Balance Sheet and Profit table Fix Bugs

parent 51feb218
......@@ -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">
......
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');
......@@ -42,18 +44,18 @@
//认证结果
$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;
}
......@@ -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