@tomei/finance 0.6.74 → 0.6.76
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/.commitlintrc.json +22 -22
- package/.eslintrc.js +72 -72
- package/.gitlab-ci.yml +16 -16
- package/.husky/commit-msg +4 -4
- package/.husky/pre-commit +4 -4
- package/.prettierrc +4 -4
- package/CONTRIBUTING.md +30 -30
- package/LICENSE +21 -21
- package/README.md +13 -13
- package/configs/config.js +348 -348
- package/dist/document/document.d.ts +1 -1
- package/dist/document/document.js +0 -1
- package/dist/document/document.js.map +1 -1
- package/dist/finance-company/finance-company.js +8 -3
- package/dist/finance-company/finance-company.js.map +1 -1
- package/dist/payment-item/payment-item.js +4 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/invoice-template/assets/css/style.css.map +12 -12
- package/invoice-template/assets/css/style.min.css +1 -1
- package/invoice-template/assets/img/arrow_bg.svg +11 -11
- package/invoice-template/assets/img/coffy_shop_img.svg +18 -18
- package/invoice-template/assets/img/logo_accent.svg +3 -3
- package/invoice-template/assets/img/logo_white.svg +4 -4
- package/invoice-template/assets/img/sign.svg +12 -12
- package/invoice-template/assets/img/tomei-logo.svg +9 -9
- package/invoice-template/assets/js/html2canvas.min.js +10379 -10379
- package/invoice-template/assets/js/jquery.min.js +1 -1
- package/invoice-template/assets/sass/common/_color_variable.scss +12 -12
- package/invoice-template/assets/sass/common/_typography.scss +178 -178
- package/invoice-template/assets/sass/style.scss +12 -12
- package/migrations/finance-account-migration.js +97 -97
- package/migrations/finance-company-migration.js +29 -29
- package/migrations/finance-customer-migration.js +51 -51
- package/migrations/finance-document-item-migration.js +111 -111
- package/migrations/finance-document-migration.js +122 -122
- package/migrations/finance-journal-entry-migration.js +59 -59
- package/migrations/finance-ledger-transaction-migration.js +89 -89
- package/migrations/finance-payment-item-migration.js +52 -52
- package/migrations/finance-payment-method-migration.js +31 -31
- package/migrations/finance-payment-method-type-migration.js +55 -55
- package/migrations/finance-payment-migration.js +96 -96
- package/migrations/finance-post-history-migration.js +45 -45
- package/migrations/finance-tax-migration.js +52 -52
- package/migrations/refactor-finance-document-migration.js +71 -71
- package/nest-cli.json +19 -19
- package/package.json +82 -82
- package/sonar-project.properties +12 -12
- package/src/account/account.repository.ts +11 -11
- package/src/account/account.ts +276 -276
- package/src/account/interfaces/account-attr.interface.ts +31 -31
- package/src/account-system-entity/account-system-entity.ts +66 -66
- package/src/account-system-entity/post-history.repository.ts +11 -11
- package/src/config.ts +382 -382
- package/src/customer/customer.ts +299 -299
- package/src/customer/finance-customer.repository.ts +13 -13
- package/src/customer/interfaces/customer.repository.interface.ts +3 -3
- package/src/customer/interfaces/finance-customer-attr.interface.ts +10 -10
- package/src/customer/interfaces/finance-customer.repository.interface.ts +4 -4
- package/src/database.ts +48 -48
- package/src/document/document-item.repository.ts +11 -11
- package/src/document/document.repository.ts +11 -11
- package/src/document/document.ts +29 -22
- package/src/document/interfaces/document-attr.interface.ts +28 -28
- package/src/document/interfaces/document-item-attr.interface.ts +22 -22
- package/src/document/interfaces/document-item.repository.interface.ts +4 -4
- package/src/enum/collect-payment-type.ts +3 -3
- package/src/enum/doc-type.enum.ts +8 -8
- package/src/enum/index.ts +19 -19
- package/src/enum/payment-method.enum.ts +3 -3
- package/src/enum/payment-type.enum.ts +4 -4
- package/src/enum/quick-book-client-scopes.enum.ts +14 -14
- package/src/finance-company/finance-company.repository.ts +11 -11
- package/src/finance-company/finance-company.ts +2227 -2218
- package/src/helpers/login-user.ts +38 -38
- package/src/helpers/typeof.ts +35 -35
- package/src/index.ts +32 -32
- package/src/interfaces/account-system.interface.ts +20 -20
- package/src/interfaces/index.ts +3 -3
- package/src/models/account.entity.ts +206 -206
- package/src/models/customer.entity.ts +93 -93
- package/src/models/document-item.entity.ts +143 -143
- package/src/models/document.entity.ts +211 -211
- package/src/models/finance-company.entity.ts +29 -29
- package/src/models/journal-entry.entity.ts +110 -110
- package/src/models/ledger-transaction.entity.ts +148 -148
- package/src/models/payment-item.entity.ts +60 -60
- package/src/models/payment-method-type.entity.ts +70 -70
- package/src/models/payment-method.entity.ts +51 -51
- package/src/models/payment.entity.ts +165 -165
- package/src/models/post-history.entity.ts +41 -41
- package/src/models/tax.entity.ts +75 -75
- package/src/payment/interfaces/payment-attr.interface.ts +23 -23
- package/src/payment/interfaces/payment-params.interface.ts +8 -8
- package/src/payment/payment.repository.ts +11 -11
- package/src/payment/payment.ts +236 -236
- package/src/payment-item/interfaces/payment-item-attr.interface.ts +10 -10
- package/src/payment-item/payment-item.repository.ts +11 -11
- package/src/payment-item/payment-item.ts +134 -134
- package/src/payment-method/payment-method.repository.ts +11 -11
- package/src/payment-method-type/payment-method-type.repository.ts +11 -11
- package/src/tax/interfaces/tax-attr.interface.ts +10 -10
- package/src/tax/tax.repository.ts +11 -11
- package/src/tax/tax.ts +69 -69
- package/src/test-document.ts +25 -25
- package/src/test.ts +3 -3
- package/tsconfig.build.json +4 -4
- package/tsconfig.json +22 -22
- package/tslint.json +18 -18
package/src/database.ts
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { Sequelize, SequelizeOptions } from 'sequelize-typescript';
|
|
2
|
-
import AccountModel from './models/account.entity';
|
|
3
|
-
import FinanceCustomerModel from './models/customer.entity';
|
|
4
|
-
import DocumentItemModel from './models/document-item.entity';
|
|
5
|
-
import DocumentModel from './models/document.entity';
|
|
6
|
-
import FinanceCompanyModel from './models/finance-company.entity';
|
|
7
|
-
import JournalEntryModel from './models/journal-entry.entity';
|
|
8
|
-
import LedgerTransactionModel from './models/ledger-transaction.entity';
|
|
9
|
-
import PaymentItemModel from './models/payment-item.entity';
|
|
10
|
-
import PaymentMethodTypeModel from './models/payment-method-type.entity';
|
|
11
|
-
import PaymentMethodModel from './models/payment-method.entity';
|
|
12
|
-
import PaymentPaidWithModel from './models/payment-paid-with.entity';
|
|
13
|
-
import PaymentModel from './models/payment.entity';
|
|
14
|
-
import FinancePostHistoryModel from './models/post-history.entity';
|
|
15
|
-
import { MediasModel } from '@tomei/media';
|
|
16
|
-
import ActivityHistoryModel from '@tomei/activity-history/dist/src/models/activity-history.entity';
|
|
17
|
-
import FinanceTaxModel from './models/tax.entity';
|
|
18
|
-
|
|
19
|
-
let sequelize: Sequelize;
|
|
20
|
-
|
|
21
|
-
function init(sequelizeOptions: SequelizeOptions) {
|
|
22
|
-
sequelize = new Sequelize(sequelizeOptions);
|
|
23
|
-
|
|
24
|
-
sequelize.addModels([
|
|
25
|
-
AccountModel,
|
|
26
|
-
FinanceCustomerModel,
|
|
27
|
-
DocumentItemModel,
|
|
28
|
-
DocumentModel,
|
|
29
|
-
FinanceCompanyModel,
|
|
30
|
-
JournalEntryModel,
|
|
31
|
-
LedgerTransactionModel,
|
|
32
|
-
PaymentItemModel,
|
|
33
|
-
PaymentMethodTypeModel,
|
|
34
|
-
PaymentMethodModel,
|
|
35
|
-
PaymentPaidWithModel,
|
|
36
|
-
PaymentModel,
|
|
37
|
-
FinancePostHistoryModel,
|
|
38
|
-
MediasModel,
|
|
39
|
-
ActivityHistoryModel,
|
|
40
|
-
FinanceTaxModel,
|
|
41
|
-
]);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function getConnection() {
|
|
45
|
-
return sequelize;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export { init, getConnection };
|
|
1
|
+
import { Sequelize, SequelizeOptions } from 'sequelize-typescript';
|
|
2
|
+
import AccountModel from './models/account.entity';
|
|
3
|
+
import FinanceCustomerModel from './models/customer.entity';
|
|
4
|
+
import DocumentItemModel from './models/document-item.entity';
|
|
5
|
+
import DocumentModel from './models/document.entity';
|
|
6
|
+
import FinanceCompanyModel from './models/finance-company.entity';
|
|
7
|
+
import JournalEntryModel from './models/journal-entry.entity';
|
|
8
|
+
import LedgerTransactionModel from './models/ledger-transaction.entity';
|
|
9
|
+
import PaymentItemModel from './models/payment-item.entity';
|
|
10
|
+
import PaymentMethodTypeModel from './models/payment-method-type.entity';
|
|
11
|
+
import PaymentMethodModel from './models/payment-method.entity';
|
|
12
|
+
import PaymentPaidWithModel from './models/payment-paid-with.entity';
|
|
13
|
+
import PaymentModel from './models/payment.entity';
|
|
14
|
+
import FinancePostHistoryModel from './models/post-history.entity';
|
|
15
|
+
import { MediasModel } from '@tomei/media';
|
|
16
|
+
import ActivityHistoryModel from '@tomei/activity-history/dist/src/models/activity-history.entity';
|
|
17
|
+
import FinanceTaxModel from './models/tax.entity';
|
|
18
|
+
|
|
19
|
+
let sequelize: Sequelize;
|
|
20
|
+
|
|
21
|
+
function init(sequelizeOptions: SequelizeOptions) {
|
|
22
|
+
sequelize = new Sequelize(sequelizeOptions);
|
|
23
|
+
|
|
24
|
+
sequelize.addModels([
|
|
25
|
+
AccountModel,
|
|
26
|
+
FinanceCustomerModel,
|
|
27
|
+
DocumentItemModel,
|
|
28
|
+
DocumentModel,
|
|
29
|
+
FinanceCompanyModel,
|
|
30
|
+
JournalEntryModel,
|
|
31
|
+
LedgerTransactionModel,
|
|
32
|
+
PaymentItemModel,
|
|
33
|
+
PaymentMethodTypeModel,
|
|
34
|
+
PaymentMethodModel,
|
|
35
|
+
PaymentPaidWithModel,
|
|
36
|
+
PaymentModel,
|
|
37
|
+
FinancePostHistoryModel,
|
|
38
|
+
MediasModel,
|
|
39
|
+
ActivityHistoryModel,
|
|
40
|
+
FinanceTaxModel,
|
|
41
|
+
]);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function getConnection() {
|
|
45
|
+
return sequelize;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { init, getConnection };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { RepositoryBase, IRepositoryBase } from '@tomei/general';
|
|
2
|
-
import DocumentItemModel from '../models/document-item.entity';
|
|
3
|
-
|
|
4
|
-
export class DocumentItemRepository
|
|
5
|
-
extends RepositoryBase<DocumentItemModel>
|
|
6
|
-
implements IRepositoryBase<DocumentItemModel>
|
|
7
|
-
{
|
|
8
|
-
constructor() {
|
|
9
|
-
super(DocumentItemModel);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
import { RepositoryBase, IRepositoryBase } from '@tomei/general';
|
|
2
|
+
import DocumentItemModel from '../models/document-item.entity';
|
|
3
|
+
|
|
4
|
+
export class DocumentItemRepository
|
|
5
|
+
extends RepositoryBase<DocumentItemModel>
|
|
6
|
+
implements IRepositoryBase<DocumentItemModel>
|
|
7
|
+
{
|
|
8
|
+
constructor() {
|
|
9
|
+
super(DocumentItemModel);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { RepositoryBase, IRepositoryBase } from '@tomei/general';
|
|
2
|
-
import DocumentModel from '../models/document.entity';
|
|
3
|
-
|
|
4
|
-
export class DocumentRepository
|
|
5
|
-
extends RepositoryBase<DocumentModel>
|
|
6
|
-
implements IRepositoryBase<DocumentModel>
|
|
7
|
-
{
|
|
8
|
-
constructor() {
|
|
9
|
-
super(DocumentModel);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
import { RepositoryBase, IRepositoryBase } from '@tomei/general';
|
|
2
|
+
import DocumentModel from '../models/document.entity';
|
|
3
|
+
|
|
4
|
+
export class DocumentRepository
|
|
5
|
+
extends RepositoryBase<DocumentModel>
|
|
6
|
+
implements IRepositoryBase<DocumentModel>
|
|
7
|
+
{
|
|
8
|
+
constructor() {
|
|
9
|
+
super(DocumentModel);
|
|
10
|
+
}
|
|
11
|
+
}
|
package/src/document/document.ts
CHANGED
|
@@ -115,7 +115,7 @@ export default class Document extends AccountSystemEntity {
|
|
|
115
115
|
return this._Status;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
public set Status(status: DocumentStatus) {
|
|
119
119
|
this._Status = status;
|
|
120
120
|
}
|
|
121
121
|
|
|
@@ -349,18 +349,21 @@ export default class Document extends AccountSystemEntity {
|
|
|
349
349
|
updatedStatus = DocumentStatus.PARTIALSETTLED;
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
-
//Call Document._Repo update method
|
|
353
|
-
await this._RepositoryBase.update(
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
where: {
|
|
360
|
-
DocNo: document.DocNo,
|
|
352
|
+
//Call Document._Repo update method
|
|
353
|
+
await this._RepositoryBase.update(
|
|
354
|
+
{
|
|
355
|
+
Amount: AmountToReduce,
|
|
356
|
+
Status: updatedStatus,
|
|
357
|
+
UpdatedAt: document.UpdatedAt,
|
|
358
|
+
UpdatedById: document.UpdatedById,
|
|
361
359
|
},
|
|
362
|
-
|
|
363
|
-
|
|
360
|
+
{
|
|
361
|
+
where: {
|
|
362
|
+
DocNo: document.DocNo,
|
|
363
|
+
},
|
|
364
|
+
transaction: dbTransaction,
|
|
365
|
+
},
|
|
366
|
+
);
|
|
364
367
|
|
|
365
368
|
const UpdatedDocument = await this.initDocument(dbTransaction, DocNo);
|
|
366
369
|
|
|
@@ -391,8 +394,8 @@ export default class Document extends AccountSystemEntity {
|
|
|
391
394
|
PostedById: UpdatedDocument.PostedById,
|
|
392
395
|
PostedDateTime: UpdatedDocument.PostedDateTime,
|
|
393
396
|
UseAccSystemDocYN: UpdatedDocument.UseAccSystemDocYN,
|
|
394
|
-
}
|
|
395
|
-
//Instantiate new activity
|
|
397
|
+
};
|
|
398
|
+
//Instantiate new activity
|
|
396
399
|
const activity = new Activity();
|
|
397
400
|
activity.ActivityId = activity.createId();
|
|
398
401
|
activity.Action = ActionEnum.UPDATE;
|
|
@@ -624,11 +627,13 @@ export default class Document extends AccountSystemEntity {
|
|
|
624
627
|
<td class="tm_width_4">
|
|
625
628
|
${documentItem.Description}
|
|
626
629
|
</td>
|
|
627
|
-
<td class="tm_width_2">${documentItem.Currency} ${
|
|
628
|
-
|
|
630
|
+
<td class="tm_width_2">${documentItem.Currency} ${
|
|
631
|
+
documentItem.UnitPrice
|
|
632
|
+
}</td>
|
|
629
633
|
<td class="tm_width_1">${documentItem.Quantity}</td>
|
|
630
|
-
<td class="tm_width_2 tm_text_right">${documentItem.Currency} ${
|
|
631
|
-
|
|
634
|
+
<td class="tm_width_2 tm_text_right">${documentItem.Currency} ${
|
|
635
|
+
+documentItem.UnitPrice * +documentItem.Quantity
|
|
636
|
+
}</td>
|
|
632
637
|
</tr>
|
|
633
638
|
`;
|
|
634
639
|
});
|
|
@@ -843,11 +848,13 @@ export default class Document extends AccountSystemEntity {
|
|
|
843
848
|
<td class="tm_width_4">
|
|
844
849
|
${documentItem.Description}
|
|
845
850
|
</td>
|
|
846
|
-
<td class="tm_width_2">${documentItem.Currency} ${
|
|
847
|
-
|
|
851
|
+
<td class="tm_width_2">${documentItem.Currency} ${
|
|
852
|
+
documentItem.UnitPrice
|
|
853
|
+
}</td>
|
|
848
854
|
<td class="tm_width_1">${documentItem.Quantity}</td>
|
|
849
|
-
<td class="tm_width_2 tm_text_right">${documentItem.Currency} ${
|
|
850
|
-
|
|
855
|
+
<td class="tm_width_2 tm_text_right">${documentItem.Currency} ${
|
|
856
|
+
+documentItem.UnitPrice * +documentItem.Quantity
|
|
857
|
+
}</td>
|
|
851
858
|
</tr>
|
|
852
859
|
`;
|
|
853
860
|
});
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { DocType, DocumentStatus } from '../../enum';
|
|
2
|
-
|
|
3
|
-
export class IDocumentAttr {
|
|
4
|
-
DocNo: string;
|
|
5
|
-
DocType: DocType;
|
|
6
|
-
DocDate: Date;
|
|
7
|
-
CompanyId: string;
|
|
8
|
-
Currency: string;
|
|
9
|
-
Amount: number;
|
|
10
|
-
Description: string;
|
|
11
|
-
Status: DocumentStatus;
|
|
12
|
-
IssuedById: string;
|
|
13
|
-
IssuedToId: string;
|
|
14
|
-
IssuedToType: string;
|
|
15
|
-
RelatedObjectId?: string;
|
|
16
|
-
RelatedObjectType?: string;
|
|
17
|
-
CreatedById: string;
|
|
18
|
-
CreatedAt: Date;
|
|
19
|
-
UpdatedById?: string;
|
|
20
|
-
UpdatedAt?: Date;
|
|
21
|
-
DocPDFFileMediaId?: string;
|
|
22
|
-
DocHTMLFileMediaId?: string;
|
|
23
|
-
AccSystemRefId?: string;
|
|
24
|
-
PostedToAccSystemYN: string;
|
|
25
|
-
PostedById?: string;
|
|
26
|
-
PostedDateTime?: Date;
|
|
27
|
-
UseAccSystemDocYN: string;
|
|
28
|
-
}
|
|
1
|
+
import { DocType, DocumentStatus } from '../../enum';
|
|
2
|
+
|
|
3
|
+
export class IDocumentAttr {
|
|
4
|
+
DocNo: string;
|
|
5
|
+
DocType: DocType;
|
|
6
|
+
DocDate: Date;
|
|
7
|
+
CompanyId: string;
|
|
8
|
+
Currency: string;
|
|
9
|
+
Amount: number;
|
|
10
|
+
Description: string;
|
|
11
|
+
Status: DocumentStatus;
|
|
12
|
+
IssuedById: string;
|
|
13
|
+
IssuedToId: string;
|
|
14
|
+
IssuedToType: string;
|
|
15
|
+
RelatedObjectId?: string;
|
|
16
|
+
RelatedObjectType?: string;
|
|
17
|
+
CreatedById: string;
|
|
18
|
+
CreatedAt: Date;
|
|
19
|
+
UpdatedById?: string;
|
|
20
|
+
UpdatedAt?: Date;
|
|
21
|
+
DocPDFFileMediaId?: string;
|
|
22
|
+
DocHTMLFileMediaId?: string;
|
|
23
|
+
AccSystemRefId?: string;
|
|
24
|
+
PostedToAccSystemYN: string;
|
|
25
|
+
PostedById?: string;
|
|
26
|
+
PostedDateTime?: Date;
|
|
27
|
+
UseAccSystemDocYN: string;
|
|
28
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export class IDocumentItemAttr {
|
|
2
|
-
DocumentItemId: string;
|
|
3
|
-
DocNo: string;
|
|
4
|
-
Name: string;
|
|
5
|
-
NameBM: string;
|
|
6
|
-
Description?: string;
|
|
7
|
-
ItemId?: string;
|
|
8
|
-
ItemType?: string;
|
|
9
|
-
ItemSKU?: string;
|
|
10
|
-
ItemSerialNo?: string;
|
|
11
|
-
Currency: string;
|
|
12
|
-
UnitPrice?: number;
|
|
13
|
-
Quantity?: number;
|
|
14
|
-
QuantityUOM?: string;
|
|
15
|
-
Amount: number;
|
|
16
|
-
TaxCode?: string;
|
|
17
|
-
TaxAmount?: number;
|
|
18
|
-
TaxRate?: number;
|
|
19
|
-
TaxInclusiveYN?: string;
|
|
20
|
-
DtAccountNo?: string;
|
|
21
|
-
CtAccountNo?: string;
|
|
22
|
-
}
|
|
1
|
+
export class IDocumentItemAttr {
|
|
2
|
+
DocumentItemId: string;
|
|
3
|
+
DocNo: string;
|
|
4
|
+
Name: string;
|
|
5
|
+
NameBM: string;
|
|
6
|
+
Description?: string;
|
|
7
|
+
ItemId?: string;
|
|
8
|
+
ItemType?: string;
|
|
9
|
+
ItemSKU?: string;
|
|
10
|
+
ItemSerialNo?: string;
|
|
11
|
+
Currency: string;
|
|
12
|
+
UnitPrice?: number;
|
|
13
|
+
Quantity?: number;
|
|
14
|
+
QuantityUOM?: string;
|
|
15
|
+
Amount: number;
|
|
16
|
+
TaxCode?: string;
|
|
17
|
+
TaxAmount?: number;
|
|
18
|
+
TaxRate?: number;
|
|
19
|
+
TaxInclusiveYN?: string;
|
|
20
|
+
DtAccountNo?: string;
|
|
21
|
+
CtAccountNo?: string;
|
|
22
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IRepositoryBase } from '@tomei/general';
|
|
2
|
-
import DocumentItemModel from '../../models/document-item.entity';
|
|
3
|
-
|
|
4
|
-
export type IDocumentItemRepository = IRepositoryBase<DocumentItemModel>;
|
|
1
|
+
import { IRepositoryBase } from '@tomei/general';
|
|
2
|
+
import DocumentItemModel from '../../models/document-item.entity';
|
|
3
|
+
|
|
4
|
+
export type IDocumentItemRepository = IRepositoryBase<DocumentItemModel>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export enum CollectPaymentType {
|
|
2
|
-
MANUAL = 'MANUAL',
|
|
3
|
-
AUTOMATIC = 'AUTOMATIC'
|
|
1
|
+
export enum CollectPaymentType {
|
|
2
|
+
MANUAL = 'MANUAL',
|
|
3
|
+
AUTOMATIC = 'AUTOMATIC'
|
|
4
4
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export enum DocType {
|
|
2
|
-
INVOICE = 'Invoice',
|
|
3
|
-
DEBIT_NOTE = 'Debit Note',
|
|
4
|
-
CREDIT_NOTE = 'Credit Note',
|
|
5
|
-
QUOTATION = 'Quotation',
|
|
6
|
-
PURCHASEORDER = 'Purchase Order',
|
|
7
|
-
RECEIPT = 'Receipt',
|
|
8
|
-
}
|
|
1
|
+
export enum DocType {
|
|
2
|
+
INVOICE = 'Invoice',
|
|
3
|
+
DEBIT_NOTE = 'Debit Note',
|
|
4
|
+
CREDIT_NOTE = 'Credit Note',
|
|
5
|
+
QUOTATION = 'Quotation',
|
|
6
|
+
PURCHASEORDER = 'Purchase Order',
|
|
7
|
+
RECEIPT = 'Receipt',
|
|
8
|
+
}
|
package/src/enum/index.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ClientScopes } from './quick-book-client-scopes.enum';
|
|
2
|
-
import { PaymentType } from './payment-type.enum';
|
|
3
|
-
import { PaymentMethod } from './payment-method.enum';
|
|
4
|
-
import { TransactionTypeOptions } from './transaction-type.enum';
|
|
5
|
-
import { DocType } from './doc-type.enum';
|
|
6
|
-
import { DocumentStatus } from './document-status.enum';
|
|
7
|
-
import { PaymentStatus } from './payment-status.enum';
|
|
8
|
-
import { PaymentPaidWithStatus } from './payment-status.enum';
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
ClientScopes,
|
|
12
|
-
PaymentType,
|
|
13
|
-
PaymentMethod,
|
|
14
|
-
TransactionTypeOptions,
|
|
15
|
-
DocType,
|
|
16
|
-
DocumentStatus,
|
|
17
|
-
PaymentStatus,
|
|
18
|
-
PaymentPaidWithStatus,
|
|
19
|
-
};
|
|
1
|
+
import { ClientScopes } from './quick-book-client-scopes.enum';
|
|
2
|
+
import { PaymentType } from './payment-type.enum';
|
|
3
|
+
import { PaymentMethod } from './payment-method.enum';
|
|
4
|
+
import { TransactionTypeOptions } from './transaction-type.enum';
|
|
5
|
+
import { DocType } from './doc-type.enum';
|
|
6
|
+
import { DocumentStatus } from './document-status.enum';
|
|
7
|
+
import { PaymentStatus } from './payment-status.enum';
|
|
8
|
+
import { PaymentPaidWithStatus } from './payment-status.enum';
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
ClientScopes,
|
|
12
|
+
PaymentType,
|
|
13
|
+
PaymentMethod,
|
|
14
|
+
TransactionTypeOptions,
|
|
15
|
+
DocType,
|
|
16
|
+
DocumentStatus,
|
|
17
|
+
PaymentStatus,
|
|
18
|
+
PaymentPaidWithStatus,
|
|
19
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export enum PaymentMethod {
|
|
2
|
-
Cash = 'Cash', // example
|
|
3
|
-
}
|
|
1
|
+
export enum PaymentMethod {
|
|
2
|
+
Cash = 'Cash', // example
|
|
3
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export enum PaymentType {
|
|
2
|
-
PAYMENT_RECEIVED = 'Payment Received',
|
|
3
|
-
PAYOUT = 'Payout',
|
|
4
|
-
}
|
|
1
|
+
export enum PaymentType {
|
|
2
|
+
PAYMENT_RECEIVED = 'Payment Received',
|
|
3
|
+
PAYOUT = 'Payout',
|
|
4
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as OAuthClient from 'intuit-oauth';
|
|
2
|
-
export enum ClientScopes {
|
|
3
|
-
ACCOUNTING = OAuthClient.scopes.Accounting,
|
|
4
|
-
PAYMENT = OAuthClient.scopes.Payment,
|
|
5
|
-
PAYROLL = OAuthClient.scopes.Payroll,
|
|
6
|
-
TIMETRACKING = OAuthClient.scopes.TimeTracking,
|
|
7
|
-
BENEFITS = OAuthClient.scopes.Benefits,
|
|
8
|
-
PROFILE = OAuthClient.scopes.Profile,
|
|
9
|
-
EMAIL = OAuthClient.scopes.Email,
|
|
10
|
-
PHONE = OAuthClient.scopes.Phone,
|
|
11
|
-
ADDRESS = OAuthClient.scopes.Address,
|
|
12
|
-
OPENID = OAuthClient.scopes.OpenId,
|
|
13
|
-
INTUIT_NAME = OAuthClient.scopes.Intuit_name,
|
|
14
|
-
}
|
|
1
|
+
import * as OAuthClient from 'intuit-oauth';
|
|
2
|
+
export enum ClientScopes {
|
|
3
|
+
ACCOUNTING = OAuthClient.scopes.Accounting,
|
|
4
|
+
PAYMENT = OAuthClient.scopes.Payment,
|
|
5
|
+
PAYROLL = OAuthClient.scopes.Payroll,
|
|
6
|
+
TIMETRACKING = OAuthClient.scopes.TimeTracking,
|
|
7
|
+
BENEFITS = OAuthClient.scopes.Benefits,
|
|
8
|
+
PROFILE = OAuthClient.scopes.Profile,
|
|
9
|
+
EMAIL = OAuthClient.scopes.Email,
|
|
10
|
+
PHONE = OAuthClient.scopes.Phone,
|
|
11
|
+
ADDRESS = OAuthClient.scopes.Address,
|
|
12
|
+
OPENID = OAuthClient.scopes.OpenId,
|
|
13
|
+
INTUIT_NAME = OAuthClient.scopes.Intuit_name,
|
|
14
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { RepositoryBase, IRepositoryBase } from '@tomei/general';
|
|
2
|
-
import FinanceCompanyModel from '../models/finance-company.entity';
|
|
3
|
-
|
|
4
|
-
export class FinanceCompanyRepository
|
|
5
|
-
extends RepositoryBase<FinanceCompanyModel>
|
|
6
|
-
implements IRepositoryBase<FinanceCompanyModel>
|
|
7
|
-
{
|
|
8
|
-
constructor() {
|
|
9
|
-
super(FinanceCompanyModel);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
import { RepositoryBase, IRepositoryBase } from '@tomei/general';
|
|
2
|
+
import FinanceCompanyModel from '../models/finance-company.entity';
|
|
3
|
+
|
|
4
|
+
export class FinanceCompanyRepository
|
|
5
|
+
extends RepositoryBase<FinanceCompanyModel>
|
|
6
|
+
implements IRepositoryBase<FinanceCompanyModel>
|
|
7
|
+
{
|
|
8
|
+
constructor() {
|
|
9
|
+
super(FinanceCompanyModel);
|
|
10
|
+
}
|
|
11
|
+
}
|