shareneus 1.5.21 → 1.5.23

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.
@@ -479,7 +479,7 @@ export declare class ReceiptPDFService {
479
479
  }[];
480
480
  })[];
481
481
  };
482
- static GetTowards(Ids: any, IsRepairOrder: boolean): {
482
+ static GetTowards(Ids: any, IsRepairOrder: boolean, Sts: any, RemAmt: any): {
483
483
  columns: {
484
484
  stack: ({
485
485
  text: ({
@@ -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,6 +36,15 @@ class ReceiptPrintService {
35
36
  static GetRecordIds(PaymentViewData) {
36
37
  let IdList = [];
37
38
  var i = 0;
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 + ')';
44
+ }
45
+ IdList.push(Id);
46
+ }
47
+ }
38
48
  if (!tr_utils_1.TrUtils.IsNull(PaymentViewData.Invs) && PaymentViewData.Invs.length !== 0) {
39
49
  for (i = 0; i < PaymentViewData.Invs.length; i++) {
40
50
  let Id = PaymentViewData.Invs[i].Code;
@@ -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),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.5.21",
3
+ "version": "1.5.23",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",