master
wangning 7 years ago
commit f41096d2a1

@ -41,11 +41,12 @@ public class ABAFile {
StringWriter out = new StringWriter();
PrintWriter writer = new PrintWriter(out);
writer.println(generateTopLine());
writer.print(generateTopLine() + "\r\n");
for (SettleMerchantInfo info : settlements) {
writer.println(info.settleLine());
String line = info.settleLine();
writer.print(line + "\r\n");
}
writer.println(generateBalanceLine());
writer.print(generateBalanceLine() + "\r\n");
writer.print(generateFinalLine());
writer.flush();
return out.toString().getBytes();
@ -125,7 +126,7 @@ public class ABAFile {
lineBuilder.replace(62, 80, StringUtils.rightPad("RoyalPay" + DateFormatUtils.format(settleDate, "yyyyMMdd"), 18));
lineBuilder.replace(80, 87, bsbNo(selfBSB));
lineBuilder.replace(87, 96, StringUtils.leftPad(selfAccountNo, 9));
lineBuilder.replace(96, 112, StringUtils.rightPad(company, 16));
lineBuilder.replace(96, 112, StringUtils.left(StringUtils.rightPad(company, 16), 16));
lineBuilder.replace(112, 120, StringUtils.leftPad("0", 8, "0"));
return lineBuilder.toString();
}

@ -16,6 +16,21 @@ define(['angular','decimal'], function (angular,decimal) {
$scope.today = new Date();
$scope.pagination = {};
$scope.today = new Date();
$scope.clients = [$scope.currentUser.client];
if ($scope.currentUser.client.has_children) {
$scope.params.client_ids = [$scope.currentUser.client.client_id];
$http.get('/client/partner_info/sub_partners').then(function (resp) {
var clientList = resp.data;
clientList.forEach(function (client) {
$scope.clients.push(client);
});
})
};
$scope.chooseClient = function (clientId) {
$scope.chooseClientId = clientId;
$scope.params.client_ids = [clientId];
$scope.loadTradeLogs(1);
};
$scope.chooseToday = function () {
$scope.params.datefrom = $scope.params.dateto = new Date();
$scope.loadTradeLogs(1);
@ -62,7 +77,9 @@ define(['angular','decimal'], function (angular,decimal) {
$http.get('/partner/invoice/trans_flow', {params: params}).then(function (resp) {
$scope.tradeLogs = resp.data.data;
$scope.tradeLogs.forEach(function (log) {
if(log.total_surcharge){
log.total_surcharge = decimal.add(log.total_surcharge,log.tax_amount).toFixed(2);
}
});
$scope.pagination = resp.data.pagination;
$scope.analysis = resp.data.analysis;

@ -87,7 +87,19 @@
</div>
</div>
<button class="btn btn-success" type="button" ng-click="loadTradeLogs()">
<div class="form-group col-xs-12" ng-if="currentUser.client.has_children">
<label class="control-label col-xs-4 col-sm-2">Sub Partner</label>
<div class="col-sm-10 col-xs-8">
<p class="form-control-static">
<label ng-repeat="sub in clients">
|&nbsp;<a role="button"
ng-class="{'bg-primary':sub.client_id==chooseClientId}"
ng-click="chooseClient(sub.client_id)">{{sub.short_name}}</a>&nbsp;
</label>
</p>
</div>
</div>
<button class="btn btn-success" type="button" ng-click="loadTradeLogs(1)">
<i class="fa fa-search"></i> Search
</button>
<!--<a ng-if="pagination.totalCount>0" class="btn btn-success" style="float: right"-->

Loading…
Cancel
Save