2 Commits

Author SHA1 Message Date
f1d145e76f Version Bump v11.3.2 2023-03-19 23:05:00 +05:30
22f61427b0 Fix: Cashier report was only showing the last amount of aggregate items.
When it was not added to info, the amount also got reset to 0

Feature: Disabled total slip for single bills
2023-03-19 22:44:38 +05:30
8 changed files with 13 additions and 14 deletions

View File

@ -1 +1 @@
__version__ = "11.3.1"
__version__ = "11.3.2"

View File

@ -47,12 +47,13 @@ def print_bill(voucher_id: uuid.UUID, db: Session):
loop = asyncio.new_event_loop()
redis: ArqRedis = loop.run_until_complete(create_pool(redis_settings))
total = design_total(voucher, regimes, db)
loop.run_until_complete(
redis.enqueue_job(
"sent_to_printer", total, printer.address, printer.cut_code, _queue_name=f"barker:print:{printer.name}"
if len(bills > 1):
total = design_total(voucher, regimes, db)
loop.run_until_complete(
redis.enqueue_job(
"sent_to_printer", total, printer.address, printer.cut_code, _queue_name=f"barker:print:{printer.name}"
)
)
)
for bill in bills:
loop.run_until_complete(
redis.enqueue_job(

View File

@ -85,8 +85,6 @@ def get_id(id_: uuid.UUID, start_date: date, finish_date: date, user: UserLink,
vouchers = (
db.execute(
select(Voucher)
.join(Voucher.settlements)
.join(Settlement.settle_option)
.options(
joinedload(Voucher.settlements, innerjoin=True).joinedload(Settlement.settle_option, innerjoin=True)
)
@ -106,7 +104,7 @@ def get_id(id_: uuid.UUID, start_date: date, finish_date: date, user: UserLink,
amounts = {}
for item in vouchers:
for so in (so for so in item.settlements if so.settle_option.reporting_level >= ReportingLevel.Aggregate):
if so.settle_option.name not in info:
if so.settle_option.name not in amounts:
if so.settle_option.reporting_level == ReportingLevel.Detailed:
info[so.settle_option.name] = []
amounts[so.settle_option.name] = Decimal(0)

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "barker"
version = "11.3.1"
version = "11.3.2"
description = "Point of Sale for a restaurant"
authors = ["tanshu <git@tanshu.com>"]

View File

@ -1,6 +1,6 @@
{
"name": "bookie",
"version": "11.3.1",
"version": "11.3.2",
"scripts": {
"ng": "ng",
"start": "ng serve",

View File

@ -1,5 +1,5 @@
export const environment = {
production: true,
ACCESS_TOKEN_REFRESH_MINUTES: 10, // refresh token 10 minutes before expiry
version: '11.3.1',
version: '11.3.2',
};

View File

@ -5,7 +5,7 @@
export const environment = {
production: false,
ACCESS_TOKEN_REFRESH_MINUTES: 10, // refresh token 10 minutes before expiry
version: '11.3.1',
version: '11.3.2',
};
/*

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "frank"
version = "11.3.1"
version = "11.3.2"
description = "Point of Sale for a restaurant"
authors = ["tanshu <git@tanshu.com>"]