@accounter/server 0.0.8-alpha-20251028124234-328844c99a42b68aa9e2f32fd86da80b4832f631 → 0.0.8-alpha-20251028215142-58f2a3b66bb50de659a3b7d03ea774d2dabdc039
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/CHANGELOG.md +96 -4
- package/dist/server/src/__generated__/types.d.ts +28 -20
- package/dist/server/src/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/contracts/__generated__/contracts.types.d.ts +16 -2
- package/dist/server/src/modules/contracts/__generated__/types.d.ts +5 -4
- package/dist/server/src/modules/contracts/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/contracts/providers/contracts.provider.js +13 -7
- package/dist/server/src/modules/contracts/providers/contracts.provider.js.map +1 -1
- package/dist/server/src/modules/contracts/resolvers/contracts.resolver.js +6 -3
- package/dist/server/src/modules/contracts/resolvers/contracts.resolver.js.map +1 -1
- package/dist/server/src/modules/contracts/typeDefs/contracts.graphql.js +6 -3
- package/dist/server/src/modules/contracts/typeDefs/contracts.graphql.js.map +1 -1
- package/dist/server/src/modules/financial-entities/__generated__/types.d.ts +8 -7
- package/dist/server/src/modules/financial-entities/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js +5 -4
- package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js.map +1 -1
- package/dist/server/src/modules/financial-entities/typeDefs/admin-businesses.graphql.js +15 -12
- package/dist/server/src/modules/financial-entities/typeDefs/admin-businesses.graphql.js.map +1 -1
- package/dist/server/src/modules/green-invoice/resolvers/green-invoice.resolvers.js +2 -2
- package/dist/server/src/modules/green-invoice/resolvers/green-invoice.resolvers.js.map +1 -1
- package/package.json +5 -5
- package/src/__generated__/types.ts +28 -20
- package/src/modules/contracts/__generated__/contracts.types.ts +18 -2
- package/src/modules/contracts/__generated__/types.ts +5 -4
- package/src/modules/contracts/providers/contracts.provider.ts +13 -7
- package/src/modules/contracts/resolvers/contracts.resolver.ts +6 -3
- package/src/modules/contracts/typeDefs/contracts.graphql.ts +6 -3
- package/src/modules/financial-entities/__generated__/types.ts +8 -7
- package/src/modules/financial-entities/resolvers/admin-businesses.resolver.ts +5 -4
- package/src/modules/financial-entities/typeDefs/admin-businesses.graphql.ts +15 -12
- package/src/modules/green-invoice/resolvers/green-invoice.resolvers.ts +2 -2
|
@@ -17,7 +17,7 @@ export default gql`
|
|
|
17
17
|
type Contract {
|
|
18
18
|
id: UUID!
|
|
19
19
|
client: Client!
|
|
20
|
-
|
|
20
|
+
purchaseOrders: [String!]!
|
|
21
21
|
startDate: TimelessDate!
|
|
22
22
|
endDate: TimelessDate!
|
|
23
23
|
remarks: String
|
|
@@ -28,6 +28,7 @@ export default gql`
|
|
|
28
28
|
product: Product
|
|
29
29
|
plan: SubscriptionPlan
|
|
30
30
|
msCloud: URL
|
|
31
|
+
operationsLimit: Int!
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
" contract billing cycle "
|
|
@@ -51,7 +52,7 @@ export default gql`
|
|
|
51
52
|
" input for creating a new contract "
|
|
52
53
|
input CreateContractInput {
|
|
53
54
|
clientId: UUID!
|
|
54
|
-
|
|
55
|
+
purchaseOrders: [String!]!
|
|
55
56
|
startDate: TimelessDate!
|
|
56
57
|
endDate: TimelessDate!
|
|
57
58
|
remarks: String
|
|
@@ -62,12 +63,13 @@ export default gql`
|
|
|
62
63
|
plan: SubscriptionPlan
|
|
63
64
|
msCloud: URL
|
|
64
65
|
isActive: Boolean!
|
|
66
|
+
operationsLimit: Int
|
|
65
67
|
}
|
|
66
68
|
|
|
67
69
|
" input for updating a contract "
|
|
68
70
|
input UpdateContractInput {
|
|
69
71
|
clientId: UUID
|
|
70
|
-
|
|
72
|
+
purchaseOrders: [String!]!
|
|
71
73
|
startDate: TimelessDate
|
|
72
74
|
endDate: TimelessDate
|
|
73
75
|
remarks: String
|
|
@@ -78,5 +80,6 @@ export default gql`
|
|
|
78
80
|
plan: SubscriptionPlan
|
|
79
81
|
msCloud: URL
|
|
80
82
|
isActive: Boolean
|
|
83
|
+
operationsLimit: Int
|
|
81
84
|
}
|
|
82
85
|
`;
|
|
@@ -4,7 +4,7 @@ export namespace FinancialEntitiesModule {
|
|
|
4
4
|
interface DefinedFields {
|
|
5
5
|
Query: 'adminBusiness' | 'allAdminBusinesses' | 'businessTransactionsSumFromLedgerRecords' | 'businessTransactionsFromLedgerRecords' | 'business' | 'businesses' | 'allBusinesses' | 'client' | 'allClients' | 'financialEntity' | 'allFinancialEntities' | 'taxCategories' | 'taxCategory' | 'taxCategoryByBusinessId';
|
|
6
6
|
Mutation: 'createAdminBusiness' | 'updateAdminBusiness' | 'deleteAdminBusiness' | 'updateBusiness' | 'insertNewBusiness' | 'mergeBusinesses' | 'batchGenerateBusinessesOutOfTransactions' | 'updateClient' | 'insertClient' | 'updateTaxCategory' | 'insertTaxCategory';
|
|
7
|
-
AdminBusiness: 'id' | 'name' | 'governmentId' | 'business' | '
|
|
7
|
+
AdminBusiness: 'id' | 'name' | 'governmentId' | 'business' | 'withholdingTaxBookNumber' | 'withholdingTaxFileNumber' | 'socialSecurityEmployerId' | 'taxAdvancesRate' | 'taxAdvancesId' | 'registrationDate';
|
|
8
8
|
BusinessTransactionsSumFromLedgerRecordsSuccessfulResult: 'businessTransactionsSum';
|
|
9
9
|
BusinessTransactionSum: 'business' | 'credit' | 'debit' | 'total' | 'foreignCurrenciesSum';
|
|
10
10
|
ForeignCurrencySum: 'credit' | 'debit' | 'total' | 'currency';
|
|
@@ -50,8 +50,8 @@ export namespace FinancialEntitiesModule {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
interface DefinedInputFields {
|
|
53
|
-
CreateAdminBusinessInput: 'businessId' | '
|
|
54
|
-
UpdateAdminBusinessInput: '
|
|
53
|
+
CreateAdminBusinessInput: 'businessId' | 'withholdingTaxBookNumber' | 'withholdingTaxFileNumber' | 'socialSecurityEmployerId' | 'taxAdvancesRate' | 'taxAdvancesId' | 'registrationDate';
|
|
54
|
+
UpdateAdminBusinessInput: 'withholdingTaxBookNumber' | 'withholdingTaxFileNumber' | 'socialSecurityEmployerId' | 'taxAdvancesRate' | 'taxAdvancesId' | 'registrationDate';
|
|
55
55
|
BusinessTransactionsFilter: 'businessIDs' | 'ownerIds' | 'type' | 'fromDate' | 'toDate' | 'includeRevaluation';
|
|
56
56
|
UpdateBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
|
|
57
57
|
InsertNewBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
|
|
@@ -256,10 +256,11 @@ export namespace FinancialEntitiesModule {
|
|
|
256
256
|
name?: gm.Middleware[];
|
|
257
257
|
governmentId?: gm.Middleware[];
|
|
258
258
|
business?: gm.Middleware[];
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
259
|
+
withholdingTaxBookNumber?: gm.Middleware[];
|
|
260
|
+
withholdingTaxFileNumber?: gm.Middleware[];
|
|
261
|
+
socialSecurityEmployerId?: gm.Middleware[];
|
|
262
|
+
taxAdvancesRate?: gm.Middleware[];
|
|
263
|
+
taxAdvancesId?: gm.Middleware[];
|
|
263
264
|
registrationDate?: gm.Middleware[];
|
|
264
265
|
};
|
|
265
266
|
LtdFinancialEntity?: {
|
|
@@ -38,10 +38,11 @@ export const adminBusinessesResolvers: FinancialEntitiesModule.Resolvers = {
|
|
|
38
38
|
}
|
|
39
39
|
return business;
|
|
40
40
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
withholdingTaxBookNumber: admin => admin.tax_nikuim_pinkas_number,
|
|
42
|
+
withholdingTaxFileNumber: admin => admin.nikuim,
|
|
43
|
+
socialSecurityEmployerId: admin => admin.pinkas_social_security_2022,
|
|
44
|
+
taxAdvancesRate: admin => admin.advance_tax_rate,
|
|
45
|
+
taxAdvancesId: admin => admin.tax_siduri_number_2022,
|
|
45
46
|
registrationDate: admin => {
|
|
46
47
|
if (!admin.registration_date) {
|
|
47
48
|
throw new GraphQLError(`Admin business ID="${admin.id}" has no registration date`);
|
|
@@ -20,29 +20,32 @@ export default gql`
|
|
|
20
20
|
name: String!
|
|
21
21
|
governmentId: String!
|
|
22
22
|
business: LtdFinancialEntity!
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
withholdingTaxBookNumber: String
|
|
24
|
+
withholdingTaxFileNumber: String
|
|
25
|
+
socialSecurityEmployerId: String
|
|
26
|
+
taxAdvancesRate: Float
|
|
27
|
+
taxAdvancesId: String
|
|
27
28
|
registrationDate: TimelessDate!
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
" Input type for creating a new admin business. "
|
|
31
32
|
input CreateAdminBusinessInput {
|
|
32
33
|
businessId: UUID!
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
withholdingTaxBookNumber: String
|
|
35
|
+
withholdingTaxFileNumber: String
|
|
36
|
+
socialSecurityEmployerId: String
|
|
37
|
+
taxAdvancesRate: Float
|
|
38
|
+
taxAdvancesId: String
|
|
37
39
|
registrationDate: TimelessDate!
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
" Input type for updating admin business details. "
|
|
41
43
|
input UpdateAdminBusinessInput {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
withholdingTaxBookNumber: String
|
|
45
|
+
withholdingTaxFileNumber: String
|
|
46
|
+
socialSecurityEmployerId: String
|
|
47
|
+
taxAdvancesRate: Float
|
|
48
|
+
taxAdvancesId: String
|
|
46
49
|
registrationDate: TimelessDate
|
|
47
50
|
}
|
|
48
51
|
|
|
@@ -392,7 +392,7 @@ export const greenInvoiceResolvers: GreenInvoiceModule.Resolvers = {
|
|
|
392
392
|
const month = format(subMonths(today, 1), 'MMMM');
|
|
393
393
|
|
|
394
394
|
const documentInput: NewDocumentInfo = {
|
|
395
|
-
remarks: `${contract.
|
|
395
|
+
remarks: `${contract.purchase_orders[0] ? `PO: ${contract.purchase_orders[0]}${contract.remarks ? ', ' : ''}` : ''}${contract.remarks ?? ''}`,
|
|
396
396
|
description: `GraphQL Hive Enterprise License - ${month} ${year}`,
|
|
397
397
|
type: normalizeDocumentType(contract.document_type),
|
|
398
398
|
date: monthStart,
|
|
@@ -468,7 +468,7 @@ export const greenInvoiceResolvers: GreenInvoiceModule.Resolvers = {
|
|
|
468
468
|
const month = format(subMonths(today, 1), 'MMMM');
|
|
469
469
|
|
|
470
470
|
const draft: NewDocumentInfo = {
|
|
471
|
-
remarks: `${contract.
|
|
471
|
+
remarks: `${contract.purchase_orders[0] ? `PO: ${contract.purchase_orders[0]}${contract.remarks ? ', ' : ''}` : ''}${contract.remarks ?? ''}`,
|
|
472
472
|
description: `GraphQL Hive Enterprise License - ${month} ${year}`,
|
|
473
473
|
type: normalizeDocumentType(contract.document_type),
|
|
474
474
|
date: monthStart,
|