@erp-galoper/types 1.0.2033 → 1.0.2035

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 (2) hide show
  1. package/openapi.ts +216 -42
  2. package/package.json +1 -1
package/openapi.ts CHANGED
@@ -4535,6 +4535,31 @@ export interface paths {
4535
4535
  patch?: never;
4536
4536
  trace?: never;
4537
4537
  };
4538
+ "/api/v1/inventory/stock_adjustment/calculate-equivalent/": {
4539
+ parameters: {
4540
+ query?: never;
4541
+ header?: never;
4542
+ path?: never;
4543
+ cookie?: never;
4544
+ };
4545
+ get?: never;
4546
+ put?: never;
4547
+ /**
4548
+ * Calculate Stock Adjustment Equivalent
4549
+ * @description Endpoint for calculating the equivalent primary/secondary unit cost for a stock adjustment item.
4550
+ *
4551
+ * Possible Responses:
4552
+ * - 200: StockAdjustmentCalculateEquivalentCostResponseSchema
4553
+ * - 400: invalidChangedField, primaryUnitCostIsRequired, secondaryUnitCostIsRequired
4554
+ * - 500: serverError
4555
+ */
4556
+ post: operations["inventory_views_calculate_stock_adjustment_equivalent"];
4557
+ delete?: never;
4558
+ options?: never;
4559
+ head?: never;
4560
+ patch?: never;
4561
+ trace?: never;
4562
+ };
4538
4563
  "/api/v1/inventory/stock_adjustment/": {
4539
4564
  parameters: {
4540
4565
  query?: never;
@@ -4590,6 +4615,7 @@ export interface paths {
4590
4615
  * - serialNotInWarehouse - Serial is not present in warehouse
4591
4616
  * - item+warehouse+branch+unitOfMeasure+itemPackageConflict
4592
4617
  * - serialDoesNotExist - The selected serial does not exist
4618
+ * - reasonIsRequired - Reason is required when accounting is enabled and invoice posting method is perpetual
4593
4619
  * - 403: permissionDenied
4594
4620
  * - noBranchAccess
4595
4621
  * - noWarehouseAccess
@@ -4641,6 +4667,7 @@ export interface paths {
4641
4667
  * - serialNotAvailable - Serial is not in available status
4642
4668
  * - serialNotInWarehouse - Serial is not present in warehouse
4643
4669
  * - serialDoesNotExist - The selected serial does not exist
4670
+ * - reasonIsRequired - Reason is required when accounting is enabled and invoice posting method is perpetual
4644
4671
  * - 403: permissionDenied
4645
4672
  * - noBranchAccess
4646
4673
  * - noWarehouseAccess
@@ -4659,6 +4686,7 @@ export interface paths {
4659
4686
  * - "noBranchAccess"
4660
4687
  * - 404: "stockAdjustmentNotFound"
4661
4688
  * - 500: "serverError"
4689
+ * when delete stock adjustment , if it has linked documents which are JVs we should prompt user deleting adjustment will delete all linked documents.
4662
4690
  */
4663
4691
  delete: operations["inventory_views_delete_stock_adjustment"];
4664
4692
  options?: never;
@@ -24753,7 +24781,18 @@ export interface components {
24753
24781
  * @default []
24754
24782
  */
24755
24783
  warehouse: components["schemas"]["BasePermissionsSchema_Inventory_WarehouseEnum"][];
24784
+ /**
24785
+ * Cost
24786
+ * @description cost actions
24787
+ * @default []
24788
+ */
24789
+ cost: components["schemas"]["BasePermissionsSchema_Inventory_CostEnum"][];
24756
24790
  };
24791
+ /**
24792
+ * BasePermissionsSchema_Inventory_CostEnum
24793
+ * @enum {string}
24794
+ */
24795
+ BasePermissionsSchema_Inventory_CostEnum: "override" | "view";
24757
24796
  /**
24758
24797
  * BasePermissionsSchema_Inventory_GoodsdeliverynoteEnum
24759
24798
  * @enum {string}
@@ -25528,12 +25567,6 @@ export interface components {
25528
25567
  * @default []
25529
25568
  */
25530
25569
  salesrefundvoucher: components["schemas"]["BasePermissionsSchema_Sales_SalesrefundvoucherEnum"][];
25531
- /**
25532
- * Cost
25533
- * @description cost actions
25534
- * @default []
25535
- */
25536
- cost: components["schemas"]["BasePermissionsSchema_Sales_CostEnum"][];
25537
25570
  /**
25538
25571
  * Discount
25539
25572
  * @description discount actions
@@ -25564,11 +25597,6 @@ export interface components {
25564
25597
  * @enum {string}
25565
25598
  */
25566
25599
  BasePermissionsSchema_Sales_CollectiondepositEnum: "add" | "cancel" | "change" | "delete" | "resettodraft" | "view";
25567
- /**
25568
- * BasePermissionsSchema_Sales_CostEnum
25569
- * @constant
25570
- */
25571
- BasePermissionsSchema_Sales_CostEnum: "view";
25572
25600
  /**
25573
25601
  * BasePermissionsSchema_Sales_DiscountEnum
25574
25602
  * @constant
@@ -30592,7 +30620,7 @@ export interface components {
30592
30620
  * RetrieveJournalEntryType
30593
30621
  * @enum {string}
30594
30622
  */
30595
- RetrieveJournalEntryType: "manualJournalVoucher" | "openingBalance" | "yearClosing" | "salesTaxClosing" | "advancePayment" | "purchaseInvoice" | "paymentVoucher" | "purchaseReturn" | "creditNote" | "downPayment" | "salesInvoice" | "receiptVoucher" | "salesReturn" | "debitNote" | "expenses" | "salesDeferral" | "expenseDeferral" | "posSessionDiscrepancies" | "posOpeningSession" | "posClosingSession";
30623
+ RetrieveJournalEntryType: "manualJournalVoucher" | "openingBalance" | "yearClosing" | "salesTaxClosing" | "advancePayment" | "purchaseInvoice" | "paymentVoucher" | "purchaseReturn" | "creditNote" | "downPayment" | "salesInvoice" | "receiptVoucher" | "salesReturn" | "debitNote" | "expenses" | "salesDeferral" | "expenseDeferral" | "posSessionDiscrepancies" | "posOpeningSession" | "posClosingSession" | "inventoryAdjustment";
30596
30624
  /**
30597
30625
  * StatusChoices
30598
30626
  * @enum {string}
@@ -33110,6 +33138,27 @@ export interface components {
33110
33138
  */
33111
33139
  locations: components["schemas"]["LocationInfoSchema"][];
33112
33140
  };
33141
+ /** StockAdjustmentCalculateEquivalentCostResponseSchema */
33142
+ StockAdjustmentCalculateEquivalentCostResponseSchema: {
33143
+ /** Primaryunitcost */
33144
+ primaryUnitCost?: number | null;
33145
+ /** Secondaryunitcost */
33146
+ secondaryUnitCost?: number | null;
33147
+ };
33148
+ /** StockAdjustmentCalculateEquivalentCostSchema */
33149
+ StockAdjustmentCalculateEquivalentCostSchema: {
33150
+ /** Primaryunitcost */
33151
+ primaryUnitCost?: number | null;
33152
+ /** Secondaryunitcost */
33153
+ secondaryUnitCost?: number | null;
33154
+ /** @description Which field was just edited by the user: primaryUnitCost or secondaryUnitCost */
33155
+ changedField: components["schemas"]["StockAdjustmentCostChangedField"];
33156
+ };
33157
+ /**
33158
+ * StockAdjustmentCostChangedField
33159
+ * @enum {string}
33160
+ */
33161
+ StockAdjustmentCostChangedField: "primary_unit_cost" | "secondary_unit_cost";
33113
33162
  /**
33114
33163
  * AdjustmentTypeOption
33115
33164
  * @enum {string}
@@ -33148,6 +33197,38 @@ export interface components {
33148
33197
  * @enum {string}
33149
33198
  */
33150
33199
  InternalStatusOnReturnValueChoices: "draft" | "submitted" | "canceled";
33200
+ /**
33201
+ * LinkedDocumentsSchema
33202
+ * @description Schema for individual linked documents.
33203
+ *
33204
+ * NOTE: Defined here (before the mid-file `from inventory.item.schema import ...` import below)
33205
+ * to avoid a circular-import error. inventory.schema imports LinkedDocumentsSchema from this
33206
+ * module at module load time, and inventory.item.schema (imported below) in turn imports from
33207
+ * inventory.schema, so LinkedDocumentsSchema must already exist before that import executes.
33208
+ */
33209
+ LinkedDocumentsSchema: {
33210
+ /** Id */
33211
+ id: number | string;
33212
+ /** Serialnumber */
33213
+ serialNumber: string;
33214
+ /**
33215
+ * Date
33216
+ * Format: date
33217
+ */
33218
+ date: string;
33219
+ status: components["schemas"]["StatusChoices"];
33220
+ approvalStatus: components["schemas"]["ApprovalValueChoices"];
33221
+ /**
33222
+ * Total
33223
+ * @description This is a number
33224
+ */
33225
+ total?: string | null;
33226
+ createdBy?: components["schemas"]["UserSharedSchema"] | null;
33227
+ /** Linkeddocuments */
33228
+ linkedDocuments?: {
33229
+ [key: string]: components["schemas"]["LinkedDocumentsSchema"];
33230
+ }[];
33231
+ };
33151
33232
  /** Reason */
33152
33233
  Reason: {
33153
33234
  /** Id */
@@ -33186,6 +33267,20 @@ export interface components {
33186
33267
  * @default true
33187
33268
  */
33188
33269
  canDelete: boolean;
33270
+ /**
33271
+ * Primaryunitcost
33272
+ * @description Cost of the item in the company's primary currency.
33273
+ * Only populated when accounting is enabled (galoper_settings.accounting)
33274
+ * and system settings invoice posting method is perpetual, otherwise null.
33275
+ */
33276
+ primaryUnitCost?: number | null;
33277
+ /**
33278
+ * Secondaryunitcost
33279
+ * @description Cost of the item in the company's secondary currency.
33280
+ * Only populated when use_secondary_currency is enabled in system settings,
33281
+ * in addition to the primary_unit_cost requirements, otherwise null.
33282
+ */
33283
+ secondaryUnitCost?: number | null;
33189
33284
  };
33190
33285
  /** StockAdjustmentSchema */
33191
33286
  StockAdjustmentSchema: {
@@ -33208,6 +33303,10 @@ export interface components {
33208
33303
  branch: components["schemas"]["BranchSummaryInfo"];
33209
33304
  /** Description */
33210
33305
  description?: string | null;
33306
+ /** Linkeddocuments */
33307
+ linkedDocuments?: {
33308
+ [key: string]: components["schemas"]["LinkedDocumentsSchema"];
33309
+ }[];
33211
33310
  /**
33212
33311
  * Details
33213
33312
  * @default []
@@ -33230,7 +33329,7 @@ export interface components {
33230
33329
  item: string;
33231
33330
  /**
33232
33331
  * Reason
33233
- * @description Reason for the adjustment (optional but recommended for audit trail)
33332
+ * @description Reason for the adjustment (optional but recommended for audit trail), required when posting method in system settings is perpetual
33234
33333
  */
33235
33334
  reason?: number | null;
33236
33335
  /**
@@ -33278,6 +33377,25 @@ export interface components {
33278
33377
  * @description - Select from the item's available units of measure
33279
33378
  */
33280
33379
  unitOfMeasure: string;
33380
+ /**
33381
+ * Primaryunitcost
33382
+ * @description - Manual override for the item's cost in the company's primary currency
33383
+ * - Visible when accounting is enabled and invoice posting method is perpetual
33384
+ * - Disabled/ignored unless the user has the custom_permissions.override_cost permission,
33385
+ * in which case the backend calculates it automatically via calculate_item_cost
33386
+ * - user should see by default cost based on cost strategy
33387
+ */
33388
+ primaryUnitCost?: number | null;
33389
+ /**
33390
+ * Secondaryunitcost
33391
+ * @description - Manual override for the item's cost in the company's secondary currency
33392
+ * - Visible when use_secondary_currency is enabled, in addition to accounting being
33393
+ * enabled and invoice posting method being perpetual
33394
+ * - Disabled/ignored unless the user has the custom_permissions.override_cost permission,
33395
+ * in which case the backend calculates it automatically via calculate_item_cost
33396
+ * - user should see by default cost based on cost strategy
33397
+ */
33398
+ secondaryUnitCost?: number | null;
33281
33399
  };
33282
33400
  /**
33283
33401
  * InternalStatusOnCreateValueChoices
@@ -33340,6 +33458,10 @@ export interface components {
33340
33458
  branch: components["schemas"]["BranchSummaryInfo"];
33341
33459
  /** Description */
33342
33460
  description?: string | null;
33461
+ /** Linkeddocuments */
33462
+ linkedDocuments?: {
33463
+ [key: string]: components["schemas"]["LinkedDocumentsSchema"];
33464
+ }[];
33343
33465
  };
33344
33466
  /** StockAdjustmentUpdateSchema */
33345
33467
  StockAdjustmentUpdateSchema: {
@@ -33373,7 +33495,7 @@ export interface components {
33373
33495
  item: string;
33374
33496
  /**
33375
33497
  * Reason
33376
- * @description Reason for the adjustment (optional but recommended for audit trail)
33498
+ * @description Reason for the adjustment (optional but recommended for audit trail), required when posting method in system settings is perpetual
33377
33499
  */
33378
33500
  reason?: number | null;
33379
33501
  /**
@@ -33421,6 +33543,25 @@ export interface components {
33421
33543
  * @description - Select from the item's available units of measure
33422
33544
  */
33423
33545
  unitOfMeasure: string;
33546
+ /**
33547
+ * Primaryunitcost
33548
+ * @description - Manual override for the item's cost in the company's primary currency
33549
+ * - Visible when accounting is enabled and invoice posting method is perpetual
33550
+ * - Disabled/ignored unless the user has the custom_permissions.override_cost permission,
33551
+ * in which case the backend calculates it automatically via calculate_item_cost
33552
+ * - user should see by default cost based on cost strategy
33553
+ */
33554
+ primaryUnitCost?: number | null;
33555
+ /**
33556
+ * Secondaryunitcost
33557
+ * @description - Manual override for the item's cost in the company's secondary currency
33558
+ * - Visible when use_secondary_currency is enabled, in addition to accounting being
33559
+ * enabled and invoice posting method being perpetual
33560
+ * - Disabled/ignored unless the user has the custom_permissions.override_cost permission,
33561
+ * in which case the backend calculates it automatically via calculate_item_cost
33562
+ * - user should see by default cost based on cost strategy
33563
+ */
33564
+ secondaryUnitCost?: number | null;
33424
33565
  /**
33425
33566
  * Id
33426
33567
  * @description ID of the stock adjustment detail to update
@@ -33456,6 +33597,20 @@ export interface components {
33456
33597
  * @default true
33457
33598
  */
33458
33599
  canDelete: boolean;
33600
+ /**
33601
+ * Primaryunitcost
33602
+ * @description Cost of the item in the company's primary currency.
33603
+ * Only populated when accounting is enabled (galoper_settings.accounting)
33604
+ * and system settings invoice posting method is perpetual, otherwise null.
33605
+ */
33606
+ primaryUnitCost?: number | null;
33607
+ /**
33608
+ * Secondaryunitcost
33609
+ * @description Cost of the item in the company's secondary currency.
33610
+ * Only populated when use_secondary_currency is enabled in system settings,
33611
+ * in addition to the primary_unit_cost requirements, otherwise null.
33612
+ */
33613
+ secondaryUnitCost?: number | null;
33459
33614
  };
33460
33615
  /** StockAdjustmentRetrieveSchema */
33461
33616
  StockAdjustmentRetrieveSchema: {
@@ -33478,6 +33633,10 @@ export interface components {
33478
33633
  branch: components["schemas"]["BranchSummaryInfo"];
33479
33634
  /** Description */
33480
33635
  description?: string | null;
33636
+ /** Linkeddocuments */
33637
+ linkedDocuments?: {
33638
+ [key: string]: components["schemas"]["LinkedDocumentsSchema"];
33639
+ }[];
33481
33640
  /**
33482
33641
  * Details
33483
33642
  * @default []
@@ -33827,33 +33986,6 @@ export interface components {
33827
33986
  [key: string]: components["schemas"]["LinkedDocumentsSchema"];
33828
33987
  }[];
33829
33988
  };
33830
- /**
33831
- * LinkedDocumentsSchema
33832
- * @description Schema for individual linked documents.
33833
- */
33834
- LinkedDocumentsSchema: {
33835
- /** Id */
33836
- id: number | string;
33837
- /** Serialnumber */
33838
- serialNumber: string;
33839
- /**
33840
- * Date
33841
- * Format: date
33842
- */
33843
- date: string;
33844
- status: components["schemas"]["StatusChoices"];
33845
- approvalStatus: components["schemas"]["ApprovalValueChoices"];
33846
- /**
33847
- * Total
33848
- * @description This is a number
33849
- */
33850
- total?: string | null;
33851
- createdBy?: components["schemas"]["UserSharedSchema"] | null;
33852
- /** Linkeddocuments */
33853
- linkedDocuments?: {
33854
- [key: string]: components["schemas"]["LinkedDocumentsSchema"];
33855
- }[];
33856
- };
33857
33989
  /** TransferRequestCommonSchema */
33858
33990
  TransferRequestCommonSchema: {
33859
33991
  /**
@@ -70905,7 +71037,7 @@ export interface operations {
70905
71037
  /** @description required when isBatchExport is True */
70906
71038
  status?: ("draft" | "posted" | "reverse" | "canceled" | "submitted")[];
70907
71039
  /** @description required when isBatchExport is True */
70908
- type?: ("manualJournalVoucher" | "openingBalance" | "yearClosing" | "salesTaxClosing" | "advancePayment" | "purchaseInvoice" | "paymentVoucher" | "purchaseReturn" | "creditNote" | "downPayment" | "salesInvoice" | "receiptVoucher" | "salesReturn" | "debitNote" | "expenses" | "salesDeferral" | "expenseDeferral" | "posSessionDiscrepancies" | "posOpeningSession" | "posClosingSession")[];
71040
+ type?: ("manualJournalVoucher" | "openingBalance" | "yearClosing" | "salesTaxClosing" | "advancePayment" | "purchaseInvoice" | "paymentVoucher" | "purchaseReturn" | "creditNote" | "downPayment" | "salesInvoice" | "receiptVoucher" | "salesReturn" | "debitNote" | "expenses" | "salesDeferral" | "expenseDeferral" | "posSessionDiscrepancies" | "posOpeningSession" | "posClosingSession" | "inventoryAdjustment")[];
70909
71041
  branchId: string;
70910
71042
  /** @description The value is true when export in list of journal vouchers, and value is false when export single journal voucher */
70911
71043
  isBatchExport: boolean;
@@ -76924,6 +77056,48 @@ export interface operations {
76924
77056
  };
76925
77057
  };
76926
77058
  };
77059
+ inventory_views_calculate_stock_adjustment_equivalent: {
77060
+ parameters: {
77061
+ query?: never;
77062
+ header?: never;
77063
+ path?: never;
77064
+ cookie?: never;
77065
+ };
77066
+ requestBody: {
77067
+ content: {
77068
+ "application/json": components["schemas"]["StockAdjustmentCalculateEquivalentCostSchema"];
77069
+ };
77070
+ };
77071
+ responses: {
77072
+ /** @description OK */
77073
+ 200: {
77074
+ headers: {
77075
+ [name: string]: unknown;
77076
+ };
77077
+ content: {
77078
+ "application/json": components["schemas"]["StockAdjustmentCalculateEquivalentCostResponseSchema"];
77079
+ };
77080
+ };
77081
+ /** @description Bad Request */
77082
+ 400: {
77083
+ headers: {
77084
+ [name: string]: unknown;
77085
+ };
77086
+ content: {
77087
+ "application/json": components["schemas"]["ErrorMessages"];
77088
+ };
77089
+ };
77090
+ /** @description Internal Server Error */
77091
+ 500: {
77092
+ headers: {
77093
+ [name: string]: unknown;
77094
+ };
77095
+ content: {
77096
+ "application/json": components["schemas"]["MessageWithCode"];
77097
+ };
77098
+ };
77099
+ };
77100
+ };
76927
77101
  inventory_views_list_stock_adjustments: {
76928
77102
  parameters: {
76929
77103
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erp-galoper/types",
3
- "version": "1.0.2033",
3
+ "version": "1.0.2035",
4
4
  "main": "openapi.ts",
5
5
  "types": "openapi.ts",
6
6
  "files": ["openapi.ts"],