@tomei/finance 0.6.10 → 0.6.12
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/document/document.d.ts +1 -1
- package/dist/document/document.js +3 -3
- package/dist/document/document.js.map +1 -1
- package/dist/finance-company/finance-company.js +3 -3
- package/dist/finance-company/finance-company.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/document/document.ts +3 -0
- package/src/finance-company/finance-company.ts +3 -2
package/package.json
CHANGED
package/src/document/document.ts
CHANGED
|
@@ -896,6 +896,7 @@ export default class Document extends AccountSystemEntity {
|
|
|
896
896
|
async generateReceipt(
|
|
897
897
|
userId?: string,
|
|
898
898
|
customer?: FinanceCustomerBase,
|
|
899
|
+
transaction?: any,
|
|
899
900
|
): Promise<{
|
|
900
901
|
HTMLMedia: MediasModel;
|
|
901
902
|
PDFMedia: MediasModel;
|
|
@@ -920,6 +921,7 @@ export default class Document extends AccountSystemEntity {
|
|
|
920
921
|
await Document.DEFAULT_INVOICE_TEMPLATE_HTML(),
|
|
921
922
|
htmlPayload,
|
|
922
923
|
userId ?? 'System',
|
|
924
|
+
transaction,
|
|
923
925
|
);
|
|
924
926
|
|
|
925
927
|
/* insert FileStream on pdfPayload */
|
|
@@ -940,6 +942,7 @@ export default class Document extends AccountSystemEntity {
|
|
|
940
942
|
await this.DEFAULT_RECEIPT_TEMPLATE_PDF(customer),
|
|
941
943
|
pdfPayload,
|
|
942
944
|
userId ?? 'System',
|
|
945
|
+
transaction,
|
|
943
946
|
);
|
|
944
947
|
|
|
945
948
|
return {
|
|
@@ -1169,7 +1169,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
1169
1169
|
await FinanceCompany._DocumentRepository.findAll({
|
|
1170
1170
|
where: {
|
|
1171
1171
|
DocType: DocType.RECEIPT,
|
|
1172
|
-
CompanyId:
|
|
1172
|
+
CompanyId: this.ObjectId,
|
|
1173
1173
|
},
|
|
1174
1174
|
});
|
|
1175
1175
|
|
|
@@ -1182,7 +1182,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
1182
1182
|
}
|
|
1183
1183
|
receipt.DocType = DocType.RECEIPT;
|
|
1184
1184
|
receipt.DocDate = new Date();
|
|
1185
|
-
receipt.CompanyId =
|
|
1185
|
+
receipt.CompanyId = this.ObjectId;
|
|
1186
1186
|
receipt.Currency = payment.Currency;
|
|
1187
1187
|
receipt.Description = 'Payment Received';
|
|
1188
1188
|
receipt.IssuedById = loginUser.ObjectId;
|
|
@@ -1212,6 +1212,7 @@ export default class FinanceCompany extends ObjectBase {
|
|
|
1212
1212
|
const receiptMedia = await receipt.generateReceipt(
|
|
1213
1213
|
receipt.IssuedById,
|
|
1214
1214
|
customer,
|
|
1215
|
+
dbTransaction,
|
|
1215
1216
|
);
|
|
1216
1217
|
|
|
1217
1218
|
/*Saving the receipt document and document items to the database*/
|