shareneus 1.4.60 → 1.4.62
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.
|
@@ -70,7 +70,7 @@ class HCInvoiceprintService {
|
|
|
70
70
|
static CommonHeaderDetails(ROPrintData, text, isotherIndustry) {
|
|
71
71
|
return [
|
|
72
72
|
this.GetMainHeaderDetails(ROPrintData.Entity, ROPrintData.HeaderName, ROPrintData.Image, ROPrintData.HColor, ROPrintData.AColor, text),
|
|
73
|
-
shared_pdf_service_1.SharedPDFService.GetCustomerAndVehicleDetails(ROPrintData._id, ROPrintData.CrDate, ROPrintData.PrDate, ROPrintData.MOut, ROPrintData.MIn, ROPrintData.Product, ROPrintData.PrintType, ROPrintData.For, ROPrintData.SurName, ROPrintData.SurPhone, ROPrintData.Type, ROPrintData.SurEmail, ROPrintData.InsComp, ROPrintData.PolNo, ROPrintData.PolType, ROPrintData.Customer, ROPrintData.IsProforma, null, ROPrintData.Location, isotherIndustry, ROPrintData.BL, ROPrintData.ROCode, ROPrintData.TypeName, ROPrintData.AdmNo, ROPrintData.DoS),
|
|
73
|
+
shared_pdf_service_1.SharedPDFService.GetCustomerAndVehicleDetails(ROPrintData._id, ROPrintData.CrDate, ROPrintData.PrDate, ROPrintData.MOut, ROPrintData.MIn, ROPrintData.Product, ROPrintData.PrintType, ROPrintData.For, ROPrintData.SurName, ROPrintData.SurPhone, ROPrintData.Type, ROPrintData.SurEmail, ROPrintData.InsComp, ROPrintData.PolNo, ROPrintData.PolType, ROPrintData.Customer, ROPrintData.IsProforma, null, ROPrintData.Location, isotherIndustry, ROPrintData.BL, ROPrintData.ROCode, ROPrintData.TypeName, ROPrintData.AdmNo, ROPrintData.DoS, ROPrintData.Entity.PrCustBar),
|
|
74
74
|
shared_pdf_service_1.SharedPDFService.GetOwnerDetails(ROPrintData.Cust, ROPrintData.Type, ROPrintData.For),
|
|
75
75
|
this.CustomerAndVehicleDetailsAfterLine(),
|
|
76
76
|
shared_pdf_service_1.SharedPDFService.GetDisplayTable(),
|
|
@@ -334,9 +334,11 @@ class InvPrintService {
|
|
|
334
334
|
return InvoicePrintData;
|
|
335
335
|
}
|
|
336
336
|
static GetBillNameForInvoicePrint(argInvoiceData, InvoicePrintData) {
|
|
337
|
+
var _a;
|
|
337
338
|
let Customer = {};
|
|
338
339
|
if (!tr_utils_1.TrUtils.IsNull(argInvoiceData.BillTo)) {
|
|
339
340
|
Customer.Name = argInvoiceData.BillTo.Name;
|
|
341
|
+
Customer.Code = (_a = argInvoiceData.Cust) === null || _a === void 0 ? void 0 : _a.Code;
|
|
340
342
|
Customer.Adrs = [];
|
|
341
343
|
Customer.Cons = [];
|
|
342
344
|
if (!tr_utils_1.TrUtils.IsNull(argInvoiceData.BillTo.Adrs)) {
|
|
@@ -368,6 +370,7 @@ class InvPrintService {
|
|
|
368
370
|
}
|
|
369
371
|
else if (!tr_utils_1.TrUtils.IsNull(argInvoiceData.Cust)) {
|
|
370
372
|
Customer.Name = argInvoiceData.Cust.Name;
|
|
373
|
+
Customer.Code = argInvoiceData.Cust.Code;
|
|
371
374
|
Customer.Adrs = [];
|
|
372
375
|
Customer.Cons = [];
|
|
373
376
|
InvoicePrintData.Customer = Customer;
|
|
@@ -163,7 +163,7 @@ export declare class SharedPDFService {
|
|
|
163
163
|
layout: string;
|
|
164
164
|
};
|
|
165
165
|
static GetDataTable(data: any, istotal: boolean): any;
|
|
166
|
-
static GetCustomerAndVehicleDetails(Id: any, CrDate: any, PrDate: any, MOut: any, MIn: any, Vehicle: any, PrintType: any, For: any, SurName: any, SurPhone: any, Type: any, SurEmail: any, InsComp: any, PolNo: any, PolType: any, Customer: any, IsProforma: boolean, Settings: any, Location: any, isOtherIndustry: boolean, BL: any, ROCode: any, TypeName: any, AdmNo: any, DoS: any): {
|
|
166
|
+
static GetCustomerAndVehicleDetails(Id: any, CrDate: any, PrDate: any, MOut: any, MIn: any, Vehicle: any, PrintType: any, For: any, SurName: any, SurPhone: any, Type: any, SurEmail: any, InsComp: any, PolNo: any, PolType: any, Customer: any, IsProforma: boolean, Settings: any, Location: any, isOtherIndustry: boolean, BL: any, ROCode: any, TypeName: any, AdmNo: any, DoS: any, PrCustBar?: boolean): {
|
|
167
167
|
style: string;
|
|
168
168
|
marginLeft: number;
|
|
169
169
|
columns: ({
|
|
@@ -262,7 +262,7 @@ export declare class SharedPDFService {
|
|
|
262
262
|
width: number;
|
|
263
263
|
marginLeft: number;
|
|
264
264
|
};
|
|
265
|
-
static GetInsurence(For: any, SurName: any, SurPhone: any, Type: any, SurEmail: any, InsComp: any, PolNo: any, PolType: any, Location: any, isOtherIndustry: boolean): {
|
|
265
|
+
static GetInsurence(For: any, SurName: any, SurPhone: any, Type: any, SurEmail: any, InsComp: any, PolNo: any, PolType: any, Location: any, isOtherIndustry: boolean, Code?: any, PrCustBar?: boolean): {
|
|
266
266
|
stack: any[];
|
|
267
267
|
width: number;
|
|
268
268
|
marginRight: number;
|
|
@@ -273,6 +273,12 @@ export declare class SharedPDFService {
|
|
|
273
273
|
stack?: undefined;
|
|
274
274
|
marginRight?: undefined;
|
|
275
275
|
};
|
|
276
|
+
static GetBarCode(code: string, PrCustBar: boolean): {
|
|
277
|
+
svg: any;
|
|
278
|
+
} | {
|
|
279
|
+
svg?: undefined;
|
|
280
|
+
};
|
|
281
|
+
static textToSvgBarcode(text: string): any;
|
|
276
282
|
static GetVehicle(Type: any, Id: any, CrDate: any, PrDate: any, MOut: any, MIn: any, Vehicle: any, PrintType: any, For: any, IsProforma: boolean, Settings: any, isOtherIndustry: boolean, BL: any, ROCode: any, TypeName: any, AdmNo: any, DoS: any): {
|
|
277
283
|
stack: {
|
|
278
284
|
lineHeight: number;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.SharedPDFService = void 0;
|
|
7
|
+
const jsbarcode_1 = __importDefault(require("jsbarcode"));
|
|
4
8
|
const aggregation_1 = require("../aggregation/aggregation");
|
|
5
9
|
const enums_1 = require("../enums/enums");
|
|
6
10
|
const my_date_1 = require("../utils/my-date");
|
|
@@ -733,13 +737,13 @@ class SharedPDFService {
|
|
|
733
737
|
});
|
|
734
738
|
return body;
|
|
735
739
|
}
|
|
736
|
-
static GetCustomerAndVehicleDetails(Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, For, SurName, SurPhone, Type, SurEmail, InsComp, PolNo, PolType, Customer, IsProforma, Settings, Location, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS) {
|
|
740
|
+
static GetCustomerAndVehicleDetails(Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, For, SurName, SurPhone, Type, SurEmail, InsComp, PolNo, PolType, Customer, IsProforma, Settings, Location, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS, PrCustBar = false) {
|
|
737
741
|
return {
|
|
738
742
|
style: 'textcust',
|
|
739
743
|
marginLeft: 5,
|
|
740
744
|
columns: [
|
|
741
745
|
this.GetCustomer(Customer, Type, For, Vehicle, Settings, 'Bill To', isOtherIndustry),
|
|
742
|
-
this.GetInsurence(For, SurName, SurPhone, Type, SurEmail, InsComp, PolNo, PolType, Location, isOtherIndustry),
|
|
746
|
+
this.GetInsurence(For, SurName, SurPhone, Type, SurEmail, InsComp, PolNo, PolType, Location, isOtherIndustry, Customer.Code, PrCustBar),
|
|
743
747
|
this.GetVehicle(Type, Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, For, IsProforma, Settings, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS)
|
|
744
748
|
],
|
|
745
749
|
};
|
|
@@ -822,14 +826,33 @@ class SharedPDFService {
|
|
|
822
826
|
return { stack: [this.GetCustomerDetails(Customer, Type, Vehicle, Settings, Headding)], width: 230, marginLeft: 4 };
|
|
823
827
|
}
|
|
824
828
|
}
|
|
825
|
-
static GetInsurence(For, SurName, SurPhone, Type, SurEmail, InsComp, PolNo, PolType, Location, isOtherIndustry) {
|
|
829
|
+
static GetInsurence(For, SurName, SurPhone, Type, SurEmail, InsComp, PolNo, PolType, Location, isOtherIndustry, Code = null, PrCustBar = false) {
|
|
826
830
|
if (isOtherIndustry || ((For === enums_1.PayTypeEnum.Insurance) && Type !== 'Invoice')) {
|
|
827
831
|
return { stack: [this.GetInsurenceDetails(For, SurName, SurPhone, SurEmail, InsComp, PolNo, PolType, Type, Location, isOtherIndustry)], width: 210, marginRight: 2 };
|
|
828
832
|
}
|
|
833
|
+
else if (!tr_utils_1.TrUtils.IsNull(Code)) {
|
|
834
|
+
return { stack: [this.GetBarCode(Code, PrCustBar)], width: 210, marginRight: 2 };
|
|
835
|
+
}
|
|
829
836
|
else {
|
|
830
837
|
return { text: '', width: 70 };
|
|
831
838
|
}
|
|
832
839
|
}
|
|
840
|
+
static GetBarCode(code, PrCustBar) {
|
|
841
|
+
if (PrCustBar) {
|
|
842
|
+
return { svg: this.textToSvgBarcode(code).svg };
|
|
843
|
+
}
|
|
844
|
+
else {
|
|
845
|
+
return {};
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
static textToSvgBarcode(text) {
|
|
849
|
+
const svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
850
|
+
(0, jsbarcode_1.default)(svgElement, text, {
|
|
851
|
+
format: "CODE128", width: 1.25, height: 25, margin: 0, marginTop: 8,
|
|
852
|
+
displayValue: true, fontSize: 7, textMargin: 0, fontOptions: 'bold'
|
|
853
|
+
});
|
|
854
|
+
return { svg: svgElement.outerHTML };
|
|
855
|
+
}
|
|
833
856
|
static GetVehicle(Type, Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, For, IsProforma, Settings, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS) {
|
|
834
857
|
if (For === enums_1.PayTypeEnum.Insurance) {
|
|
835
858
|
return { stack: [this.GetVehicleDetails(Type, Id, CrDate, PrDate, MOut, MIn, Vehicle, PrintType, IsProforma, Settings, isOtherIndustry, BL, ROCode, TypeName, AdmNo, DoS)], width: 200 };
|