Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af684c976e | ||
|
|
26c65b4b65 |
@@ -1 +1 @@
|
||||
__version__ = "13.0.0"
|
||||
__version__ = "13.0.1"
|
||||
|
||||
@@ -59,25 +59,29 @@ def from_id(
|
||||
ProductVersion.valid_till >= Voucher.date,
|
||||
),
|
||||
)
|
||||
item: Voucher = db.execute(
|
||||
select(Voucher)
|
||||
.join(Voucher.food_table)
|
||||
.join(Voucher.customer, isouter=True)
|
||||
.join(Voucher.kots)
|
||||
.join(Kot.inventories)
|
||||
.join(Inventory.product)
|
||||
.join(ProductVersion, onclause=product_version_onclause)
|
||||
.where(Voucher.id == id_)
|
||||
.order_by(Kot.code)
|
||||
.options(
|
||||
contains_eager(Voucher.food_table),
|
||||
contains_eager(Voucher.customer),
|
||||
contains_eager(Voucher.kots)
|
||||
.contains_eager(Kot.inventories)
|
||||
.contains_eager(Inventory.product)
|
||||
.contains_eager(Product.versions),
|
||||
item: Voucher = (
|
||||
db.execute(
|
||||
select(Voucher)
|
||||
.join(Voucher.food_table)
|
||||
.join(Voucher.customer, isouter=True)
|
||||
.join(Voucher.kots)
|
||||
.join(Kot.inventories)
|
||||
.join(Inventory.product)
|
||||
.join(ProductVersion, onclause=product_version_onclause)
|
||||
.where(Voucher.id == id_)
|
||||
.order_by(Kot.code)
|
||||
.options(
|
||||
contains_eager(Voucher.food_table),
|
||||
contains_eager(Voucher.customer),
|
||||
contains_eager(Voucher.kots)
|
||||
.contains_eager(Kot.inventories)
|
||||
.contains_eager(Inventory.product)
|
||||
.contains_eager(Product.versions),
|
||||
)
|
||||
)
|
||||
).scalar_one()
|
||||
.unique()
|
||||
.scalar_one()
|
||||
)
|
||||
return voucher_info(item, db)
|
||||
|
||||
|
||||
@@ -104,28 +108,32 @@ def from_bill(
|
||||
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
|
||||
detail="Bill Number is invalid",
|
||||
)
|
||||
item: Voucher | None = db.execute(
|
||||
select(Voucher)
|
||||
.join(Voucher.bills)
|
||||
.join(Bill.regime)
|
||||
.join(Voucher.food_table)
|
||||
.join(Voucher.customer, isouter=True)
|
||||
.join(Voucher.kots)
|
||||
.join(Kot.inventories)
|
||||
.join(Inventory.product)
|
||||
.join(ProductVersion, onclause=product_version_onclause)
|
||||
.where(Regime.prefix == match.group(1), Bill.bill_number == int(match.group(2)))
|
||||
.order_by(Kot.code)
|
||||
.options(
|
||||
contains_eager(Voucher.food_table),
|
||||
contains_eager(Voucher.customer),
|
||||
contains_eager(Voucher.kots)
|
||||
.contains_eager(Kot.inventories)
|
||||
.contains_eager(Inventory.product)
|
||||
.contains_eager(Product.versions),
|
||||
contains_eager(Voucher.bills).contains_eager(Bill.regime),
|
||||
item: Voucher | None = (
|
||||
db.execute(
|
||||
select(Voucher)
|
||||
.join(Voucher.bills)
|
||||
.join(Bill.regime)
|
||||
.join(Voucher.food_table)
|
||||
.join(Voucher.customer, isouter=True)
|
||||
.join(Voucher.kots)
|
||||
.join(Kot.inventories)
|
||||
.join(Inventory.product)
|
||||
.join(ProductVersion, onclause=product_version_onclause)
|
||||
.where(Regime.prefix == match.group(1), Bill.bill_number == int(match.group(2)))
|
||||
.order_by(Kot.code)
|
||||
.options(
|
||||
contains_eager(Voucher.food_table),
|
||||
contains_eager(Voucher.customer),
|
||||
contains_eager(Voucher.kots)
|
||||
.contains_eager(Kot.inventories)
|
||||
.contains_eager(Inventory.product)
|
||||
.contains_eager(Product.versions),
|
||||
contains_eager(Voucher.bills).contains_eager(Bill.regime),
|
||||
)
|
||||
)
|
||||
).scalar_one_or_none()
|
||||
.unique()
|
||||
.scalar_one_or_none()
|
||||
)
|
||||
if item is None:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
@@ -192,8 +200,7 @@ def from_table(
|
||||
)
|
||||
)
|
||||
.unique()
|
||||
.scalars()
|
||||
.one()
|
||||
.scalar_one()
|
||||
)
|
||||
|
||||
if guest is not None:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "barker"
|
||||
version = "13.0.0"
|
||||
version = "13.0.1"
|
||||
description = "Point of Sale for a restaurant"
|
||||
authors = ["tanshu <git@tanshu.com>"]
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bookie",
|
||||
"version": "13.0.0",
|
||||
"version": "13.0.1",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export const environment = {
|
||||
production: true,
|
||||
ACCESS_TOKEN_REFRESH_MINUTES: 10, // refresh token 10 minutes before expiry
|
||||
version: '13.0.0',
|
||||
version: '13.0.1',
|
||||
};
|
||||
|
||||
export const dateFormat = {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "frank"
|
||||
version = "13.0.0"
|
||||
version = "13.0.1"
|
||||
description = "Point of Sale for a restaurant"
|
||||
authors = ["tanshu <git@tanshu.com>"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user