shareneus 1.4.53 → 1.4.55
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.
- package/dist/accounting/counter-sales/auto-sales-receipt-pdf.service.js +1 -1
- package/dist/accounting/invoice/hc-inv-pdf.service.js +1 -1
- package/dist/accounting/invoice/inv-pdf.service.js +1 -1
- package/dist/accounting/invoice/invoice-landscape-pdf.service.js +1 -1
- package/dist/accounting/invoice/invoice-letterhead-pdf.service.js +1 -1
- package/dist/accounting/invoice/shared-inv-pdf.service.js +1 -1
- package/dist/inventory/items/issue-parts-pdf.service.js +1 -1
- package/dist/sales/delivery-challan/dc-landscape-pdf.service.js +1 -1
- package/dist/shared/math-operations.js +0 -43
- package/dist/shared/shared-pdf.service.d.ts +1 -1
- package/dist/shared/shared-pdf.service.js +6 -3
- package/dist/shared/shared-print.service.js +1 -0
- package/package.json +1 -1
|
@@ -454,7 +454,7 @@ class SalesReceiptprintService {
|
|
|
454
454
|
shared_pdf_service_1.SharedPDFService.GetFinalTotalDetails(ROPrintData, ROPrintData.CustLaborTotalAfterDisc, ROPrintData.CustLaborDiscTotal, ROPrintData.CustLaborCGST, ROPrintData.CustLaborSGST, ROPrintData.CustLaborIGST, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn, ROPrintData.CustPartsTotalAfterDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST, ROPrintData.CustPartSGST, ROPrintData.CustTaxGroupData, ROPrintData.ShowAccParts, ROPrintData.CustLaborAfterTax, ROPrintData.CustPartAfterTax, ROPrintData.FixedDisc, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, ROPrintData.ShowTaxColumn, ROPrintData.ShowTaxColumn, tr_utils_1.TrUtils.isTaxable(ROPrintData.Settings.Tax), ROPrintData.CustLaborITax, ROPrintData.CustPartITax, ROPrintData.Consolidate, ROPrintData.From, ROPrintData.Adj, null, moreDiscDetails),
|
|
455
455
|
shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, ROPrintData.isCountersale, ROPrintData.Entity.DecimalsNumber),
|
|
456
456
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
457
|
-
shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank),
|
|
457
|
+
shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank, ROPrintData.Entity.UPIPhone),
|
|
458
458
|
shared_pdf_service_1.SharedPDFService.GetUnderLine(),
|
|
459
459
|
shared_pdf_service_1.SharedPDFService.GetInvSignatures(ROPrintData.Entity.CName, ROPrintData.isCountersale),
|
|
460
460
|
// this.PageBrake(ROPrintData, withPass),
|
|
@@ -769,7 +769,7 @@ class HCInvoiceprintService {
|
|
|
769
769
|
this.GetNumberInWords(ROPrintData.CustRoundedTotal),
|
|
770
770
|
this.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, ROPrintData.isCountersale, ROPrintData.Entity.DecimalsNumber),
|
|
771
771
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
772
|
-
shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank),
|
|
772
|
+
shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank, ROPrintData.Entity.UPIPhone),
|
|
773
773
|
// SharedPDFService.GetUnderLine(),
|
|
774
774
|
shared_pdf_service_1.SharedPDFService.GetHCInvSignatures(ROPrintData.Entity.CName, ROPrintData.isCountersale),
|
|
775
775
|
// this.PageBrake(ROPrintData, withPass),
|
|
@@ -708,7 +708,7 @@ class InvoiceprintService {
|
|
|
708
708
|
return CommonDetails;
|
|
709
709
|
}
|
|
710
710
|
static GetBanckdetailswithQRCode(ROPrintData) {
|
|
711
|
-
return { columns: [shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank),
|
|
711
|
+
return { columns: [shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank, ROPrintData.Entity.UPIPhone),
|
|
712
712
|
shared_pdf_service_1.SharedPDFService.GetEntityDetails(ROPrintData.Entity)] };
|
|
713
713
|
}
|
|
714
714
|
static GetNumberInWords(TotalAmount) {
|
|
@@ -901,7 +901,7 @@ class InvoiceLandscapePdfService {
|
|
|
901
901
|
// SharedPDFService.GetTaxOnParts(ROPrintData.CustPartsTotalBeforeDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST,
|
|
902
902
|
// ROPrintData.CustPartSGST, ROPrintData.ShowAccParts, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn,
|
|
903
903
|
// ROPrintData.ShowTaxColumn, ROPrintData.From),
|
|
904
|
-
shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank),
|
|
904
|
+
shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank, ROPrintData.Entity.UPIPhone),
|
|
905
905
|
{
|
|
906
906
|
columns: [{ text: '', width: moreDiscDetails ? 153 : 175 }, shared_pdf_service_1.SharedPDFService.GrandTotal(ROPrintData, '0.00', ROPrintData.CustPartsTotalBeforeDisc, totalDisc, totalTax, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, null, ROPrintData.Consolidate, null, moreDiscDetails, ROPrintData.Entity.DecimalsNumber)]
|
|
907
907
|
}
|
|
@@ -708,7 +708,7 @@ class InvoiceLetterheadPdfService {
|
|
|
708
708
|
return CommonDetails;
|
|
709
709
|
}
|
|
710
710
|
static GetBanckdetailswithQRCode(ROPrintData) {
|
|
711
|
-
return { columns: [shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank),
|
|
711
|
+
return { columns: [shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank, ROPrintData.Entity.UPIPhone),
|
|
712
712
|
shared_pdf_service_1.SharedPDFService.GetEntityDetails(ROPrintData.Entity)] };
|
|
713
713
|
}
|
|
714
714
|
static GetNumberInWords(TotalAmount) {
|
|
@@ -673,7 +673,7 @@ class SharedInvoiceprintService {
|
|
|
673
673
|
this.GetNumberInWords(ROPrintData.CustRoundedTotal),
|
|
674
674
|
shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, ROPrintData.isCountersale, ROPrintData.Entity.DecimalsNumber),
|
|
675
675
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
676
|
-
shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank),
|
|
676
|
+
shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank, ROPrintData.Entity.UPIPhone),
|
|
677
677
|
shared_pdf_service_1.SharedPDFService.GetUnderLine(),
|
|
678
678
|
shared_pdf_service_1.SharedPDFService.GetInvSignatures(ROPrintData.Entity.CName, ROPrintData.isCountersale),
|
|
679
679
|
// this.PageBrake(ROPrintData, withPass),
|
|
@@ -673,7 +673,7 @@ class IssuePartsprintService {
|
|
|
673
673
|
this.GetNumberInWords(ROPrintData.CustRoundedTotal),
|
|
674
674
|
shared_pdf_service_1.SharedPDFService.InvoiceDueStatus(ROPrintData.Type, ROPrintData.Paid, ROPrintData.Due, ROPrintData.Sts, ROPrintData.isCountersale, ROPrintData.Entity.DecimalsNumber),
|
|
675
675
|
shared_pdf_service_1.SharedPDFService.GetTemsAndConditions(ROPrintData.Entity.Terms),
|
|
676
|
-
shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank),
|
|
676
|
+
shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank, ROPrintData.Entity.UPIPhone),
|
|
677
677
|
shared_pdf_service_1.SharedPDFService.GetUnderLine(),
|
|
678
678
|
shared_pdf_service_1.SharedPDFService.GetInvSignatures(ROPrintData.Entity.CName, ROPrintData.isCountersale),
|
|
679
679
|
// this.PageBrake(ROPrintData, withPass),
|
|
@@ -877,7 +877,7 @@ class DCLandscapePdfService {
|
|
|
877
877
|
// SharedPDFService.GetTaxOnParts(ROPrintData.CustPartsTotalBeforeDisc, ROPrintData.CustPartsDiscTotal, ROPrintData.CustPartCGST,
|
|
878
878
|
// ROPrintData.CustPartSGST, ROPrintData.ShowAccParts, ROPrintData.CustPartIGST, ROPrintData.ShowIGST, ROPrintData.ShowTaxColumn,
|
|
879
879
|
// ROPrintData.ShowTaxColumn, ROPrintData.From),
|
|
880
|
-
shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank),
|
|
880
|
+
shared_pdf_service_1.SharedPDFService.GetBankDetials(ROPrintData.Entity.Bank, ROPrintData.Entity.PrBank, ROPrintData.Entity.UPIPhone),
|
|
881
881
|
{
|
|
882
882
|
columns: [{ text: '', width: moreDiscDetails ? 140 : 175 }, shared_pdf_service_1.SharedPDFService.GrandTotal(ROPrintData, '0.00', ROPrintData.CustPartsTotalBeforeDisc, totalDisc, totalTax, ROPrintData.For, ROPrintData.FixedTotal, ROPrintData.CustTotalRoundedBy, ROPrintData.CustRoundedTotal, null, ROPrintData.Consolidate, null, moreDiscDetails, ROPrintData.Entity.DecimalsNumber)],
|
|
883
883
|
}
|
|
@@ -182,46 +182,3 @@ function GetMarginValue(price, cost) {
|
|
|
182
182
|
// Return the calculated margin
|
|
183
183
|
return margin;
|
|
184
184
|
}
|
|
185
|
-
// /* Returns age as a human-readable string in years, months, weeks and days.
|
|
186
|
-
// * E.g. "10 years, 5 months, 1 week, 2 days"
|
|
187
|
-
// */
|
|
188
|
-
// export function GetAgeString(dateOfBirth: Date): string {
|
|
189
|
-
// const now = new Date();
|
|
190
|
-
// // 1) Calculate full years
|
|
191
|
-
// let years = now.getFullYear() - dateOfBirth.getFullYear();
|
|
192
|
-
// const anniversary = new Date(dateOfBirth);
|
|
193
|
-
// anniversary.setFullYear(dateOfBirth.getFullYear() + years);
|
|
194
|
-
// if (anniversary > now) {
|
|
195
|
-
// years--;
|
|
196
|
-
// anniversary.setFullYear(dateOfBirth.getFullYear() + years);
|
|
197
|
-
// }
|
|
198
|
-
// // 2) Calculate full months since last "anniversary"
|
|
199
|
-
// let temp = new Date(anniversary);
|
|
200
|
-
// let months = 0;
|
|
201
|
-
// while (true) {
|
|
202
|
-
// const next = new Date(temp);
|
|
203
|
-
// next.setMonth(next.getMonth() + 1);
|
|
204
|
-
// if (next <= now) {
|
|
205
|
-
// months++;
|
|
206
|
-
// temp = next;
|
|
207
|
-
// } else {
|
|
208
|
-
// break;
|
|
209
|
-
// }
|
|
210
|
-
// }
|
|
211
|
-
// // 3) Calculate remaining days → weeks + days
|
|
212
|
-
// const msPerDay = 24 * 60 * 60 * 1000;
|
|
213
|
-
// const daysTotal = Math.floor((now.getTime() - temp.getTime()) / msPerDay);
|
|
214
|
-
// const weeks = Math.floor(daysTotal / 7);
|
|
215
|
-
// const days = daysTotal % 7;
|
|
216
|
-
// // 4) Build the output, skipping zero-values
|
|
217
|
-
// const parts: string[] = [];
|
|
218
|
-
// if (years) parts.push(`${years} year${years > 1 ? 's' : ''}`);
|
|
219
|
-
// if (months) parts.push(`${months} month${months > 1 ? 's' : ''}`);
|
|
220
|
-
// if (weeks) parts.push(`${weeks} week${weeks > 1 ? 's' : ''}`);
|
|
221
|
-
// if (days) parts.push(`${days} day${days > 1 ? 's' : ''}`);
|
|
222
|
-
// // Fallback for same-day birth (unlikely in practice)
|
|
223
|
-
// if (parts.length === 0) {
|
|
224
|
-
// return '0 days';
|
|
225
|
-
// }
|
|
226
|
-
// return parts.join(', ');
|
|
227
|
-
// }
|
|
@@ -140,7 +140,7 @@ export declare class SharedPDFService {
|
|
|
140
140
|
};
|
|
141
141
|
layout: string;
|
|
142
142
|
};
|
|
143
|
-
static GetBankDetials(Bankinfo: any, isPrint: boolean): any;
|
|
143
|
+
static GetBankDetials(Bankinfo: any, isPrint: boolean, UPIPhone: string): any;
|
|
144
144
|
static GetBankDataTable(data: any, isBank: boolean): any;
|
|
145
145
|
static LaborTotalTable(ROPrintData: any): {
|
|
146
146
|
style: string[];
|
|
@@ -286,7 +286,7 @@ class SharedPDFService {
|
|
|
286
286
|
static GetEntityDetails(Entity) {
|
|
287
287
|
let SetData = [];
|
|
288
288
|
if (Entity.PrUPI && !Entity.IsProforma) {
|
|
289
|
-
SetData.push({ qr: Entity.UPI, fit: '
|
|
289
|
+
SetData.push({ qr: Entity.UPI, fit: '125', marginLeft: 150 });
|
|
290
290
|
SetData.push({ text: 'Scan To Pay', fontSize: this.TermsandCond, marginLeft: 151, bold: true, marginTop: 2 });
|
|
291
291
|
}
|
|
292
292
|
// SetData.push({ columns: [this.GetEntityTax(Entity)] })
|
|
@@ -563,7 +563,7 @@ class SharedPDFService {
|
|
|
563
563
|
layout: 'noBorders',
|
|
564
564
|
};
|
|
565
565
|
}
|
|
566
|
-
static GetBankDetials(Bankinfo, isPrint) {
|
|
566
|
+
static GetBankDetials(Bankinfo, isPrint, UPIPhone) {
|
|
567
567
|
if (isPrint && !tr_utils_1.TrUtils.IsNull(Bankinfo)) {
|
|
568
568
|
let AccountFields = [];
|
|
569
569
|
let BANK = { name: 'BANK', value: Bankinfo.Name };
|
|
@@ -571,6 +571,7 @@ class SharedPDFService {
|
|
|
571
571
|
let AccHolderName = { name: 'Account Holder Name', value: Bankinfo.ACName };
|
|
572
572
|
let Branch = { name: 'Branch', value: tr_utils_1.TrUtils.IsNull(Bankinfo.Bran) ? '' : Bankinfo.Bran };
|
|
573
573
|
let IFSC = { name: 'IFSC NO', value: Bankinfo.IFSC };
|
|
574
|
+
let UPIPh = { name: 'Phone Pay / Google Pay', value: UPIPhone };
|
|
574
575
|
// let TotalPartsAmount = { name: 'Final Labor Amount', value: this.LabourtotalAmount(ROPrintData.LaborInsTotal) };
|
|
575
576
|
AccountFields.push(BANK);
|
|
576
577
|
// if (!TrUtils.IsNull(ROPrintData.OverAllLaborDiscount) && ROPrintData.OverAllLaborDiscount !== 0) {
|
|
@@ -579,7 +580,9 @@ class SharedPDFService {
|
|
|
579
580
|
// }
|
|
580
581
|
AccountFields.push(Branch);
|
|
581
582
|
AccountFields.push(IFSC);
|
|
582
|
-
|
|
583
|
+
if (!tr_utils_1.TrUtils.IsNull(UPIPhone)) {
|
|
584
|
+
AccountFields.push(UPIPh);
|
|
585
|
+
} // AccountFields.push(TotalPartsAmount);
|
|
583
586
|
return {
|
|
584
587
|
style: ['columnheader', 'TotalsStyles'],
|
|
585
588
|
lineHeight: 1,
|
|
@@ -40,6 +40,7 @@ class PrintSharedService {
|
|
|
40
40
|
Entity.PrBank = tempEntity.Settings.Acc.PrBnk;
|
|
41
41
|
Entity.PrUPI = tempEntity.Settings.Acc.PrUPI;
|
|
42
42
|
Entity.UPI = tempEntity.Settings.Acc.UPI;
|
|
43
|
+
Entity.UPIPhone = tempEntity.Settings.Acc.UPIPhone;
|
|
43
44
|
}
|
|
44
45
|
if (tr_utils_1.TrUtils.IsNull(tempEntity.Settings.Common.Tax.GSTIN)) {
|
|
45
46
|
Entity.GSTIN = '';
|