shareneus 1.5.21 → 1.5.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25,7 +25,7 @@ class ReceiptPDFService {
|
|
|
25
25
|
this.GetPayment(ReceiptData.PaymentId, isHC),
|
|
26
26
|
this.GetName(ReceiptData.FullName),
|
|
27
27
|
this.GetRupee(ReceiptData.TotalAmount),
|
|
28
|
-
this.GetTowards(ReceiptData.Ids, ReceiptData.RepairOrder),
|
|
28
|
+
this.GetTowards(ReceiptData.Ids, ReceiptData.RepairOrder, ReceiptData.Sts, ReceiptData.RemAmt),
|
|
29
29
|
this.GetAmount(ReceiptData.PaymentType, ReceiptData.TypeNumber, ReceiptData.PaidDate),
|
|
30
30
|
// this.GetDrawDate(ReceiptData.PaymentType,ReceiptData.PaidDate),
|
|
31
31
|
this.GetCompanyName(ReceiptData.Entity.CName),
|
|
@@ -180,7 +180,7 @@ class ReceiptPDFService {
|
|
|
180
180
|
]
|
|
181
181
|
};
|
|
182
182
|
}
|
|
183
|
-
static GetTowards(Ids, IsRepairOrder) {
|
|
183
|
+
static GetTowards(Ids, IsRepairOrder, Sts, RemAmt) {
|
|
184
184
|
let data = '';
|
|
185
185
|
let toward = '';
|
|
186
186
|
for (let i = 0; i < Ids.length; i++) {
|
|
@@ -197,6 +197,9 @@ class ReceiptPDFService {
|
|
|
197
197
|
}
|
|
198
198
|
else {
|
|
199
199
|
toward = 'INVOICE - ' + data;
|
|
200
|
+
if (RemAmt > 0) {
|
|
201
|
+
toward += ' (remaining Rs.' + RemAmt + ' as advance)';
|
|
202
|
+
}
|
|
200
203
|
}
|
|
201
204
|
}
|
|
202
205
|
else {
|
|
@@ -24,6 +24,7 @@ class ReceiptPrintService {
|
|
|
24
24
|
ReceiptData.TypeNumber = '';
|
|
25
25
|
}
|
|
26
26
|
ReceiptData.TotalAmount = PaymentViewData.Amt;
|
|
27
|
+
ReceiptData.RemAmt = PaymentViewData.RemAmt;
|
|
27
28
|
ReceiptData.PaidDate = my_date_1.MyDate.ConvertUTCDateToReadable(PaymentViewData.Date);
|
|
28
29
|
ReceiptData.Ids = this.GetRecordIds(PaymentViewData);
|
|
29
30
|
ReceiptData.Type = 'Receipt';
|
|
@@ -35,11 +36,11 @@ class ReceiptPrintService {
|
|
|
35
36
|
static GetRecordIds(PaymentViewData) {
|
|
36
37
|
let IdList = [];
|
|
37
38
|
var i = 0;
|
|
38
|
-
if (!tr_utils_1.TrUtils.IsNull(PaymentViewData.
|
|
39
|
-
for (i = 0; i < PaymentViewData.
|
|
40
|
-
let Id = PaymentViewData.
|
|
41
|
-
if (!tr_utils_1.TrUtils.IsNull(PaymentViewData.
|
|
42
|
-
Id = Id + '(' + PaymentViewData.
|
|
39
|
+
if (!tr_utils_1.TrUtils.IsNull(PaymentViewData.AllocRefs) && PaymentViewData.AllocRefs.length !== 0) {
|
|
40
|
+
for (i = 0; i < PaymentViewData.AllocRefs.length; i++) {
|
|
41
|
+
let Id = PaymentViewData.AllocRefs[i].Code;
|
|
42
|
+
if (!tr_utils_1.TrUtils.IsNull(PaymentViewData.AllocRefs[i].RegNo)) {
|
|
43
|
+
Id = Id + '(' + PaymentViewData.AllocRefs[i].RegNo + ')';
|
|
43
44
|
}
|
|
44
45
|
IdList.push(Id);
|
|
45
46
|
}
|
|
@@ -206,6 +206,7 @@ function SalesTotalCalculationsWithDecimals(items = [], ops = [], isTaxable = fa
|
|
|
206
206
|
subtotalOnLabor: roundToDecimals(result.subtotalOnLabor),
|
|
207
207
|
totalDiscountOnItems: roundToDecimals(result.totalDiscountOnItems),
|
|
208
208
|
totalDiscountOnLabor: roundToDecimals(result.totalDiscountOnLabor),
|
|
209
|
+
// returned related fields
|
|
209
210
|
netAmountAfterDiscount: roundToDecimals(result.netAmountAfterDiscount),
|
|
210
211
|
returnSubtotal: roundToDecimals(result.returnSubtotal),
|
|
211
212
|
returnTax: roundToDecimals(result.returnTax),
|