@accounter/server 0.0.8-alpha-20251029233438-f1242515c3b15dfb9387a5658e2417a7c063aa12 → 0.0.8-alpha-20251029233659-8fb74309c9f1de4f20423db029c5740e2df4bb5d
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 +4 -33
- package/dist/green-invoice-graphql/src/mesh-artifacts/index.d.ts +1 -1
- package/dist/server/src/__generated__/types.d.ts +18 -82
- package/dist/server/src/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.d.ts +0 -57
- package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.js +1 -0
- package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.js.map +1 -1
- package/dist/server/src/modules/financial-entities/__generated__/types.d.ts +10 -33
- package/dist/server/src/modules/financial-entities/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.d.ts +1 -2
- package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.js +0 -37
- package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.js.map +1 -1
- package/dist/server/src/modules/financial-entities/resolvers/admin-businesses.resolver.js +11 -45
- 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 +16 -49
- package/dist/server/src/modules/financial-entities/typeDefs/admin-businesses.graphql.js.map +1 -1
- package/dist/server/src/modules/financial-entities/types.d.ts +1 -1
- package/dist/server/src/modules/ledger/__generated__/types.d.ts +2 -3
- package/dist/server/src/modules/ledger/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/ledger/resolvers/ledger.resolver.js +0 -5
- package/dist/server/src/modules/ledger/resolvers/ledger.resolver.js.map +1 -1
- package/dist/server/src/modules/ledger/typeDefs/ledger.graphql.js +0 -2
- package/dist/server/src/modules/ledger/typeDefs/ledger.graphql.js.map +1 -1
- package/dist/server/src/modules/transactions/__generated__/types.d.ts +1 -2
- package/dist/server/src/modules/transactions/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/transactions/resolvers/transactions.resolver.js +0 -10
- package/dist/server/src/modules/transactions/resolvers/transactions.resolver.js.map +1 -1
- package/dist/server/src/modules/transactions/typeDefs/transactions.graphql.js +0 -1
- package/dist/server/src/modules/transactions/typeDefs/transactions.graphql.js.map +1 -1
- package/package.json +1 -1
- package/src/__generated__/types.ts +18 -92
- package/src/modules/financial-entities/__generated__/admin-businesses.types.ts +0 -60
- package/src/modules/financial-entities/__generated__/types.ts +10 -33
- package/src/modules/financial-entities/providers/admin-businesses.provider.ts +0 -44
- package/src/modules/financial-entities/resolvers/admin-businesses.resolver.ts +11 -52
- package/src/modules/financial-entities/typeDefs/admin-businesses.graphql.ts +16 -49
- package/src/modules/financial-entities/types.ts +1 -1
- package/src/modules/ledger/__generated__/types.ts +2 -3
- package/src/modules/ledger/resolvers/ledger.resolver.ts +0 -5
- package/src/modules/ledger/typeDefs/ledger.graphql.ts +0 -2
- package/src/modules/transactions/__generated__/types.ts +1 -2
- package/src/modules/transactions/resolvers/transactions.resolver.ts +0 -10
- package/src/modules/transactions/typeDefs/transactions.graphql.ts +0 -1
- package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.d.ts +0 -31
- package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.js +0 -27
- package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.js.map +0 -1
- package/src/modules/financial-entities/helpers/admin-businesses.helper.ts +0 -33
|
@@ -148,15 +148,11 @@ export type AdminBusiness = {
|
|
|
148
148
|
readonly id: Scalars['UUID']['output'];
|
|
149
149
|
readonly name: Scalars['String']['output'];
|
|
150
150
|
readonly registrationDate: Scalars['TimelessDate']['output'];
|
|
151
|
-
|
|
152
|
-
readonly
|
|
153
|
-
readonly
|
|
154
|
-
|
|
155
|
-
readonly
|
|
156
|
-
readonly taxAdvancesRates: ReadonlyArray<TaxAdvancesRate>;
|
|
157
|
-
readonly withholdingTaxAnnualIds: ReadonlyArray<AnnualId>;
|
|
158
|
-
/** Withholding Tax Info */
|
|
159
|
-
readonly withholdingTaxCompanyId?: Maybe<Scalars['String']['output']>;
|
|
151
|
+
readonly socialSecurityEmployerId?: Maybe<Scalars['String']['output']>;
|
|
152
|
+
readonly taxAdvancesId?: Maybe<Scalars['String']['output']>;
|
|
153
|
+
readonly taxAdvancesRate?: Maybe<Scalars['Float']['output']>;
|
|
154
|
+
readonly withholdingTaxBookNumber?: Maybe<Scalars['String']['output']>;
|
|
155
|
+
readonly withholdingTaxFileNumber?: Maybe<Scalars['String']['output']>;
|
|
160
156
|
};
|
|
161
157
|
|
|
162
158
|
/** defines a tag / category for charge arrangement */
|
|
@@ -293,19 +289,6 @@ export type AdminContextInput = {
|
|
|
293
289
|
readonly zkufotIncomeTaxCategoryId?: InputMaybe<Scalars['UUID']['input']>;
|
|
294
290
|
};
|
|
295
291
|
|
|
296
|
-
/** Represents an annual identifier for tax purposes. */
|
|
297
|
-
export type AnnualId = {
|
|
298
|
-
readonly __typename?: 'AnnualId';
|
|
299
|
-
readonly id: Scalars['String']['output'];
|
|
300
|
-
readonly year: Scalars['Int']['output'];
|
|
301
|
-
};
|
|
302
|
-
|
|
303
|
-
/** Input type representing an annual identifier for tax purposes. */
|
|
304
|
-
export type AnnualIdInput = {
|
|
305
|
-
readonly id: Scalars['String']['input'];
|
|
306
|
-
readonly year: Scalars['Int']['input'];
|
|
307
|
-
};
|
|
308
|
-
|
|
309
292
|
/** Audit opinion type enum (חוות דעת) */
|
|
310
293
|
export type AuditOpinionType =
|
|
311
294
|
/** Adverse opinion (שלילית) */
|
|
@@ -1165,12 +1148,12 @@ export type Country = {
|
|
|
1165
1148
|
/** Input type for creating a new admin business. */
|
|
1166
1149
|
export type CreateAdminBusinessInput = {
|
|
1167
1150
|
readonly businessId: Scalars['UUID']['input'];
|
|
1168
|
-
readonly companyTaxId: Scalars['String']['input'];
|
|
1169
1151
|
readonly registrationDate: Scalars['TimelessDate']['input'];
|
|
1170
1152
|
readonly socialSecurityEmployerId?: InputMaybe<Scalars['String']['input']>;
|
|
1171
|
-
readonly
|
|
1153
|
+
readonly taxAdvancesId?: InputMaybe<Scalars['String']['input']>;
|
|
1172
1154
|
readonly taxAdvancesRate?: InputMaybe<Scalars['Float']['input']>;
|
|
1173
|
-
readonly
|
|
1155
|
+
readonly withholdingTaxBookNumber?: InputMaybe<Scalars['String']['input']>;
|
|
1156
|
+
readonly withholdingTaxFileNumber?: InputMaybe<Scalars['String']['input']>;
|
|
1174
1157
|
};
|
|
1175
1158
|
|
|
1176
1159
|
/** input for creating a new contract */
|
|
@@ -3571,7 +3554,6 @@ export type Query = {
|
|
|
3571
3554
|
readonly greenInvoiceClient: GreenInvoiceClient;
|
|
3572
3555
|
readonly incomeExpenseChart: IncomeExpenseChart;
|
|
3573
3556
|
readonly ledgerRecordsByDates: ReadonlyArray<LedgerRecord>;
|
|
3574
|
-
readonly ledgerRecordsByFinancialEntity: ReadonlyArray<LedgerRecord>;
|
|
3575
3557
|
readonly miscExpensesByCharge: ReadonlyArray<MiscExpense>;
|
|
3576
3558
|
readonly newDocumentInfoDraftByCharge: NewDocumentInfo;
|
|
3577
3559
|
readonly newDocumentInfoDraftByDocument: NewDocumentInfo;
|
|
@@ -3596,7 +3578,6 @@ export type Query = {
|
|
|
3596
3578
|
readonly taxCategory: TaxCategory;
|
|
3597
3579
|
readonly taxCategoryByBusinessId?: Maybe<TaxCategory>;
|
|
3598
3580
|
readonly taxReport: TaxReport;
|
|
3599
|
-
readonly transactionsByFinancialEntity: ReadonlyArray<Transaction>;
|
|
3600
3581
|
readonly transactionsByIDs: ReadonlyArray<Transaction>;
|
|
3601
3582
|
readonly transactionsForBalanceReport: ReadonlyArray<BalanceTransactions>;
|
|
3602
3583
|
readonly uniformFormat?: Maybe<UniformFormat>;
|
|
@@ -3813,12 +3794,6 @@ export type QueryLedgerRecordsByDatesArgs = {
|
|
|
3813
3794
|
};
|
|
3814
3795
|
|
|
3815
3796
|
|
|
3816
|
-
/** query root */
|
|
3817
|
-
export type QueryLedgerRecordsByFinancialEntityArgs = {
|
|
3818
|
-
financialEntityId: Scalars['UUID']['input'];
|
|
3819
|
-
};
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
3797
|
/** query root */
|
|
3823
3798
|
export type QueryMiscExpensesByChargeArgs = {
|
|
3824
3799
|
chargeId: Scalars['UUID']['input'];
|
|
@@ -3962,12 +3937,6 @@ export type QueryTaxReportArgs = {
|
|
|
3962
3937
|
};
|
|
3963
3938
|
|
|
3964
3939
|
|
|
3965
|
-
/** query root */
|
|
3966
|
-
export type QueryTransactionsByFinancialEntityArgs = {
|
|
3967
|
-
financialEntityID: Scalars['UUID']['input'];
|
|
3968
|
-
};
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
3940
|
/** query root */
|
|
3972
3941
|
export type QueryTransactionsByIDsArgs = {
|
|
3973
3942
|
transactionIDs: ReadonlyArray<Scalars['UUID']['input']>;
|
|
@@ -4390,19 +4359,6 @@ export type TagInput = {
|
|
|
4390
4359
|
readonly id: Scalars['String']['input'];
|
|
4391
4360
|
};
|
|
4392
4361
|
|
|
4393
|
-
/** Represents the tax advance rate for a specific date. */
|
|
4394
|
-
export type TaxAdvancesRate = {
|
|
4395
|
-
readonly __typename?: 'TaxAdvancesRate';
|
|
4396
|
-
readonly date: Scalars['TimelessDate']['output'];
|
|
4397
|
-
readonly rate: Scalars['Float']['output'];
|
|
4398
|
-
};
|
|
4399
|
-
|
|
4400
|
-
/** Input type representing the tax advance rate for a specific date. */
|
|
4401
|
-
export type TaxAdvancesRateInput = {
|
|
4402
|
-
readonly date: Scalars['TimelessDate']['input'];
|
|
4403
|
-
readonly rate: Scalars['Float']['input'];
|
|
4404
|
-
};
|
|
4405
|
-
|
|
4406
4362
|
/** Tax category entity used for ledger records */
|
|
4407
4363
|
export type TaxCategory = FinancialEntity & {
|
|
4408
4364
|
readonly __typename?: 'TaxCategory';
|
|
@@ -4527,17 +4483,12 @@ export type Unprocessed = Document & Linkable & {
|
|
|
4527
4483
|
|
|
4528
4484
|
/** Input type for updating admin business details. */
|
|
4529
4485
|
export type UpdateAdminBusinessInput = {
|
|
4530
|
-
readonly governmentId?: InputMaybe<Scalars['String']['input']>;
|
|
4531
|
-
readonly name?: InputMaybe<Scalars['String']['input']>;
|
|
4532
4486
|
readonly registrationDate?: InputMaybe<Scalars['TimelessDate']['input']>;
|
|
4533
|
-
|
|
4534
|
-
readonly
|
|
4535
|
-
|
|
4536
|
-
readonly
|
|
4537
|
-
readonly
|
|
4538
|
-
readonly withholdingTaxAnnualIds?: InputMaybe<ReadonlyArray<AnnualIdInput>>;
|
|
4539
|
-
/** Withholding Tax Info */
|
|
4540
|
-
readonly withholdingTaxCompanyId?: InputMaybe<Scalars['String']['input']>;
|
|
4487
|
+
readonly socialSecurityEmployerId?: InputMaybe<Scalars['String']['input']>;
|
|
4488
|
+
readonly taxAdvancesId?: InputMaybe<Scalars['String']['input']>;
|
|
4489
|
+
readonly taxAdvancesRate?: InputMaybe<Scalars['Float']['input']>;
|
|
4490
|
+
readonly withholdingTaxBookNumber?: InputMaybe<Scalars['String']['input']>;
|
|
4491
|
+
readonly withholdingTaxFileNumber?: InputMaybe<Scalars['String']['input']>;
|
|
4541
4492
|
};
|
|
4542
4493
|
|
|
4543
4494
|
/** input for updateBusiness */
|
|
@@ -5035,8 +4986,6 @@ export type ResolversTypes = {
|
|
|
5035
4986
|
AdminBusiness: ResolverTypeWrapper<IGetAllAdminBusinessesResult>;
|
|
5036
4987
|
AdminContext: ResolverTypeWrapper<IGetAdminContextsResult>;
|
|
5037
4988
|
AdminContextInput: AdminContextInput;
|
|
5038
|
-
AnnualId: ResolverTypeWrapper<AnnualId>;
|
|
5039
|
-
AnnualIdInput: AnnualIdInput;
|
|
5040
4989
|
AuditOpinionType: AuditOpinionType;
|
|
5041
4990
|
BalanceTransactions: ResolverTypeWrapper<IGetNormalizedBalanceTransactionsResult>;
|
|
5042
4991
|
BankDeposit: ResolverTypeWrapper<Omit<BankDeposit, 'transactions'> & { transactions: ReadonlyArray<ResolversTypes['Transaction']> }>;
|
|
@@ -5253,8 +5202,6 @@ export type ResolversTypes = {
|
|
|
5253
5202
|
SuggestionsInput: SuggestionsInput;
|
|
5254
5203
|
Tag: ResolverTypeWrapper<IGetAllTagsResult>;
|
|
5255
5204
|
TagInput: TagInput;
|
|
5256
|
-
TaxAdvancesRate: ResolverTypeWrapper<TaxAdvancesRate>;
|
|
5257
|
-
TaxAdvancesRateInput: TaxAdvancesRateInput;
|
|
5258
5205
|
TaxCategory: ResolverTypeWrapper<IGetAllTaxCategoriesResult>;
|
|
5259
5206
|
TaxReport: ResolverTypeWrapper<Omit<TaxReport, 'reference' | 'report'> & { reference: ReadonlyArray<ResolversTypes['TaxReportYear']>, report: ResolversTypes['TaxReportYear'] }>;
|
|
5260
5207
|
TaxReportYear: ResolverTypeWrapper<TaxReportYearProto>;
|
|
@@ -5326,8 +5273,6 @@ export type ResolversParentTypes = {
|
|
|
5326
5273
|
AdminBusiness: IGetAllAdminBusinessesResult;
|
|
5327
5274
|
AdminContext: IGetAdminContextsResult;
|
|
5328
5275
|
AdminContextInput: AdminContextInput;
|
|
5329
|
-
AnnualId: AnnualId;
|
|
5330
|
-
AnnualIdInput: AnnualIdInput;
|
|
5331
5276
|
BalanceTransactions: IGetNormalizedBalanceTransactionsResult;
|
|
5332
5277
|
BankDeposit: Omit<BankDeposit, 'transactions'> & { transactions: ReadonlyArray<ResolversParentTypes['Transaction']> };
|
|
5333
5278
|
BankDepositCharge: IGetChargesByIdsResult;
|
|
@@ -5509,8 +5454,6 @@ export type ResolversParentTypes = {
|
|
|
5509
5454
|
SuggestionsInput: SuggestionsInput;
|
|
5510
5455
|
Tag: IGetAllTagsResult;
|
|
5511
5456
|
TagInput: TagInput;
|
|
5512
|
-
TaxAdvancesRate: TaxAdvancesRate;
|
|
5513
|
-
TaxAdvancesRateInput: TaxAdvancesRateInput;
|
|
5514
5457
|
TaxCategory: IGetAllTaxCategoriesResult;
|
|
5515
5458
|
TaxReport: Omit<TaxReport, 'reference' | 'report'> & { reference: ReadonlyArray<ResolversParentTypes['TaxReportYear']>, report: ResolversParentTypes['TaxReportYear'] };
|
|
5516
5459
|
TaxReportYear: TaxReportYearProto;
|
|
@@ -5591,12 +5534,11 @@ export type AdminBusinessResolvers<ContextType = GraphQLModules.Context, ParentT
|
|
|
5591
5534
|
id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
|
|
5592
5535
|
name?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
5593
5536
|
registrationDate?: Resolver<ResolversTypes['TimelessDate'], ParentType, ContextType>;
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
withholdingTaxCompanyId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
5537
|
+
socialSecurityEmployerId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
5538
|
+
taxAdvancesId?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
5539
|
+
taxAdvancesRate?: Resolver<Maybe<ResolversTypes['Float']>, ParentType, ContextType>;
|
|
5540
|
+
withholdingTaxBookNumber?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
5541
|
+
withholdingTaxFileNumber?: Resolver<Maybe<ResolversTypes['String']>, ParentType, ContextType>;
|
|
5600
5542
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
5601
5543
|
};
|
|
5602
5544
|
|
|
@@ -5667,12 +5609,6 @@ export type AdminContextResolvers<ContextType = GraphQLModules.Context, ParentTy
|
|
|
5667
5609
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
5668
5610
|
};
|
|
5669
5611
|
|
|
5670
|
-
export type AnnualIdResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['AnnualId'] = ResolversParentTypes['AnnualId']> = {
|
|
5671
|
-
id?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
|
|
5672
|
-
year?: Resolver<ResolversTypes['Int'], ParentType, ContextType>;
|
|
5673
|
-
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
5674
|
-
};
|
|
5675
|
-
|
|
5676
5612
|
export type BalanceTransactionsResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['BalanceTransactions'] = ResolversParentTypes['BalanceTransactions']> = {
|
|
5677
5613
|
amount?: Resolver<ResolversTypes['FinancialAmount'], ParentType, ContextType>;
|
|
5678
5614
|
amountUsd?: Resolver<ResolversTypes['FinancialAmount'], ParentType, ContextType>;
|
|
@@ -7318,7 +7254,6 @@ export type QueryResolvers<ContextType = GraphQLModules.Context, ParentType exte
|
|
|
7318
7254
|
greenInvoiceClient?: Resolver<ResolversTypes['GreenInvoiceClient'], ParentType, ContextType, RequireFields<QueryGreenInvoiceClientArgs, 'clientId'>>;
|
|
7319
7255
|
incomeExpenseChart?: Resolver<ResolversTypes['IncomeExpenseChart'], ParentType, ContextType, RequireFields<QueryIncomeExpenseChartArgs, 'filters'>>;
|
|
7320
7256
|
ledgerRecordsByDates?: Resolver<ReadonlyArray<ResolversTypes['LedgerRecord']>, ParentType, ContextType, RequireFields<QueryLedgerRecordsByDatesArgs, 'fromDate' | 'toDate'>>;
|
|
7321
|
-
ledgerRecordsByFinancialEntity?: Resolver<ReadonlyArray<ResolversTypes['LedgerRecord']>, ParentType, ContextType, RequireFields<QueryLedgerRecordsByFinancialEntityArgs, 'financialEntityId'>>;
|
|
7322
7257
|
miscExpensesByCharge?: Resolver<ReadonlyArray<ResolversTypes['MiscExpense']>, ParentType, ContextType, RequireFields<QueryMiscExpensesByChargeArgs, 'chargeId'>>;
|
|
7323
7258
|
newDocumentInfoDraftByCharge?: Resolver<ResolversTypes['NewDocumentInfo'], ParentType, ContextType, RequireFields<QueryNewDocumentInfoDraftByChargeArgs, 'chargeId'>>;
|
|
7324
7259
|
newDocumentInfoDraftByDocument?: Resolver<ResolversTypes['NewDocumentInfo'], ParentType, ContextType, RequireFields<QueryNewDocumentInfoDraftByDocumentArgs, 'documentId'>>;
|
|
@@ -7341,7 +7276,6 @@ export type QueryResolvers<ContextType = GraphQLModules.Context, ParentType exte
|
|
|
7341
7276
|
taxCategory?: Resolver<ResolversTypes['TaxCategory'], ParentType, ContextType, RequireFields<QueryTaxCategoryArgs, 'id'>>;
|
|
7342
7277
|
taxCategoryByBusinessId?: Resolver<Maybe<ResolversTypes['TaxCategory']>, ParentType, ContextType, RequireFields<QueryTaxCategoryByBusinessIdArgs, 'businessId' | 'ownerId'>>;
|
|
7343
7278
|
taxReport?: Resolver<ResolversTypes['TaxReport'], ParentType, ContextType, RequireFields<QueryTaxReportArgs, 'referenceYears' | 'reportYear'>>;
|
|
7344
|
-
transactionsByFinancialEntity?: Resolver<ReadonlyArray<ResolversTypes['Transaction']>, ParentType, ContextType, RequireFields<QueryTransactionsByFinancialEntityArgs, 'financialEntityID'>>;
|
|
7345
7279
|
transactionsByIDs?: Resolver<ReadonlyArray<ResolversTypes['Transaction']>, ParentType, ContextType, RequireFields<QueryTransactionsByIDsArgs, 'transactionIDs'>>;
|
|
7346
7280
|
transactionsForBalanceReport?: Resolver<ReadonlyArray<ResolversTypes['BalanceTransactions']>, ParentType, ContextType, RequireFields<QueryTransactionsForBalanceReportArgs, 'fromDate' | 'toDate'>>;
|
|
7347
7281
|
uniformFormat?: Resolver<Maybe<ResolversTypes['UniformFormat']>, ParentType, ContextType, RequireFields<QueryUniformFormatArgs, 'fromDate' | 'toDate'>>;
|
|
@@ -7580,12 +7514,6 @@ export type TagResolvers<ContextType = GraphQLModules.Context, ParentType extend
|
|
|
7580
7514
|
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
7581
7515
|
};
|
|
7582
7516
|
|
|
7583
|
-
export type TaxAdvancesRateResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['TaxAdvancesRate'] = ResolversParentTypes['TaxAdvancesRate']> = {
|
|
7584
|
-
date?: Resolver<ResolversTypes['TimelessDate'], ParentType, ContextType>;
|
|
7585
|
-
rate?: Resolver<ResolversTypes['Float'], ParentType, ContextType>;
|
|
7586
|
-
__isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
|
|
7587
|
-
};
|
|
7588
|
-
|
|
7589
7517
|
export type TaxCategoryResolvers<ContextType = GraphQLModules.Context, ParentType extends ResolversParentTypes['TaxCategory'] = ResolversParentTypes['TaxCategory']> = {
|
|
7590
7518
|
createdAt?: Resolver<ResolversTypes['DateTime'], ParentType, ContextType>;
|
|
7591
7519
|
id?: Resolver<ResolversTypes['UUID'], ParentType, ContextType>;
|
|
@@ -7854,7 +7782,6 @@ export type YearlyLedgerReportFinancialEntityInfoResolvers<ContextType = GraphQL
|
|
|
7854
7782
|
export type Resolvers<ContextType = GraphQLModules.Context> = {
|
|
7855
7783
|
AdminBusiness?: AdminBusinessResolvers<ContextType>;
|
|
7856
7784
|
AdminContext?: AdminContextResolvers<ContextType>;
|
|
7857
|
-
AnnualId?: AnnualIdResolvers<ContextType>;
|
|
7858
7785
|
BalanceTransactions?: BalanceTransactionsResolvers<ContextType>;
|
|
7859
7786
|
BankDeposit?: BankDepositResolvers<ContextType>;
|
|
7860
7787
|
BankDepositCharge?: BankDepositChargeResolvers<ContextType>;
|
|
@@ -8000,7 +7927,6 @@ export type Resolvers<ContextType = GraphQLModules.Context> = {
|
|
|
8000
7927
|
Suggestions?: SuggestionsResolvers<ContextType>;
|
|
8001
7928
|
SuggestionsEmailListenerConfig?: SuggestionsEmailListenerConfigResolvers<ContextType>;
|
|
8002
7929
|
Tag?: TagResolvers<ContextType>;
|
|
8003
|
-
TaxAdvancesRate?: TaxAdvancesRateResolvers<ContextType>;
|
|
8004
7930
|
TaxCategory?: TaxCategoryResolvers<ContextType>;
|
|
8005
7931
|
TaxReport?: TaxReportResolvers<ContextType>;
|
|
8006
7932
|
TaxReportYear?: TaxReportYearResolvers<ContextType>;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
/** Types generated for queries found in "src/modules/financial-entities/providers/admin-businesses.provider.ts" */
|
|
2
|
-
export type DateOrString = Date | string;
|
|
3
|
-
|
|
4
|
-
export type Json = null | boolean | number | string | Json[] | { [key: string]: Json };
|
|
5
|
-
|
|
6
|
-
export type JsonArray = (Json)[];
|
|
7
2
|
|
|
8
3
|
/** 'GetAdminBusinessesByIds' parameters type */
|
|
9
4
|
export interface IGetAdminBusinessesByIdsParams {
|
|
@@ -13,9 +8,6 @@ export interface IGetAdminBusinessesByIdsParams {
|
|
|
13
8
|
/** 'GetAdminBusinessesByIds' return type */
|
|
14
9
|
export interface IGetAdminBusinessesByIdsResult {
|
|
15
10
|
advance_tax_rate: number | null;
|
|
16
|
-
advance_tax_rates: JsonArray;
|
|
17
|
-
business_registration_start_date: Date | null;
|
|
18
|
-
company_tax_id: string | null;
|
|
19
11
|
id: string;
|
|
20
12
|
name: string;
|
|
21
13
|
nikuim: string | null;
|
|
@@ -23,8 +15,6 @@ export interface IGetAdminBusinessesByIdsResult {
|
|
|
23
15
|
pinkas_social_security_2021: string | null;
|
|
24
16
|
pinkas_social_security_2022: string | null;
|
|
25
17
|
registration_date: Date | null;
|
|
26
|
-
social_security_employer_ids: JsonArray;
|
|
27
|
-
tax_advances_ids: JsonArray;
|
|
28
18
|
tax_nikuim_pinkas_number: string | null;
|
|
29
19
|
tax_pinkas_number_2020: string | null;
|
|
30
20
|
tax_siduri_number_2021: string | null;
|
|
@@ -33,7 +23,6 @@ export interface IGetAdminBusinessesByIdsResult {
|
|
|
33
23
|
vat_number: string | null;
|
|
34
24
|
vat_report_cadence: number | null;
|
|
35
25
|
website_login_screenshot: string | null;
|
|
36
|
-
withholding_tax_annual_ids: JsonArray;
|
|
37
26
|
wizcloud_company_id: string | null;
|
|
38
27
|
wizcloud_token: string | null;
|
|
39
28
|
}
|
|
@@ -50,9 +39,6 @@ export type IGetAllAdminBusinessesParams = void;
|
|
|
50
39
|
/** 'GetAllAdminBusinesses' return type */
|
|
51
40
|
export interface IGetAllAdminBusinessesResult {
|
|
52
41
|
advance_tax_rate: number | null;
|
|
53
|
-
advance_tax_rates: JsonArray;
|
|
54
|
-
business_registration_start_date: Date | null;
|
|
55
|
-
company_tax_id: string | null;
|
|
56
42
|
id: string;
|
|
57
43
|
name: string;
|
|
58
44
|
nikuim: string | null;
|
|
@@ -60,8 +46,6 @@ export interface IGetAllAdminBusinessesResult {
|
|
|
60
46
|
pinkas_social_security_2021: string | null;
|
|
61
47
|
pinkas_social_security_2022: string | null;
|
|
62
48
|
registration_date: Date | null;
|
|
63
|
-
social_security_employer_ids: JsonArray;
|
|
64
|
-
tax_advances_ids: JsonArray;
|
|
65
49
|
tax_nikuim_pinkas_number: string | null;
|
|
66
50
|
tax_pinkas_number_2020: string | null;
|
|
67
51
|
tax_siduri_number_2021: string | null;
|
|
@@ -70,7 +54,6 @@ export interface IGetAllAdminBusinessesResult {
|
|
|
70
54
|
vat_number: string | null;
|
|
71
55
|
vat_report_cadence: number | null;
|
|
72
56
|
website_login_screenshot: string | null;
|
|
73
|
-
withholding_tax_annual_ids: JsonArray;
|
|
74
57
|
wizcloud_company_id: string | null;
|
|
75
58
|
wizcloud_token: string | null;
|
|
76
59
|
}
|
|
@@ -81,46 +64,3 @@ export interface IGetAllAdminBusinessesQuery {
|
|
|
81
64
|
result: IGetAllAdminBusinessesResult;
|
|
82
65
|
}
|
|
83
66
|
|
|
84
|
-
/** 'UpdateAdminBusinesses' parameters type */
|
|
85
|
-
export interface IUpdateAdminBusinessesParams {
|
|
86
|
-
advanceTaxRates?: JsonArray | null | void;
|
|
87
|
-
businessRegistrationStartDate?: DateOrString | null | void;
|
|
88
|
-
companyTaxId?: string | null | void;
|
|
89
|
-
id?: string | null | void;
|
|
90
|
-
socialSecurityEmployerIds?: JsonArray | null | void;
|
|
91
|
-
taxAdvancesIds?: JsonArray | null | void;
|
|
92
|
-
withholdingTaxAnnualIds?: JsonArray | null | void;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/** 'UpdateAdminBusinesses' return type */
|
|
96
|
-
export interface IUpdateAdminBusinessesResult {
|
|
97
|
-
advance_tax_rate: number | null;
|
|
98
|
-
advance_tax_rates: JsonArray;
|
|
99
|
-
business_registration_start_date: Date | null;
|
|
100
|
-
company_tax_id: string | null;
|
|
101
|
-
id: string;
|
|
102
|
-
nikuim: string | null;
|
|
103
|
-
password: string | null;
|
|
104
|
-
pinkas_social_security_2021: string | null;
|
|
105
|
-
pinkas_social_security_2022: string | null;
|
|
106
|
-
registration_date: Date | null;
|
|
107
|
-
social_security_employer_ids: JsonArray;
|
|
108
|
-
tax_advances_ids: JsonArray;
|
|
109
|
-
tax_nikuim_pinkas_number: string | null;
|
|
110
|
-
tax_pinkas_number_2020: string | null;
|
|
111
|
-
tax_siduri_number_2021: string | null;
|
|
112
|
-
tax_siduri_number_2022: string | null;
|
|
113
|
-
username_vat_website: string | null;
|
|
114
|
-
vat_report_cadence: number | null;
|
|
115
|
-
website_login_screenshot: string | null;
|
|
116
|
-
withholding_tax_annual_ids: JsonArray;
|
|
117
|
-
wizcloud_company_id: string | null;
|
|
118
|
-
wizcloud_token: string | null;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/** 'UpdateAdminBusinesses' query type */
|
|
122
|
-
export interface IUpdateAdminBusinessesQuery {
|
|
123
|
-
params: IUpdateAdminBusinessesParams;
|
|
124
|
-
result: IUpdateAdminBusinessesResult;
|
|
125
|
-
}
|
|
126
|
-
|
|
@@ -4,9 +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' | '
|
|
8
|
-
AnnualId: 'year' | 'id';
|
|
9
|
-
TaxAdvancesRate: 'date' | 'rate';
|
|
7
|
+
AdminBusiness: 'id' | 'name' | 'governmentId' | 'business' | 'withholdingTaxBookNumber' | 'withholdingTaxFileNumber' | 'socialSecurityEmployerId' | 'taxAdvancesRate' | 'taxAdvancesId' | 'registrationDate';
|
|
10
8
|
BusinessTransactionsSumFromLedgerRecordsSuccessfulResult: 'businessTransactionsSum';
|
|
11
9
|
BusinessTransactionSum: 'business' | 'credit' | 'debit' | 'total' | 'foreignCurrenciesSum';
|
|
12
10
|
ForeignCurrencySum: 'credit' | 'debit' | 'total' | 'currency';
|
|
@@ -52,10 +50,8 @@ export namespace FinancialEntitiesModule {
|
|
|
52
50
|
};
|
|
53
51
|
|
|
54
52
|
interface DefinedInputFields {
|
|
55
|
-
CreateAdminBusinessInput: 'businessId' | '
|
|
56
|
-
UpdateAdminBusinessInput: '
|
|
57
|
-
AnnualIdInput: 'year' | 'id';
|
|
58
|
-
TaxAdvancesRateInput: 'date' | 'rate';
|
|
53
|
+
CreateAdminBusinessInput: 'businessId' | 'withholdingTaxBookNumber' | 'withholdingTaxFileNumber' | 'socialSecurityEmployerId' | 'taxAdvancesRate' | 'taxAdvancesId' | 'registrationDate';
|
|
54
|
+
UpdateAdminBusinessInput: 'withholdingTaxBookNumber' | 'withholdingTaxFileNumber' | 'socialSecurityEmployerId' | 'taxAdvancesRate' | 'taxAdvancesId' | 'registrationDate';
|
|
59
55
|
BusinessTransactionsFilter: 'businessIDs' | 'ownerIds' | 'type' | 'fromDate' | 'toDate' | 'includeRevaluation';
|
|
60
56
|
UpdateBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
|
|
61
57
|
InsertNewBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
|
|
@@ -74,12 +70,8 @@ export namespace FinancialEntitiesModule {
|
|
|
74
70
|
export type Mutation = Pick<Types.Mutation, DefinedFields['Mutation']>;
|
|
75
71
|
export type CreateAdminBusinessInput = Pick<Types.CreateAdminBusinessInput, DefinedInputFields['CreateAdminBusinessInput']>;
|
|
76
72
|
export type UpdateAdminBusinessInput = Pick<Types.UpdateAdminBusinessInput, DefinedInputFields['UpdateAdminBusinessInput']>;
|
|
77
|
-
export type TimelessDate = Types.TimelessDate;
|
|
78
73
|
export type LtdFinancialEntity = Pick<Types.LtdFinancialEntity, DefinedFields['LtdFinancialEntity']>;
|
|
79
|
-
export type
|
|
80
|
-
export type TaxAdvancesRate = Pick<Types.TaxAdvancesRate, DefinedFields['TaxAdvancesRate']>;
|
|
81
|
-
export type AnnualIdInput = Pick<Types.AnnualIdInput, DefinedInputFields['AnnualIdInput']>;
|
|
82
|
-
export type TaxAdvancesRateInput = Pick<Types.TaxAdvancesRateInput, DefinedInputFields['TaxAdvancesRateInput']>;
|
|
74
|
+
export type TimelessDate = Types.TimelessDate;
|
|
83
75
|
export type BusinessTransactionsSumFromLedgerRecordsResult = Types.BusinessTransactionsSumFromLedgerRecordsResult;
|
|
84
76
|
export type BusinessTransactionsFilter = Pick<Types.BusinessTransactionsFilter, DefinedInputFields['BusinessTransactionsFilter']>;
|
|
85
77
|
export type BusinessTransactionsFromLedgerRecordsResult = Types.BusinessTransactionsFromLedgerRecordsResult;
|
|
@@ -147,8 +139,6 @@ export namespace FinancialEntitiesModule {
|
|
|
147
139
|
export type QueryResolvers = Pick<Types.QueryResolvers, DefinedFields['Query']>;
|
|
148
140
|
export type MutationResolvers = Pick<Types.MutationResolvers, DefinedFields['Mutation']>;
|
|
149
141
|
export type AdminBusinessResolvers = Pick<Types.AdminBusinessResolvers, DefinedFields['AdminBusiness']>;
|
|
150
|
-
export type AnnualIdResolvers = Pick<Types.AnnualIdResolvers, DefinedFields['AnnualId']>;
|
|
151
|
-
export type TaxAdvancesRateResolvers = Pick<Types.TaxAdvancesRateResolvers, DefinedFields['TaxAdvancesRate']>;
|
|
152
142
|
export type BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers = Pick<Types.BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers, DefinedFields['BusinessTransactionsSumFromLedgerRecordsSuccessfulResult'] | '__isTypeOf'>;
|
|
153
143
|
export type BusinessTransactionSumResolvers = Pick<Types.BusinessTransactionSumResolvers, DefinedFields['BusinessTransactionSum']>;
|
|
154
144
|
export type ForeignCurrencySumResolvers = Pick<Types.ForeignCurrencySumResolvers, DefinedFields['ForeignCurrencySum']>;
|
|
@@ -191,8 +181,6 @@ export namespace FinancialEntitiesModule {
|
|
|
191
181
|
Query?: QueryResolvers;
|
|
192
182
|
Mutation?: MutationResolvers;
|
|
193
183
|
AdminBusiness?: AdminBusinessResolvers;
|
|
194
|
-
AnnualId?: AnnualIdResolvers;
|
|
195
|
-
TaxAdvancesRate?: TaxAdvancesRateResolvers;
|
|
196
184
|
BusinessTransactionsSumFromLedgerRecordsSuccessfulResult?: BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers;
|
|
197
185
|
BusinessTransactionSum?: BusinessTransactionSumResolvers;
|
|
198
186
|
ForeignCurrencySum?: ForeignCurrencySumResolvers;
|
|
@@ -267,24 +255,13 @@ export namespace FinancialEntitiesModule {
|
|
|
267
255
|
id?: gm.Middleware[];
|
|
268
256
|
name?: gm.Middleware[];
|
|
269
257
|
governmentId?: gm.Middleware[];
|
|
270
|
-
registrationDate?: gm.Middleware[];
|
|
271
258
|
business?: gm.Middleware[];
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
};
|
|
279
|
-
AnnualId?: {
|
|
280
|
-
'*'?: gm.Middleware[];
|
|
281
|
-
year?: gm.Middleware[];
|
|
282
|
-
id?: gm.Middleware[];
|
|
283
|
-
};
|
|
284
|
-
TaxAdvancesRate?: {
|
|
285
|
-
'*'?: gm.Middleware[];
|
|
286
|
-
date?: gm.Middleware[];
|
|
287
|
-
rate?: gm.Middleware[];
|
|
259
|
+
withholdingTaxBookNumber?: gm.Middleware[];
|
|
260
|
+
withholdingTaxFileNumber?: gm.Middleware[];
|
|
261
|
+
socialSecurityEmployerId?: gm.Middleware[];
|
|
262
|
+
taxAdvancesRate?: gm.Middleware[];
|
|
263
|
+
taxAdvancesId?: gm.Middleware[];
|
|
264
|
+
registrationDate?: gm.Middleware[];
|
|
288
265
|
};
|
|
289
266
|
LtdFinancialEntity?: {
|
|
290
267
|
'*'?: gm.Middleware[];
|
|
@@ -3,14 +3,10 @@ import { Injectable, Scope } from 'graphql-modules';
|
|
|
3
3
|
import { DBProvider } from '@modules/app-providers/db.provider.js';
|
|
4
4
|
import { sql } from '@pgtyped/runtime';
|
|
5
5
|
import { getCacheInstance } from '@shared/helpers';
|
|
6
|
-
import { adminBusinessUpdateSchema } from '../helpers/admin-businesses.helper.js';
|
|
7
6
|
import type {
|
|
8
7
|
IGetAdminBusinessesByIdsQuery,
|
|
9
8
|
IGetAllAdminBusinessesQuery,
|
|
10
9
|
IGetAllAdminBusinessesResult,
|
|
11
|
-
IUpdateAdminBusinessesParams,
|
|
12
|
-
IUpdateAdminBusinessesQuery,
|
|
13
|
-
IUpdateAdminBusinessesResult,
|
|
14
10
|
} from '../types.js';
|
|
15
11
|
|
|
16
12
|
const getAdminBusinessesByIds = sql<IGetAdminBusinessesByIdsQuery>`
|
|
@@ -32,37 +28,6 @@ const getAllAdminBusinesses = sql<IGetAllAdminBusinessesQuery>`
|
|
|
32
28
|
INNER JOIN accounter_schema.financial_entities fe
|
|
33
29
|
USING (id);`;
|
|
34
30
|
|
|
35
|
-
const updateAdminBusinesses = sql<IUpdateAdminBusinessesQuery>`
|
|
36
|
-
UPDATE accounter_schema.businesses_admin
|
|
37
|
-
SET
|
|
38
|
-
business_registration_start_date = COALESCE(
|
|
39
|
-
$businessRegistrationStartDate,
|
|
40
|
-
business_registration_start_date
|
|
41
|
-
),
|
|
42
|
-
company_tax_id = COALESCE(
|
|
43
|
-
$companyTaxId,
|
|
44
|
-
company_tax_id
|
|
45
|
-
),
|
|
46
|
-
advance_tax_rates = COALESCE(
|
|
47
|
-
$advanceTaxRates,
|
|
48
|
-
advance_tax_rates
|
|
49
|
-
),
|
|
50
|
-
tax_advances_ids = COALESCE(
|
|
51
|
-
$taxAdvancesIds,
|
|
52
|
-
tax_advances_ids
|
|
53
|
-
),
|
|
54
|
-
social_security_employer_ids = COALESCE(
|
|
55
|
-
$socialSecurityEmployerIds,
|
|
56
|
-
social_security_employer_ids
|
|
57
|
-
),
|
|
58
|
-
withholding_tax_annual_ids = COALESCE(
|
|
59
|
-
$withholdingTaxAnnualIds,
|
|
60
|
-
withholding_tax_annual_ids
|
|
61
|
-
)
|
|
62
|
-
WHERE
|
|
63
|
-
id = $id
|
|
64
|
-
RETURNING *;`;
|
|
65
|
-
|
|
66
31
|
@Injectable({
|
|
67
32
|
scope: Scope.Operation,
|
|
68
33
|
global: true,
|
|
@@ -104,15 +69,6 @@ export class AdminBusinessesProvider {
|
|
|
104
69
|
});
|
|
105
70
|
}
|
|
106
71
|
|
|
107
|
-
public async updateAdminBusiness(
|
|
108
|
-
params: IUpdateAdminBusinessesParams,
|
|
109
|
-
): Promise<IUpdateAdminBusinessesResult> {
|
|
110
|
-
const inputParams = adminBusinessUpdateSchema.parse(params);
|
|
111
|
-
const [result] = await updateAdminBusinesses.run(inputParams, this.dbProvider);
|
|
112
|
-
this.clearCache();
|
|
113
|
-
return result;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
72
|
public clearCache() {
|
|
117
73
|
this.cache.clear();
|
|
118
74
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { GraphQLError } from 'graphql';
|
|
2
2
|
import { dateToTimelessDateString } from '@shared/helpers';
|
|
3
|
-
import { TimelessDateString } from '@shared/types';
|
|
4
|
-
import { taxAdvancesRatesSchema, yearlyIdsSchema } from '../helpers/admin-businesses.helper.js';
|
|
5
3
|
import { AdminBusinessesProvider } from '../providers/admin-businesses.provider.js';
|
|
6
4
|
import { BusinessesProvider } from '../providers/businesses.provider.js';
|
|
7
5
|
import type { FinancialEntitiesModule } from '../types.js';
|
|
@@ -24,40 +22,6 @@ export const adminBusinessesResolvers: FinancialEntitiesModule.Resolvers = {
|
|
|
24
22
|
return adminBusinesses;
|
|
25
23
|
},
|
|
26
24
|
},
|
|
27
|
-
Mutation: {
|
|
28
|
-
updateAdminBusiness: async (_, { businessId, fields }, { injector }) => {
|
|
29
|
-
try {
|
|
30
|
-
await injector.get(AdminBusinessesProvider).updateAdminBusiness({
|
|
31
|
-
id: businessId,
|
|
32
|
-
...fields,
|
|
33
|
-
taxAdvancesIds: fields.taxAdvancesAnnualIds
|
|
34
|
-
? [...fields.taxAdvancesAnnualIds]
|
|
35
|
-
: undefined,
|
|
36
|
-
advanceTaxRates: fields.taxAdvancesRates ? [...fields.taxAdvancesRates] : undefined,
|
|
37
|
-
withholdingTaxAnnualIds: fields.withholdingTaxAnnualIds
|
|
38
|
-
? [...fields.withholdingTaxAnnualIds]
|
|
39
|
-
: undefined,
|
|
40
|
-
socialSecurityEmployerIds: fields.socialSecurityEmployerIds
|
|
41
|
-
? [...fields.socialSecurityEmployerIds]
|
|
42
|
-
: undefined,
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
const updatedAdminBusiness = await injector
|
|
46
|
-
.get(AdminBusinessesProvider)
|
|
47
|
-
.getAdminBusinessByIdLoader.load(businessId);
|
|
48
|
-
|
|
49
|
-
if (!updatedAdminBusiness) {
|
|
50
|
-
throw new GraphQLError(`Error updating Admin business ID="${businessId}"`);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return updatedAdminBusiness;
|
|
54
|
-
} catch (error) {
|
|
55
|
-
const message = `Error updating Admin business ID="${businessId}"`;
|
|
56
|
-
console.error(message, error);
|
|
57
|
-
throw new GraphQLError(message);
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
25
|
AdminBusiness: {
|
|
62
26
|
id: admin => admin.id,
|
|
63
27
|
name: admin => admin.name,
|
|
@@ -67,12 +31,6 @@ export const adminBusinessesResolvers: FinancialEntitiesModule.Resolvers = {
|
|
|
67
31
|
}
|
|
68
32
|
return admin.vat_number;
|
|
69
33
|
},
|
|
70
|
-
registrationDate: admin => {
|
|
71
|
-
if (!admin.registration_date) {
|
|
72
|
-
throw new GraphQLError(`Admin business ID="${admin.id}" has no registration date`);
|
|
73
|
-
}
|
|
74
|
-
return dateToTimelessDateString(admin.registration_date);
|
|
75
|
-
},
|
|
76
34
|
business: async (admin, _, { injector }) => {
|
|
77
35
|
const business = await injector.get(BusinessesProvider).getBusinessByIdLoader.load(admin.id);
|
|
78
36
|
if (!business) {
|
|
@@ -80,16 +38,17 @@ export const adminBusinessesResolvers: FinancialEntitiesModule.Resolvers = {
|
|
|
80
38
|
}
|
|
81
39
|
return business;
|
|
82
40
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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,
|
|
46
|
+
registrationDate: admin => {
|
|
47
|
+
if (!admin.registration_date) {
|
|
48
|
+
throw new GraphQLError(`Admin business ID="${admin.id}" has no registration date`);
|
|
49
|
+
}
|
|
50
|
+
return dateToTimelessDateString(admin.registration_date);
|
|
51
|
+
},
|
|
93
52
|
},
|
|
94
53
|
LtdFinancialEntity: {
|
|
95
54
|
adminInfo: async (parentBusiness, _, { injector }) => {
|