@accounter/server 0.0.8-alpha-20251029233737-ec3a7806df63c8556b232ea893d0d3855d2c402a → 0.0.8-alpha-20251029234818-bb69914cb7aaa4859296baa4a256c251158fd15b
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 +20 -26
- package/dist/green-invoice-graphql/src/mesh-artifacts/index.d.ts +1 -1
- package/dist/server/src/__generated__/types.d.ts +70 -18
- package/dist/server/src/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/contracts/__generated__/contracts.types.d.ts +5 -0
- package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.d.ts +57 -0
- package/dist/server/src/modules/financial-entities/__generated__/admin-businesses.types.js +0 -1
- 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 +33 -10
- package/dist/server/src/modules/financial-entities/__generated__/types.js.map +1 -1
- package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.d.ts +31 -0
- package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.js +27 -0
- package/dist/server/src/modules/financial-entities/helpers/admin-businesses.helper.js.map +1 -0
- package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.d.ts +2 -1
- package/dist/server/src/modules/financial-entities/providers/admin-businesses.provider.js +37 -0
- 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 +46 -11
- 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 +49 -16
- 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/package.json +4 -4
- package/src/__generated__/types.ts +76 -18
- package/src/modules/contracts/__generated__/contracts.types.ts +5 -0
- package/src/modules/financial-entities/__generated__/admin-businesses.types.ts +60 -0
- package/src/modules/financial-entities/__generated__/types.ts +33 -10
- package/src/modules/financial-entities/helpers/admin-businesses.helper.ts +33 -0
- package/src/modules/financial-entities/providers/admin-businesses.provider.ts +44 -0
- package/src/modules/financial-entities/resolvers/admin-businesses.resolver.ts +53 -11
- package/src/modules/financial-entities/typeDefs/admin-businesses.graphql.ts +49 -16
- package/src/modules/financial-entities/types.ts +1 -1
|
@@ -4,7 +4,9 @@ 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' | 'registrationDate' | 'business' | 'taxAdvancesAnnualIds' | 'taxAdvancesRates' | 'withholdingTaxCompanyId' | 'withholdingTaxAnnualIds' | 'socialSecurityDeductionsId' | 'socialSecurityEmployerIds';
|
|
8
|
+
AnnualId: 'year' | 'id';
|
|
9
|
+
TaxAdvancesRate: 'date' | 'rate';
|
|
8
10
|
BusinessTransactionsSumFromLedgerRecordsSuccessfulResult: 'businessTransactionsSum';
|
|
9
11
|
BusinessTransactionSum: 'business' | 'credit' | 'debit' | 'total' | 'foreignCurrenciesSum';
|
|
10
12
|
ForeignCurrencySum: 'credit' | 'debit' | 'total' | 'currency';
|
|
@@ -50,8 +52,10 @@ export namespace FinancialEntitiesModule {
|
|
|
50
52
|
};
|
|
51
53
|
|
|
52
54
|
interface DefinedInputFields {
|
|
53
|
-
CreateAdminBusinessInput: 'businessId' | '
|
|
54
|
-
UpdateAdminBusinessInput: '
|
|
55
|
+
CreateAdminBusinessInput: 'businessId' | 'registrationDate' | 'companyTaxId' | 'taxAdvancesAnnualId' | 'taxAdvancesRate' | 'withholdingTaxAnnualId' | 'socialSecurityEmployerId';
|
|
56
|
+
UpdateAdminBusinessInput: 'name' | 'governmentId' | 'registrationDate' | 'taxAdvancesAnnualIds' | 'taxAdvancesRates' | 'withholdingTaxCompanyId' | 'withholdingTaxAnnualIds' | 'socialSecurityEmployerIds';
|
|
57
|
+
AnnualIdInput: 'year' | 'id';
|
|
58
|
+
TaxAdvancesRateInput: 'date' | 'rate';
|
|
55
59
|
BusinessTransactionsFilter: 'businessIDs' | 'ownerIds' | 'type' | 'fromDate' | 'toDate' | 'includeRevaluation';
|
|
56
60
|
UpdateBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
|
|
57
61
|
InsertNewBusinessInput: 'name' | 'sortCode' | 'country' | 'hebrewName' | 'address' | 'email' | 'website' | 'phoneNumber' | 'governmentId' | 'taxCategory' | 'exemptDealer' | 'suggestions' | 'optionalVAT' | 'isReceiptEnough' | 'isDocumentsOptional' | 'pcn874RecordType' | 'irsCode' | 'isActive';
|
|
@@ -70,8 +74,12 @@ export namespace FinancialEntitiesModule {
|
|
|
70
74
|
export type Mutation = Pick<Types.Mutation, DefinedFields['Mutation']>;
|
|
71
75
|
export type CreateAdminBusinessInput = Pick<Types.CreateAdminBusinessInput, DefinedInputFields['CreateAdminBusinessInput']>;
|
|
72
76
|
export type UpdateAdminBusinessInput = Pick<Types.UpdateAdminBusinessInput, DefinedInputFields['UpdateAdminBusinessInput']>;
|
|
73
|
-
export type LtdFinancialEntity = Pick<Types.LtdFinancialEntity, DefinedFields['LtdFinancialEntity']>;
|
|
74
77
|
export type TimelessDate = Types.TimelessDate;
|
|
78
|
+
export type LtdFinancialEntity = Pick<Types.LtdFinancialEntity, DefinedFields['LtdFinancialEntity']>;
|
|
79
|
+
export type AnnualId = Pick<Types.AnnualId, DefinedFields['AnnualId']>;
|
|
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']>;
|
|
75
83
|
export type BusinessTransactionsSumFromLedgerRecordsResult = Types.BusinessTransactionsSumFromLedgerRecordsResult;
|
|
76
84
|
export type BusinessTransactionsFilter = Pick<Types.BusinessTransactionsFilter, DefinedInputFields['BusinessTransactionsFilter']>;
|
|
77
85
|
export type BusinessTransactionsFromLedgerRecordsResult = Types.BusinessTransactionsFromLedgerRecordsResult;
|
|
@@ -139,6 +147,8 @@ export namespace FinancialEntitiesModule {
|
|
|
139
147
|
export type QueryResolvers = Pick<Types.QueryResolvers, DefinedFields['Query']>;
|
|
140
148
|
export type MutationResolvers = Pick<Types.MutationResolvers, DefinedFields['Mutation']>;
|
|
141
149
|
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']>;
|
|
142
152
|
export type BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers = Pick<Types.BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers, DefinedFields['BusinessTransactionsSumFromLedgerRecordsSuccessfulResult'] | '__isTypeOf'>;
|
|
143
153
|
export type BusinessTransactionSumResolvers = Pick<Types.BusinessTransactionSumResolvers, DefinedFields['BusinessTransactionSum']>;
|
|
144
154
|
export type ForeignCurrencySumResolvers = Pick<Types.ForeignCurrencySumResolvers, DefinedFields['ForeignCurrencySum']>;
|
|
@@ -181,6 +191,8 @@ export namespace FinancialEntitiesModule {
|
|
|
181
191
|
Query?: QueryResolvers;
|
|
182
192
|
Mutation?: MutationResolvers;
|
|
183
193
|
AdminBusiness?: AdminBusinessResolvers;
|
|
194
|
+
AnnualId?: AnnualIdResolvers;
|
|
195
|
+
TaxAdvancesRate?: TaxAdvancesRateResolvers;
|
|
184
196
|
BusinessTransactionsSumFromLedgerRecordsSuccessfulResult?: BusinessTransactionsSumFromLedgerRecordsSuccessfulResultResolvers;
|
|
185
197
|
BusinessTransactionSum?: BusinessTransactionSumResolvers;
|
|
186
198
|
ForeignCurrencySum?: ForeignCurrencySumResolvers;
|
|
@@ -255,13 +267,24 @@ export namespace FinancialEntitiesModule {
|
|
|
255
267
|
id?: gm.Middleware[];
|
|
256
268
|
name?: gm.Middleware[];
|
|
257
269
|
governmentId?: gm.Middleware[];
|
|
258
|
-
business?: gm.Middleware[];
|
|
259
|
-
withholdingTaxBookNumber?: gm.Middleware[];
|
|
260
|
-
withholdingTaxFileNumber?: gm.Middleware[];
|
|
261
|
-
socialSecurityEmployerId?: gm.Middleware[];
|
|
262
|
-
taxAdvancesRate?: gm.Middleware[];
|
|
263
|
-
taxAdvancesId?: gm.Middleware[];
|
|
264
270
|
registrationDate?: gm.Middleware[];
|
|
271
|
+
business?: gm.Middleware[];
|
|
272
|
+
taxAdvancesAnnualIds?: gm.Middleware[];
|
|
273
|
+
taxAdvancesRates?: gm.Middleware[];
|
|
274
|
+
withholdingTaxCompanyId?: gm.Middleware[];
|
|
275
|
+
withholdingTaxAnnualIds?: gm.Middleware[];
|
|
276
|
+
socialSecurityDeductionsId?: gm.Middleware[];
|
|
277
|
+
socialSecurityEmployerIds?: gm.Middleware[];
|
|
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[];
|
|
265
288
|
};
|
|
266
289
|
LtdFinancialEntity?: {
|
|
267
290
|
'*'?: gm.Middleware[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
const yearlyIdSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
year: z.number().min(2000).max(2100),
|
|
6
|
+
id: z.string().min(1, { message: 'ID is required' }),
|
|
7
|
+
})
|
|
8
|
+
.strict();
|
|
9
|
+
|
|
10
|
+
const taxAdvanceRateSchema = z
|
|
11
|
+
.object({
|
|
12
|
+
date: z.iso.date(),
|
|
13
|
+
rate: z.number().min(0).max(1),
|
|
14
|
+
})
|
|
15
|
+
.strict();
|
|
16
|
+
|
|
17
|
+
export const adminBusinessUpdateSchema = z
|
|
18
|
+
.object({
|
|
19
|
+
id: z.uuid(),
|
|
20
|
+
businessRegistrationStartDate: z.iso.date().optional(),
|
|
21
|
+
companyTaxId: z.string().optional(),
|
|
22
|
+
advanceTaxRates: z.array(taxAdvanceRateSchema).optional(),
|
|
23
|
+
taxAdvancesIds: z.array(yearlyIdSchema).optional(),
|
|
24
|
+
socialSecurityEmployerIds: z.array(yearlyIdSchema).optional(),
|
|
25
|
+
withholdingTaxAnnualIds: z.array(yearlyIdSchema).optional(),
|
|
26
|
+
})
|
|
27
|
+
.strict();
|
|
28
|
+
|
|
29
|
+
export type AdminBusinessUpdateSchema = z.infer<typeof adminBusinessUpdateSchema>;
|
|
30
|
+
|
|
31
|
+
export const yearlyIdsSchema = z.array(yearlyIdSchema);
|
|
32
|
+
|
|
33
|
+
export const taxAdvancesRatesSchema = z.array(taxAdvanceRateSchema);
|
|
@@ -3,10 +3,14 @@ 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';
|
|
6
7
|
import type {
|
|
7
8
|
IGetAdminBusinessesByIdsQuery,
|
|
8
9
|
IGetAllAdminBusinessesQuery,
|
|
9
10
|
IGetAllAdminBusinessesResult,
|
|
11
|
+
IUpdateAdminBusinessesParams,
|
|
12
|
+
IUpdateAdminBusinessesQuery,
|
|
13
|
+
IUpdateAdminBusinessesResult,
|
|
10
14
|
} from '../types.js';
|
|
11
15
|
|
|
12
16
|
const getAdminBusinessesByIds = sql<IGetAdminBusinessesByIdsQuery>`
|
|
@@ -28,6 +32,37 @@ const getAllAdminBusinesses = sql<IGetAllAdminBusinessesQuery>`
|
|
|
28
32
|
INNER JOIN accounter_schema.financial_entities fe
|
|
29
33
|
USING (id);`;
|
|
30
34
|
|
|
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
|
+
|
|
31
66
|
@Injectable({
|
|
32
67
|
scope: Scope.Operation,
|
|
33
68
|
global: true,
|
|
@@ -69,6 +104,15 @@ export class AdminBusinessesProvider {
|
|
|
69
104
|
});
|
|
70
105
|
}
|
|
71
106
|
|
|
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
|
+
|
|
72
116
|
public clearCache() {
|
|
73
117
|
this.cache.clear();
|
|
74
118
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
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';
|
|
3
5
|
import { AdminBusinessesProvider } from '../providers/admin-businesses.provider.js';
|
|
4
6
|
import { BusinessesProvider } from '../providers/businesses.provider.js';
|
|
5
7
|
import type { FinancialEntitiesModule } from '../types.js';
|
|
@@ -22,6 +24,41 @@ export const adminBusinessesResolvers: FinancialEntitiesModule.Resolvers = {
|
|
|
22
24
|
return adminBusinesses;
|
|
23
25
|
},
|
|
24
26
|
},
|
|
27
|
+
Mutation: {
|
|
28
|
+
updateAdminBusiness: async (_, { businessId, fields }, { injector }) => {
|
|
29
|
+
try {
|
|
30
|
+
await injector.get(AdminBusinessesProvider).updateAdminBusiness({
|
|
31
|
+
id: businessId,
|
|
32
|
+
businessRegistrationStartDate: fields.registrationDate,
|
|
33
|
+
companyTaxId: fields.withholdingTaxCompanyId,
|
|
34
|
+
taxAdvancesIds: fields.taxAdvancesAnnualIds
|
|
35
|
+
? [...fields.taxAdvancesAnnualIds]
|
|
36
|
+
: undefined,
|
|
37
|
+
advanceTaxRates: fields.taxAdvancesRates ? [...fields.taxAdvancesRates] : undefined,
|
|
38
|
+
withholdingTaxAnnualIds: fields.withholdingTaxAnnualIds
|
|
39
|
+
? [...fields.withholdingTaxAnnualIds]
|
|
40
|
+
: undefined,
|
|
41
|
+
socialSecurityEmployerIds: fields.socialSecurityEmployerIds
|
|
42
|
+
? [...fields.socialSecurityEmployerIds]
|
|
43
|
+
: undefined,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const updatedAdminBusiness = await injector
|
|
47
|
+
.get(AdminBusinessesProvider)
|
|
48
|
+
.getAdminBusinessByIdLoader.load(businessId);
|
|
49
|
+
|
|
50
|
+
if (!updatedAdminBusiness) {
|
|
51
|
+
throw new GraphQLError(`Error updating Admin business ID="${businessId}"`);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return updatedAdminBusiness;
|
|
55
|
+
} catch (error) {
|
|
56
|
+
const message = `Error updating Admin business ID="${businessId}"`;
|
|
57
|
+
console.error(message, error);
|
|
58
|
+
throw new GraphQLError(message);
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
},
|
|
25
62
|
AdminBusiness: {
|
|
26
63
|
id: admin => admin.id,
|
|
27
64
|
name: admin => admin.name,
|
|
@@ -31,6 +68,12 @@ export const adminBusinessesResolvers: FinancialEntitiesModule.Resolvers = {
|
|
|
31
68
|
}
|
|
32
69
|
return admin.vat_number;
|
|
33
70
|
},
|
|
71
|
+
registrationDate: admin => {
|
|
72
|
+
if (!admin.registration_date) {
|
|
73
|
+
throw new GraphQLError(`Admin business ID="${admin.id}" has no registration date`);
|
|
74
|
+
}
|
|
75
|
+
return dateToTimelessDateString(admin.registration_date);
|
|
76
|
+
},
|
|
34
77
|
business: async (admin, _, { injector }) => {
|
|
35
78
|
const business = await injector.get(BusinessesProvider).getBusinessByIdLoader.load(admin.id);
|
|
36
79
|
if (!business) {
|
|
@@ -38,17 +81,16 @@ export const adminBusinessesResolvers: FinancialEntitiesModule.Resolvers = {
|
|
|
38
81
|
}
|
|
39
82
|
return business;
|
|
40
83
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
},
|
|
84
|
+
taxAdvancesAnnualIds: admin => yearlyIdsSchema.parse(admin.tax_advances_ids),
|
|
85
|
+
taxAdvancesRates: admin =>
|
|
86
|
+
taxAdvancesRatesSchema.parse(admin.advance_tax_rates) as Array<{
|
|
87
|
+
date: TimelessDateString;
|
|
88
|
+
rate: number;
|
|
89
|
+
}>,
|
|
90
|
+
withholdingTaxCompanyId: admin => admin.company_tax_id,
|
|
91
|
+
withholdingTaxAnnualIds: admin => yearlyIdsSchema.parse(admin.withholding_tax_annual_ids),
|
|
92
|
+
socialSecurityDeductionsId: admin => `${admin.company_tax_id}00`,
|
|
93
|
+
socialSecurityEmployerIds: admin => yearlyIdsSchema.parse(admin.social_security_employer_ids),
|
|
52
94
|
},
|
|
53
95
|
LtdFinancialEntity: {
|
|
54
96
|
adminInfo: async (parentBusiness, _, { injector }) => {
|
|
@@ -19,34 +19,67 @@ export default gql`
|
|
|
19
19
|
id: UUID!
|
|
20
20
|
name: String!
|
|
21
21
|
governmentId: String!
|
|
22
|
-
business: LtdFinancialEntity!
|
|
23
|
-
withholdingTaxBookNumber: String
|
|
24
|
-
withholdingTaxFileNumber: String
|
|
25
|
-
socialSecurityEmployerId: String
|
|
26
|
-
taxAdvancesRate: Float
|
|
27
|
-
taxAdvancesId: String
|
|
28
22
|
registrationDate: TimelessDate!
|
|
23
|
+
business: LtdFinancialEntity!
|
|
24
|
+
" Tax Advances Info "
|
|
25
|
+
taxAdvancesAnnualIds: [AnnualId!]!
|
|
26
|
+
taxAdvancesRates: [TaxAdvancesRate!]!
|
|
27
|
+
" Withholding Tax Info "
|
|
28
|
+
withholdingTaxCompanyId: String
|
|
29
|
+
withholdingTaxAnnualIds: [AnnualId!]!
|
|
30
|
+
" Social Security Info "
|
|
31
|
+
socialSecurityDeductionsId: String
|
|
32
|
+
socialSecurityEmployerIds: [AnnualId!]!
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
" Represents an annual identifier for tax purposes. "
|
|
36
|
+
type AnnualId {
|
|
37
|
+
year: Int!
|
|
38
|
+
id: String!
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
" Represents the tax advance rate for a specific date. "
|
|
42
|
+
type TaxAdvancesRate {
|
|
43
|
+
date: TimelessDate!
|
|
44
|
+
rate: Float!
|
|
29
45
|
}
|
|
30
46
|
|
|
31
47
|
" Input type for creating a new admin business. "
|
|
32
48
|
input CreateAdminBusinessInput {
|
|
33
49
|
businessId: UUID!
|
|
34
|
-
withholdingTaxBookNumber: String
|
|
35
|
-
withholdingTaxFileNumber: String
|
|
36
|
-
socialSecurityEmployerId: String
|
|
37
|
-
taxAdvancesRate: Float
|
|
38
|
-
taxAdvancesId: String
|
|
39
50
|
registrationDate: TimelessDate!
|
|
51
|
+
companyTaxId: String!
|
|
52
|
+
taxAdvancesAnnualId: String
|
|
53
|
+
taxAdvancesRate: Float
|
|
54
|
+
withholdingTaxAnnualId: String
|
|
55
|
+
socialSecurityEmployerId: String
|
|
40
56
|
}
|
|
41
57
|
|
|
42
58
|
" Input type for updating admin business details. "
|
|
43
59
|
input UpdateAdminBusinessInput {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
socialSecurityEmployerId: String
|
|
47
|
-
taxAdvancesRate: Float
|
|
48
|
-
taxAdvancesId: String
|
|
60
|
+
name: String
|
|
61
|
+
governmentId: String
|
|
49
62
|
registrationDate: TimelessDate
|
|
63
|
+
" Tax Advances Info "
|
|
64
|
+
taxAdvancesAnnualIds: [AnnualIdInput!]
|
|
65
|
+
taxAdvancesRates: [TaxAdvancesRateInput!]
|
|
66
|
+
" Withholding Tax Info "
|
|
67
|
+
withholdingTaxCompanyId: String
|
|
68
|
+
withholdingTaxAnnualIds: [AnnualIdInput!]
|
|
69
|
+
" Social Security Info "
|
|
70
|
+
socialSecurityEmployerIds: [AnnualIdInput!]
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
" Input type representing an annual identifier for tax purposes. "
|
|
74
|
+
input AnnualIdInput {
|
|
75
|
+
year: Int!
|
|
76
|
+
id: String!
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
" Input type representing the tax advance rate for a specific date. "
|
|
80
|
+
input TaxAdvancesRateInput {
|
|
81
|
+
date: TimelessDate!
|
|
82
|
+
rate: Float!
|
|
50
83
|
}
|
|
51
84
|
|
|
52
85
|
extend type LtdFinancialEntity {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './__generated__/types.js';
|
|
2
|
-
export type { Json, pcn874_record_type } from './__generated__/businesses.types.js';
|
|
2
|
+
export type { Json, pcn874_record_type, DateOrString } from './__generated__/businesses.types.js';
|
|
3
3
|
export * from './__generated__/businesses.types.js';
|
|
4
4
|
export * from './__generated__/businesses-operation.types.js';
|
|
5
5
|
export * from './__generated__/admin-businesses.types.js';
|