Feature: Added product bundles. Have to wire it up to inventory and reports.
This commit is contained in:
@ -9,13 +9,13 @@ import { BillViewItem } from '../core/bill-view-item';
|
||||
import { ModifierCategory } from '../core/modifier-category';
|
||||
import { ReceivePaymentItem } from '../core/receive-payment-item';
|
||||
import { SaleCategory } from '../core/sale-category';
|
||||
import { StockKeepingUnit } from '../core/stock-keeping-unit';
|
||||
import { Table } from '../core/table';
|
||||
import { ModifierCategoryService } from '../modifier-categories/modifier-category.service';
|
||||
import { MathService } from '../shared/math.service';
|
||||
import { Bill } from './bills/bill';
|
||||
import { Inventory } from './bills/inventory';
|
||||
import { Kot } from './bills/kot';
|
||||
import { ProductLink } from './bills/product-link';
|
||||
import { VoucherType } from './bills/voucher-type';
|
||||
import { VoucherService } from './bills/voucher.service';
|
||||
import { ModifiersComponent } from './modifiers/modifiers.component';
|
||||
@ -109,7 +109,7 @@ export class BillService {
|
||||
);
|
||||
}
|
||||
|
||||
addSku(sku: StockKeepingUnit, quantity: number, discount: number): void {
|
||||
addSku(sku: ProductLink, quantity: number, discount: number): void {
|
||||
const newKot = this.bill.kots.find((k) => k.id === undefined) as Kot;
|
||||
const old = newKot.inventories.find((x) => x.sku.id === sku.id && x.isHappyHour === sku.hasHappyHour);
|
||||
if (quantity < 0) {
|
||||
@ -127,7 +127,7 @@ export class BillService {
|
||||
quantity,
|
||||
price: sku.price,
|
||||
isHappyHour: sku.hasHappyHour,
|
||||
taxRate: sku.tax.rate,
|
||||
taxRate: sku.tax?.rate,
|
||||
tax: sku.tax,
|
||||
discount,
|
||||
modifiers: [],
|
||||
|
||||
Reference in New Issue
Block a user