@tomei/finance 0.3.64 → 0.3.66

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomei/finance",
3
- "version": "0.3.64",
3
+ "version": "0.3.66",
4
4
  "description": "NestJS package for finance module",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -244,4 +244,23 @@ export default abstract class FinanceCustomerBase
244
244
  );
245
245
  return data;
246
246
  }
247
+
248
+ static async isFinanceCustomerExist(
249
+ custSystemRefId: string,
250
+ custSystemCode: string,
251
+ sFinanceCompanyId: string,
252
+ ): Promise<boolean> {
253
+ const data = FinanceCustomerBase._FinanceCustomerRepository.findOne({
254
+ where: {
255
+ CustSystemRefId: custSystemRefId,
256
+ CustSystemCode: custSystemCode,
257
+ CompanyId: sFinanceCompanyId,
258
+ },
259
+ });
260
+
261
+ if (data) {
262
+ return true;
263
+ }
264
+ return false;
265
+ }
247
266
  }
@@ -603,6 +603,11 @@ export default class FinanceCompany extends ObjectBase {
603
603
 
604
604
  for (let i = 0; i < savedItems.length; i++) {
605
605
  const journalEntry = new JournalEntry(dbTransaction);
606
+ //Temporary fix to successfully save journal entry in PostJournal
607
+ journalEntry.init({
608
+ CompanyId: this.CompanyId,
609
+ Name: 'Issue Invoice ' + invoice.DocNo,
610
+ });
606
611
  const account = await Account.initAccount(
607
612
  dbTransaction,
608
613
  savedItems[i].value[0],