@posx/core 5.5.90 → 5.5.91

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
@@ -3814,6 +3834,10 @@ declare module '@posx/core/types/product.type' {
3814
3834
  * The price of the item.
3815
3835
  */
3816
3836
  price: number;
3837
+ /**
3838
+ * The original price of the item.
3839
+ */
3840
+ original_price: number;
3817
3841
  /**
3818
3842
  * The price list of the item.
3819
3843
  */
@@ -3851,6 +3875,7 @@ declare module '@posx/core/types/product.type' {
3851
3875
  barcode: string;
3852
3876
  category_uid: string;
3853
3877
  price: number;
3878
+ original_price: number;
3854
3879
  prices: Array<IPrice>;
3855
3880
  stock: number;
3856
3881
  print_on_receipt: boolean;