shareneus 1.6.16 → 1.6.18
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/enums/country-enums.d.ts +9 -0
- package/dist/enums/country-enums.js +13 -0
- package/dist/enums/treatment-enums.d.ts +9 -0
- package/dist/enums/treatment-enums.js +13 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -1
- package/dist/shared/table-section/pdf-table.header.js +22 -14
- package/dist/shared/table-section/pdf-table.section.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CountryEnum = void 0;
|
|
4
|
+
var CountryEnum;
|
|
5
|
+
(function (CountryEnum) {
|
|
6
|
+
CountryEnum["India"] = "IN";
|
|
7
|
+
CountryEnum["Australia"] = "AU";
|
|
8
|
+
CountryEnum["UnitedStates"] = "US";
|
|
9
|
+
CountryEnum["UnitedKingdom"] = "GB";
|
|
10
|
+
CountryEnum["Canada"] = "CA";
|
|
11
|
+
CountryEnum["Japan"] = "JP";
|
|
12
|
+
CountryEnum["Brazil"] = "BR";
|
|
13
|
+
})(CountryEnum || (exports.CountryEnum = CountryEnum = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaxTreatmentEnum = void 0;
|
|
4
|
+
var TaxTreatmentEnum;
|
|
5
|
+
(function (TaxTreatmentEnum) {
|
|
6
|
+
TaxTreatmentEnum["REGULAR"] = "REGULAR";
|
|
7
|
+
TaxTreatmentEnum["COMPOSITION"] = "COMPOSITION";
|
|
8
|
+
TaxTreatmentEnum["UNREGISTERED"] = "UNREGISTERED";
|
|
9
|
+
TaxTreatmentEnum["CONSUMER"] = "CONSUMER";
|
|
10
|
+
TaxTreatmentEnum["OVERSEAS"] = "OVERSEAS";
|
|
11
|
+
TaxTreatmentEnum["SEZ"] = "SEZ";
|
|
12
|
+
TaxTreatmentEnum["DEEMED_EXPORT"] = "DEEMED_EXPORT";
|
|
13
|
+
})(TaxTreatmentEnum || (exports.TaxTreatmentEnum = TaxTreatmentEnum = {}));
|
package/dist/index.d.ts
CHANGED
|
@@ -141,5 +141,7 @@ export { GetBillPdfDataUrl } from "./purchases/bills/bill-pdf/bill-pdf.service";
|
|
|
141
141
|
export { GetInvoicePrintInfo } from "./accounting/invoice/inv-print.service";
|
|
142
142
|
export { CreateReceiptPDFService } from "./accounting/payment-receive/payment-receipt-pdf/receipt-pdf.service";
|
|
143
143
|
export { CreateInvoicePDFService } from "./accounting/invoice/invoice-pdf/invoice-pdf.service";
|
|
144
|
+
export { CountryEnum } from "./enums/country-enums";
|
|
145
|
+
export { TaxTreatmentEnum } from "./enums/treatment-enums";
|
|
144
146
|
export { CalculateLineTax, ExtractNetFromInclusive, SumTaxComponents, ComputeTaxSummary, DetermineSupplyType, FindTaxCodeByRateAndSupplyType, CalculateWithholding, RoundAmount, ValidateTaxId, ValidateHSNSACLength, ConvertFlatToTaxes, } from "./tax";
|
|
145
147
|
export type { TaxComponentType, CalcMethod, AppliedOn, RoundingMethod, TaxCategory, SupplyType, ResolvedSupplyType, WithholdingType, ResolverType, IRegimeComponent, IRegimeFeatures, IRounding, ITreatment, ITaxRegime, ITaxCodeComponent, ITaxCode, ITaxComponent, ITaxSummaryLine, ITaxSummary, IWithholding, IWithholdingCalcInput, ITaxCalcLineInput, ITaxSummaryInput, IRoundingConfig, IInclusiveResult, ITaxExemption, ITaxAuthority, IExternalProvider, } from "./tax";
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DebitNotePdfService = exports.DCWithoutPricePdfService = exports.DCLandscapeWithoutPricePdfService = exports.DCLandscapePdfService = exports.CustomerBalancesService = exports.SalesByCustomerPDFService = exports.CustWiseSalesDetailsService = exports.CreditNoteTotalsService = exports.CreditNotePdfService = exports.ConsultationPDFService = exports.ConsultationFullPrintService = exports.ConsultationFeeReceiptPrintService = exports.CNPrintService = exports.ChecklistsPDFService = exports.CheckListPrintService = exports.CategoryWiseItemPDFService = exports.SalesReceiptprintService = exports.AppointmentTotalsService = exports.AnalysisPDFService = exports.VenBalanceXlsxFileService = exports.TallySalesImportXlsxFileService = exports.StockXlsxFileService = exports.IssueSparesXlsxFileService = exports.ScheduledDrugXlsxFileService = exports.ScheduledDrugSummaryXlsxFileService = exports.SalesByServiceSummaryXlsxFileService = exports.SummaryXlsxFileService = exports.ServiceAdvisorWisePartXlsxFileService = exports.ServiceAdvisorWiseLaborXlsxFileService = exports.RepairOrdersXlsxFileService = exports.PaymentsMadeXlsxFileService = exports.PaymentReceiveXlsxFileService = exports.OperatorWiseSummaryXlsxFileService = exports.OperatorWiseDetailsXlsxFileService = exports.ManfWiseSalesXlsxFileService = exports.ItemsWiseSalesXlsxFileService = exports.ItemWiseMOSummaryXlsxFileService = exports.ItemWiseMODetailsXlsxFileService = exports.ItemWiseDoctorSaleXlsxFileService = exports.InvoicesWiseXlsxFileService = exports.InsuranceExpireXlsxFileService = exports.GSTR2ExcelService = exports.GSTR1ExcelService = exports.GSTROXlsxFileService = exports.ExpiringDrugsXlsxFileService = exports.SalesByCustomerXlsxFileService = exports.CustWiseSalesXlsxFileService = exports.CustBalanceXlsxFileService = exports.CategoryWiseItemXlsxFileService = exports.AnalysisXlsxFileService = void 0;
|
|
4
4
|
exports.TaskPDfService = exports.PrintSharedService = exports.SharedPDFService = exports.SharedInvoiceprintService = exports.WOPrintService = exports.ScheduledDrugSummaryPDFService = exports.ScheduledDrugPDFService = exports.SalesTotalsService = exports.SaleReceiptPrintService = exports.SalesReceiptpdfService = exports.SalesPrintService = exports.SalesPdfService = exports.SalesByServiceSummaryPDF = exports.ROTotalsService = exports.ROPrintService = exports.RoprintService = exports.RepairOrdersReportsPDFService = exports.ReorderPointPDFService = exports.ReceiptPrintService = exports.PurchaseOrderPDFService = exports.PurchaseOrderTotalsService = exports.PurchaseOrderPrintService = exports.PosReceiptPrintService = exports.POTotalsService = exports.PaymentsReportPDFService = exports.ReceiptPDFService = exports.PackShipPrintService = exports.PackShipPDFService = exports.OperatorWiseSalesSummaryPDF = exports.OperatorWiseSalesDetailsPDF = exports.MaterialOutprintService = exports.MeetingPdfService = exports.ManfWiseSalesService = exports.ItemWiseSalesPDFService = exports.ItemWiseMOSummaryPDF = exports.ItemWiseMODetailsPDF = exports.ItemWiseDoctorSalePDFService = exports.ItemDetaisPdf = exports.IssuePartsprintService = exports.InvoiceTotalsService = exports.InvoiceLandscapePdfService = exports.InsuranceExpirePDF = exports.ExpiringDrugPDFService = exports.EstPrintService = exports.EquipmentDesignPdf = exports.DeliveryChallanTotalsService = exports.DeliveryChallanPrintService = exports.DeliveryChallanPdfService = exports.DebitNoteTotalsService = exports.DebitNotePrintService = void 0;
|
|
5
5
|
exports.CreateInvoicePDFService = exports.CreateReceiptPDFService = exports.GetInvoicePrintInfo = exports.GetBillPdfDataUrl = exports.GetBillPDF = exports.GetInvoicePDF = exports.ProductWithoutOwnerPDFService = exports.ProductWithoutOwnerXlsxFileService = exports.Divide = exports.Multiply = exports.Subtract = exports.Add = exports.ServiceHistoryPDFService = exports.SalesTotalCalculationsWithDecimals = exports.GetNumber = exports.GetAgeString = exports.IsNull = exports.IsNotNull = exports.GetServicePriceForPriceList = exports.ApplyServicePriceListToOpcode = exports.ApplyServicePriceListToProcedure = exports.CalcItemFinalSalePrice = exports.GetItemPriceForPriceList = exports.SalesReceiveTotalsService = exports.SalesReceivePrintService = exports.SalesReceivePdfService = exports.AdjustmentDrugPDFService = exports.HSNSummaryPDFService = exports.HSNSummaryExcelService = exports.ItemBarCodeLabelPdf = exports.NextServiceDatePDFService = exports.NextServiceDateXlsxFileService = exports.ConsultationLetterHeadPDFService = exports.InvoiceLetterheadPdfService = exports.InvoicePortraitPrintService = exports.HCInvoiceprintService = exports.InvoiceprintService = exports.MyDate = exports.TrUtils = exports.VendorDebitNoteTotalsService = exports.VendorDebitNotePrintService = exports.VendorDebitNotePdfService = exports.VendorCreditNoteTotalsService = exports.VendorCreditNotePrintService = exports.VendorCreditNotePDFService = exports.VendorBalancesService = exports.TransferOrderPrintService = exports.TechnicianPrintService = exports.TechnicianpdfService = exports.TaskReportsPDfService = void 0;
|
|
6
|
-
exports.ConvertFlatToTaxes = exports.ValidateHSNSACLength = exports.ValidateTaxId = exports.RoundAmount = exports.CalculateWithholding = exports.FindTaxCodeByRateAndSupplyType = exports.DetermineSupplyType = exports.ComputeTaxSummary = exports.SumTaxComponents = exports.ExtractNetFromInclusive = exports.CalculateLineTax = void 0;
|
|
6
|
+
exports.ConvertFlatToTaxes = exports.ValidateHSNSACLength = exports.ValidateTaxId = exports.RoundAmount = exports.CalculateWithholding = exports.FindTaxCodeByRateAndSupplyType = exports.DetermineSupplyType = exports.ComputeTaxSummary = exports.SumTaxComponents = exports.ExtractNetFromInclusive = exports.CalculateLineTax = exports.TaxTreatmentEnum = exports.CountryEnum = void 0;
|
|
7
7
|
var analysis_excel_service_1 = require("./accounting/invoice/reports/excel/analysis-excel.service");
|
|
8
8
|
Object.defineProperty(exports, "AnalysisXlsxFileService", { enumerable: true, get: function () { return analysis_excel_service_1.AnalysisXlsxFileService; } });
|
|
9
9
|
var category_wise_item_excel_service_1 = require("./accounting/invoice/reports/excel/category-wise-item-excel.service");
|
|
@@ -298,6 +298,10 @@ var receipt_pdf_service_1 = require("./accounting/payment-receive/payment-receip
|
|
|
298
298
|
Object.defineProperty(exports, "CreateReceiptPDFService", { enumerable: true, get: function () { return receipt_pdf_service_1.CreateReceiptPDFService; } });
|
|
299
299
|
var invoice_pdf_service_2 = require("./accounting/invoice/invoice-pdf/invoice-pdf.service");
|
|
300
300
|
Object.defineProperty(exports, "CreateInvoicePDFService", { enumerable: true, get: function () { return invoice_pdf_service_2.CreateInvoicePDFService; } });
|
|
301
|
+
var country_enums_1 = require("./enums/country-enums");
|
|
302
|
+
Object.defineProperty(exports, "CountryEnum", { enumerable: true, get: function () { return country_enums_1.CountryEnum; } });
|
|
303
|
+
var treatment_enums_1 = require("./enums/treatment-enums");
|
|
304
|
+
Object.defineProperty(exports, "TaxTreatmentEnum", { enumerable: true, get: function () { return treatment_enums_1.TaxTreatmentEnum; } });
|
|
301
305
|
// Tax System — Calculation functions
|
|
302
306
|
var tax_1 = require("./tax");
|
|
303
307
|
Object.defineProperty(exports, "CalculateLineTax", { enumerable: true, get: function () { return tax_1.CalculateLineTax; } });
|
|
@@ -86,11 +86,7 @@ function getRenderableColumns(headerConfig, sType = '') {
|
|
|
86
86
|
taxKind: 'rate',
|
|
87
87
|
dbField: 'IGST',
|
|
88
88
|
width: getTaxSubWidth(header.width),
|
|
89
|
-
}
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
if (isInter && hasTaxGroup && isTaxAmountHeader(header)) {
|
|
93
|
-
columns.push({
|
|
89
|
+
}, {
|
|
94
90
|
type: 'tax',
|
|
95
91
|
taxKind: 'amount',
|
|
96
92
|
dbField: 'IGST',
|
|
@@ -98,17 +94,25 @@ function getRenderableColumns(headerConfig, sType = '') {
|
|
|
98
94
|
});
|
|
99
95
|
continue;
|
|
100
96
|
}
|
|
101
|
-
|
|
97
|
+
// Tax Amt header is skipped for Inter when hasTaxGroup (IGST already handled by Tax%)
|
|
98
|
+
if (isInter && hasTaxGroup && isTaxAmountHeader(header)) {
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
if (isInter && !hasTaxGroup && isTaxPercentHeader(header)) {
|
|
102
102
|
columns.push({
|
|
103
103
|
type: 'tax',
|
|
104
104
|
taxKind: 'rate',
|
|
105
105
|
dbField: 'IGST',
|
|
106
|
-
width:
|
|
107
|
-
}
|
|
106
|
+
width: header.width,
|
|
107
|
+
});
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
if (isInter && !hasTaxGroup && isTaxAmountHeader(header)) {
|
|
111
|
+
columns.push({
|
|
108
112
|
type: 'tax',
|
|
109
113
|
taxKind: 'amount',
|
|
110
114
|
dbField: 'IGST',
|
|
111
|
-
width:
|
|
115
|
+
width: header.width,
|
|
112
116
|
});
|
|
113
117
|
continue;
|
|
114
118
|
}
|
|
@@ -194,6 +198,15 @@ function buildHeaderRows(headerConfig, sType = '') {
|
|
|
194
198
|
const subRow = [];
|
|
195
199
|
for (const header of headerConfig) {
|
|
196
200
|
// --- Inter / IGST ---
|
|
201
|
+
if (isInter && hasTaxGroup && isTaxPercentHeader(header)) {
|
|
202
|
+
topRow.push(Object.assign({ text: 'IGST', colSpan: 2, alignment: 'center' }, getHeaderCellStyle()), {});
|
|
203
|
+
subRow.push(Object.assign({ text: '%', alignment: 'center' }, getHeaderCellStyle()), Object.assign({ text: 'Amt', alignment: 'center' }, getHeaderCellStyle()));
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
// Tax Amt header is skipped for Inter when hasTaxGroup (IGST already handled by Tax%)
|
|
207
|
+
if (isInter && hasTaxGroup && isTaxAmountHeader(header)) {
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
197
210
|
if (isInter && !hasTaxGroup && isTaxPercentHeader(header)) {
|
|
198
211
|
topRow.push(Object.assign({ text: 'IGST %', rowSpan: 2, alignment: 'center' }, getHeaderCellStyle()));
|
|
199
212
|
subRow.push({});
|
|
@@ -204,11 +217,6 @@ function buildHeaderRows(headerConfig, sType = '') {
|
|
|
204
217
|
subRow.push({});
|
|
205
218
|
continue;
|
|
206
219
|
}
|
|
207
|
-
if (isInter && hasTaxGroup && (isTaxPercentHeader(header) || isTaxAmountHeader(header))) {
|
|
208
|
-
topRow.push(Object.assign({ text: 'IGST', colSpan: 2, alignment: 'center' }, getHeaderCellStyle()), {});
|
|
209
|
-
subRow.push(Object.assign({ text: '%', alignment: 'center' }, getHeaderCellStyle()), Object.assign({ text: 'Amt', alignment: 'center' }, getHeaderCellStyle()));
|
|
210
|
-
continue;
|
|
211
|
-
}
|
|
212
220
|
// --- Intra / CGST + SGST ---
|
|
213
221
|
if (!isInter && hasTaxGroup && isTaxPercentHeader(header)) {
|
|
214
222
|
topRow.push(Object.assign({ text: 'CGST', colSpan: 2, alignment: 'center' }, getHeaderCellStyle()), {});
|
|
@@ -268,7 +268,7 @@ function buildFallbackSectionTotalRow(fallbackHeaderRow, label, totals, fixedTo)
|
|
|
268
268
|
if (header.text === 'SGST' && header.taxKind === 'amount') {
|
|
269
269
|
return buildTotalValueCell(formatAmount(totals.sgstAmount, fixedTo));
|
|
270
270
|
}
|
|
271
|
-
if (header.text === 'IGST Amt'
|
|
271
|
+
if (header.text === 'IGST Amt') {
|
|
272
272
|
return buildTotalValueCell(formatAmount(totals.igstAmount, fixedTo));
|
|
273
273
|
}
|
|
274
274
|
if (header.text === 'Description') {
|