@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.
Files changed (31) hide show
  1. package/CHANGELOG.md +96 -4
  2. package/dist/server/src/__generated__/types.d.ts +28 -20
  3. package/dist/server/src/__generated__/types.js.map +1 -1
  4. package/dist/server/src/modules/contracts/__generated__/contracts.types.d.ts +16 -2
  5. package/dist/server/src/modules/contracts/__generated__/types.d.ts +5 -4
  6. package/dist/server/src/modules/contracts/__generated__/types.js.map +1 -1
  7. package/dist/server/src/modules/contracts/providers/contracts.provider.js +13 -7
  8. package/dist/server/src/modules/contracts/providers/contracts.provider.js.map +1 -1
  9. package/dist/server/src/modules/contracts/resolvers/contracts.resolver.js +6 -3
  10. package/dist/server/src/modules/contracts/resolvers/contracts.resolver.js.map +1 -1
  11. package/dist/server/src/modules/contracts/typeDefs/contracts.graphql.js +6 -3
  12. package/dist/server/src/modules/contracts/typeDefs/contracts.graphql.js.map +1 -1
  13. package/dist/server/src/modules/financial-entities/__generated__/types.d.ts +8 -7
  14. package/dist/server/src/modules/financial-entities/__generated__/types.js.map +1 -1
  15. package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js +5 -4
  16. package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js.map +1 -1
  17. package/dist/server/src/modules/financial-entities/typeDefs/admin-businesses.graphql.js +15 -12
  18. package/dist/server/src/modules/financial-entities/typeDefs/admin-businesses.graphql.js.map +1 -1
  19. package/dist/server/src/modules/green-invoice/resolvers/green-invoice.resolvers.js +2 -2
  20. package/dist/server/src/modules/green-invoice/resolvers/green-invoice.resolvers.js.map +1 -1
  21. package/package.json +5 -5
  22. package/src/__generated__/types.ts +28 -20
  23. package/src/modules/contracts/__generated__/contracts.types.ts +18 -2
  24. package/src/modules/contracts/__generated__/types.ts +5 -4
  25. package/src/modules/contracts/providers/contracts.provider.ts +13 -7
  26. package/src/modules/contracts/resolvers/contracts.resolver.ts +6 -3
  27. package/src/modules/contracts/typeDefs/contracts.graphql.ts +6 -3
  28. package/src/modules/financial-entities/__generated__/types.ts +8 -7
  29. package/src/modules/financial-entities/resolvers/admin-businesses.resolver.ts +5 -4
  30. package/src/modules/financial-entities/typeDefs/admin-businesses.graphql.ts +15 -12
  31. 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
- purchaseOrder: String
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
- purchaseOrder: String
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
- purchaseOrder: String
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' | 'employerWithholdingTaxAccountNumber' | 'taxPrepaymentId' | 'nationalInsuranceEmployerId' | 'advanceTaxRate' | 'registrationDate';
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' | 'employerWithholdingTaxAccountNumber' | 'taxPrepaymentId' | 'nationalInsuranceEmployerId' | 'advanceTaxRate' | 'registrationDate';
54
- UpdateAdminBusinessInput: 'employerWithholdingTaxAccountNumber' | 'taxPrepaymentId' | 'nationalInsuranceEmployerId' | 'advanceTaxRate' | 'registrationDate';
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
- employerWithholdingTaxAccountNumber?: gm.Middleware[];
260
- taxPrepaymentId?: gm.Middleware[];
261
- nationalInsuranceEmployerId?: gm.Middleware[];
262
- advanceTaxRate?: gm.Middleware[];
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
- employerWithholdingTaxAccountNumber: admin => admin.tax_nikuim_pinkas_number,
42
- taxPrepaymentId: admin => admin.tax_siduri_number_2022,
43
- nationalInsuranceEmployerId: admin => admin.pinkas_social_security_2022,
44
- advanceTaxRate: admin => admin.advance_tax_rate,
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
- employerWithholdingTaxAccountNumber: String
24
- taxPrepaymentId: String
25
- nationalInsuranceEmployerId: String
26
- advanceTaxRate: Float
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
- employerWithholdingTaxAccountNumber: String
34
- taxPrepaymentId: String
35
- nationalInsuranceEmployerId: String
36
- advanceTaxRate: Float
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
- employerWithholdingTaxAccountNumber: String
43
- taxPrepaymentId: String
44
- nationalInsuranceEmployerId: String
45
- advanceTaxRate: Float
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.purchase_order ? `PO: ${contract.purchase_order}${contract.remarks ? ', ' : ''}` : ''}${contract.remarks ?? ''}`,
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.purchase_order ? `PO: ${contract.purchase_order}${contract.remarks ? ', ' : ''}` : ''}${contract.remarks ?? ''}`,
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,