@posx/core 5.5.171 → 5.5.173

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
@@ -1027,7 +1027,7 @@ declare module '@posx/core/services/invoice.service' {
1027
1027
  import { IPrinter, PrinterType } from '@posx/core/types/printer.type';
1028
1028
  import { IEmployee } from '@posx/core/types/employee.type';
1029
1029
  import { QueryBuilder, QueryEtcParams } from '@posx/core/utils/autoquery.utils';
1030
- import { ICoupon } from '@posx/core/types/wyo.coupon.type';
1030
+ import { ICouponItemized } from '@posx/core/types/wyo.coupon.type';
1031
1031
  export interface IInvoiceBaseService extends IAppRemoteService<IInvoice> {
1032
1032
  calculate(invoice: IInvoice, appConfig: IAppConfig, disableRounding?: boolean): IInvoice;
1033
1033
  calculateLines(invoice: IInvoice): void;
@@ -1437,11 +1437,11 @@ declare module '@posx/core/services/invoice.service' {
1437
1437
  /**
1438
1438
  * Adds a coupon to an invoice
1439
1439
  * @param invoice - The invoice to add the coupon to
1440
- * @param coupon - The coupon to add to the invoice
1440
+ * @param itemized - The coupon to add to the invoice
1441
1441
  * @param calcFlow - The calculation flow to use for the coupon
1442
1442
  * @returns The updated invoice with the added coupon
1443
1443
  */
1444
- addCouponToInvoice(invoice: IInvoice, coupon: ICoupon, calcFlow?: CalcFlow): IInvoice;
1444
+ addCouponToInvoice(invoice: IInvoice, itemized: ICouponItemized, calcFlow?: CalcFlow): IInvoice;
1445
1445
  /**
1446
1446
  * Removes a discount from an invoice
1447
1447
  * @param invoice - The invoice to remove the discount from
@@ -1565,7 +1565,7 @@ declare module '@posx/core/services/invoice.service' {
1565
1565
  duplicateInvoice(invoice: IInvoice, employee?: IEmployee): Promise<IInvoice>;
1566
1566
  reprintReceipt(invoice: IInvoice): Promise<boolean>;
1567
1567
  addInvoiceDiscount(invoice: IInvoice, discountType: CalcType, amountOrPercent: number, calcFlow?: CalcFlow, name?: string, nameTranslations?: Record<string, string>): IInvoice;
1568
- addCouponToInvoice(invoice: IInvoice, coupon: ICoupon, calcFlow?: CalcFlow): IInvoice;
1568
+ addCouponToInvoice(invoice: IInvoice, itemized: ICouponItemized, calcFlow?: CalcFlow): IInvoice;
1569
1569
  removeInvoiceDiscount(invoice: IInvoice, discountUid: string): IInvoice;
1570
1570
  overwriteNoteToInvoice(invoice: IInvoice, note: string): IInvoice;
1571
1571
  addSalesPersonToInvoice(invoice: IInvoice, salesUserUid: string): IInvoice;
@@ -2629,7 +2629,7 @@ declare module '@posx/core/types/hub.message.type' {
2629
2629
  declare module '@posx/core/types/invoice.type' {
2630
2630
  import { IAppCoreModel, AppCoreModel } from '@posx/core/types/abstract.type';
2631
2631
  import { IPayment } from '@posx/core/types/payment.type';
2632
- import { CoreItem, ICoreItem, IItem, Item } from '@posx/core/types/product.type';
2632
+ import { CoreItem, type ICoreItem, type IItem, Item } from '@posx/core/types/product.type';
2633
2633
  import { Address, Customer, IAddress, ICustomer } from '@posx/core/types/wyo.customer.type';
2634
2634
  import { ISectionItem } from '@posx/core/types/section.type';
2635
2635
  import { ITill } from '@posx/core/types/shift.type';
@@ -2649,7 +2649,8 @@ declare module '@posx/core/types/invoice.type' {
2649
2649
  OnHold = "on_hold",
2650
2650
  Paying = "paying",
2651
2651
  Paid = "paid",
2652
- Void = "void"
2652
+ Void = "void",
2653
+ PayAtCounter = "pay_at_counter"
2653
2654
  }
2654
2655
  export enum InvoiceAction {
2655
2656
  Calibration = "calibration",
@@ -2755,6 +2756,8 @@ declare module '@posx/core/types/invoice.type' {
2755
2756
  type: DiscountType;
2756
2757
  /** Discount unique id */
2757
2758
  voucher_uid?: string;
2759
+ /** Applying item uids */
2760
+ applying_item_uids: string[];
2758
2761
  /** Discount unique id */
2759
2762
  coupon_uid?: string;
2760
2763
  /** Calculation flow */
@@ -2768,6 +2771,7 @@ declare module '@posx/core/types/invoice.type' {
2768
2771
  percent_amount: number;
2769
2772
  type: DiscountType;
2770
2773
  calc_flow: CalcFlow;
2774
+ applying_item_uids: string[];
2771
2775
  name: string;
2772
2776
  name_translation: {};
2773
2777
  voucher_uid: string;
@@ -4713,6 +4717,10 @@ declare module '@posx/core/types/wyo.coupon.type' {
4713
4717
  applyingType: ApplyingType;
4714
4718
  applyingItems: T[];
4715
4719
  }
4720
+ export class Applying<T> implements IApplying<T> {
4721
+ applyingType: ApplyingType;
4722
+ applyingItems: T[];
4723
+ }
4716
4724
  export interface ICoupon {
4717
4725
  /** Coupon guid */
4718
4726
  guid: string;