@posx/core 5.5.90 → 5.5.92

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/build/index.d.ts CHANGED
@@ -1138,13 +1138,11 @@ declare module '@posx/core/services/invoice.service' {
1138
1138
  * @param customer - The customer associated with the invoice.
1139
1139
  * @param appConfig - The app configuration.
1140
1140
  * @param item - The item to add to the invoice line.
1141
- * @param quantity - The quantity of the item to add.
1142
- * @param price - The price of the item.
1143
1141
  * @param modifiers - An array of modifiers to apply to the item.
1144
1142
  * @param options - Additional options for the line.
1145
1143
  * @returns The updated invoice.
1146
1144
  */
1147
- addItemToLine(invoice: IInvoice, customer: ICustomer, appConfig: IAppConfig, item: IItem, modifiers?: IInvoiceCoreLine[], options?: LineOptions): IInvoice;
1145
+ addItemToLine(invoice: IInvoice, customer: ICustomer, appConfig: IAppConfig, item: IItem, modifiers?: IInvoiceCoreLine[], options?: LineOptions): IInvoiceLine;
1148
1146
  /**
1149
1147
  * Duplicates an invoice line
1150
1148
  * @param invoice - The invoice to duplicate the line in.
@@ -1246,9 +1244,29 @@ declare module '@posx/core/services/invoice.service' {
1246
1244
  * @returns The updated invoice line.
1247
1245
  */
1248
1246
  overwriteNoteToLine(line: IInvoiceLine, note: string): IInvoiceLine;
1247
+ /**
1248
+ * To add combo items under one combo
1249
+ * @param invoice - The invoice to add the item to.
1250
+ * @param customer - The customer associated with the invoice.
1251
+ * @param appConfig - The app configuration.
1252
+ * @param item - The item to add to the invoice line.
1253
+ * @param comboLineUid the main combo's line uid
1254
+ * @param comboGroupUid the uid of the combo_group the item belongs to
1255
+ * @param modifiers - An array of modifiers to apply to the item (default is [])
1256
+ * @param options - Additional options for the line.
1257
+ */
1258
+ addComboItemToLine(invoice: IInvoice, customer: ICustomer, appConfig: IAppConfig, item: IItem, comboLineUid: string, comboGroupUid: string, modifiers?: IInvoiceCoreLine[], options?: LineOptions): IInvoiceLine;
1259
+ /**
1260
+ * For combo's operations, if a combo is removed, all combo items under it will be removed
1261
+ * Use this operation to remove all combo items
1262
+ * And use minusLineQuantity to remove main combo.
1263
+ * @param invoice the invoice
1264
+ * @param comboLineUid The combo's line uid
1265
+ */
1266
+ removeAllComboItems(Invoice: IInvoice, comboLineUid: string): IInvoiceLine[];
1249
1267
  }
1250
1268
  export class LineOperationService extends InvoiceBaseService implements ILineOperationService {
1251
- addItemToLine(invoice: IInvoice, customer: ICustomer, appConfig: IAppConfig, item: IItem, modifiers?: IInvoiceCoreLine[], lineOptions?: LineOptions): IInvoice;
1269
+ addItemToLine(invoice: IInvoice, customer: ICustomer, appConfig: IAppConfig, item: IItem, modifiers?: IInvoiceCoreLine[], lineOptions?: LineOptions): IInvoiceLine;
1252
1270
  duplicateLine(invoice: IInvoice, line: IInvoiceLine): IInvoice;
1253
1271
  calibrateDuplicates(invoice: IInvoice): IInvoice;
1254
1272
  toInvoiceCoreLine(modifier: ICoreItem, quantity?: number): IInvoiceCoreLine;
@@ -1272,6 +1290,8 @@ declare module '@posx/core/services/invoice.service' {
1272
1290
  * @param source
1273
1291
  */
1274
1292
  protected compareLines(target: IInvoiceLine, source: IInvoiceLine): boolean;
1293
+ addComboItemToLine(invoice: IInvoice, customer: ICustomer, appConfig: IAppConfig, item: IItem, comboLineUid: string, comboGroupUid: string, modifiers?: IInvoiceCoreLine[], options?: LineOptions): IInvoiceLine;
1294
+ removeAllComboItems(invoice: IInvoice, comboLineUid: string): IInvoiceLine[];
1275
1295
  }
1276
1296
  /**
1277
1297
  * Interface for invoice operation service that extends line operation service
@@ -2837,8 +2857,10 @@ declare module '@posx/core/types/invoice.type' {
2837
2857
  charges: IInvoiceCharge[];
2838
2858
  /** Flag to track if charge has been manually deleted by user */
2839
2859
  is_charge_triggered?: boolean;
2840
- /** Meta data for the line item */
2860
+ /** Meta data for the invoice */
2841
2861
  meta: Record<string, any>;
2862
+ /** If the key is not null or empty, meaning the items prices are from this price lookup key tier */
2863
+ price_lookup_key: string;
2842
2864
  }
2843
2865
  export class InvoiceCoreLine implements IInvoiceCoreLine {
2844
2866
  item_uid: string;
@@ -2948,6 +2970,7 @@ declare module '@posx/core/types/invoice.type' {
2948
2970
  is_charge_triggered: boolean;
2949
2971
  uid: string;
2950
2972
  meta: Record<string, any>;
2973
+ price_lookup_key: string;
2951
2974
  constructor();
2952
2975
  }
2953
2976
  export type CreateInvoiceOptions = {
@@ -3814,6 +3837,10 @@ declare module '@posx/core/types/product.type' {
3814
3837
  * The price of the item.
3815
3838
  */
3816
3839
  price: number;
3840
+ /**
3841
+ * The original price of the item.
3842
+ */
3843
+ original_price: number;
3817
3844
  /**
3818
3845
  * The price list of the item.
3819
3846
  */
@@ -3851,6 +3878,7 @@ declare module '@posx/core/types/product.type' {
3851
3878
  barcode: string;
3852
3879
  category_uid: string;
3853
3880
  price: number;
3881
+ original_price: number;
3854
3882
  prices: Array<IPrice>;
3855
3883
  stock: number;
3856
3884
  print_on_receipt: boolean;