shareneus 1.7.348 → 1.7.349

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.
@@ -75,6 +75,7 @@ class SalesReceivePrintService {
75
75
  const itemSGST = this.GetTaxAmountFromTaxes(Item, 'SGST', Item.SGST);
76
76
  const itemIGST = this.GetTaxAmountFromTaxes(Item, 'IGST', Item.IGST);
77
77
  Item.TCode = this.GetTCodeFromTaxes(Item);
78
+ Item.AfterPartDisc = (0, math_operations_1.Subtract)(Item.UnAmt, Item.Disc, Item.RecDisc);
78
79
  if (Consolidate) {
79
80
  let AfterPartDisc = (0, math_operations_1.Subtract)(Item.UnAmt, Item.Disc, Item.RecDisc);
80
81
  let AfterDiscForEach = (0, math_operations_1.Divide)(AfterPartDisc, Item.Qty);
@@ -1296,6 +1296,21 @@ class SharedPDFService {
1296
1296
  else if (Type === 'SalesOrder') {
1297
1297
  id = 'SO#';
1298
1298
  }
1299
+ else if (Type === 'Sales Return') {
1300
+ id = 'SR#';
1301
+ }
1302
+ else if (Type === 'Sales Receive') {
1303
+ id = 'SRR#';
1304
+ }
1305
+ else if (Type === 'Purchase Return') {
1306
+ id = 'PR#';
1307
+ }
1308
+ else if (Type === 'Purchase Shipment') {
1309
+ id = 'PS#';
1310
+ }
1311
+ else if (Type === 'Purchase Order') {
1312
+ id = 'PO#';
1313
+ }
1299
1314
  else if (Type === 'Sales Estimate') {
1300
1315
  id = 'Estimate#';
1301
1316
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shareneus",
3
- "version": "1.7.348",
3
+ "version": "1.7.349",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -80,12 +80,13 @@ export class SalesReceivePrintService {
80
80
  return SalesReceivePrintData;
81
81
  }
82
82
 
83
- static GetItemsPrintInfo(Items: any, Consolidate: boolean, TaxCodes: any, LineTotal: string, IsTaxable:boolean, DecimalsNumber: number) {
83
+ static GetItemsPrintInfo(Items: any, Consolidate: boolean, TaxCodes: any, LineTotal: string, IsTaxable: boolean, DecimalsNumber: number) {
84
84
  Items.forEach((Item: any) => {
85
85
  const itemCGST = this.GetTaxAmountFromTaxes(Item, 'CGST', Item.CGST);
86
86
  const itemSGST = this.GetTaxAmountFromTaxes(Item, 'SGST', Item.SGST);
87
87
  const itemIGST = this.GetTaxAmountFromTaxes(Item, 'IGST', Item.IGST);
88
88
  Item.TCode = this.GetTCodeFromTaxes(Item);
89
+ Item.AfterPartDisc = Subtract(Item.UnAmt, Item.Disc, Item.RecDisc);
89
90
  if (Consolidate) {
90
91
  let AfterPartDisc = Subtract(Item.UnAmt, Item.Disc, Item.RecDisc);
91
92
  let AfterDiscForEach = Divide(AfterPartDisc, Item.Qty);
@@ -102,7 +103,7 @@ export class SalesReceivePrintService {
102
103
  Item.CGSTPerc = this.GetTaxRateFromTaxes(Item, 'CGST', PrintSharedService.GetCGSTValueBasedOnTaxCode(Item.TCode, TaxCodes));
103
104
  Item.SGSTPerc = this.GetTaxRateFromTaxes(Item, 'SGST', PrintSharedService.GetSGSTValueBasedOnTaxCode(Item.TCode, TaxCodes));
104
105
  Item.IGSTPerc = this.GetTaxRateFromTaxes(Item, 'IGST', PrintSharedService.GetIGSTValueBasedOnTaxCode(Item.TCode, TaxCodes));
105
- // Calculate amount after tax based on tax type
106
+ // Calculate amount after tax based on tax type
106
107
  if (IsTaxable) {
107
108
  Item.AfterPartTax = Add(Item.AfterPartDisc, itemCGST, itemSGST, itemIGST);
108
109
  } else {
@@ -1325,7 +1325,7 @@ export class SharedPDFService {
1325
1325
  static GetCustomerGSTIN(Customer: any) {
1326
1326
  const customerTaxId = TrUtils.IsEmpty(Customer?.TaxId?.Value) ? Customer?.GSTIN : Customer.TaxId.Value;
1327
1327
  if (!TrUtils.IsEmpty(customerTaxId)) {
1328
- let GSTIN = { columns: [{ text: Customer?.TaxId?.Label ||'GSTIN :', width: 33, style: 'hed' }, { text: customerTaxId, marginTop: 1.5 }] };
1328
+ let GSTIN = { columns: [{ text: Customer?.TaxId?.Label || 'GSTIN :', width: 33, style: 'hed' }, { text: customerTaxId, marginTop: 1.5 }] };
1329
1329
  return GSTIN;
1330
1330
  } else {
1331
1331
  return this.emptyObject();
@@ -1385,6 +1385,16 @@ export class SharedPDFService {
1385
1385
  id = 'WO#';
1386
1386
  } else if (Type === 'SalesOrder') {
1387
1387
  id = 'SO#';
1388
+ } else if (Type === 'Sales Return') {
1389
+ id = 'SR#';
1390
+ } else if (Type === 'Sales Receive') {
1391
+ id = 'SRR#';
1392
+ } else if (Type === 'Purchase Return') {
1393
+ id = 'PR#';
1394
+ } else if (Type === 'Purchase Shipment') {
1395
+ id = 'PS#';
1396
+ } else if (Type === 'Purchase Order') {
1397
+ id = 'PO#';
1388
1398
  } else if (Type === 'Sales Estimate') {
1389
1399
  id = 'Estimate#';
1390
1400
  } else if (Type === 'Debit Notes') {