Fix: Show would repeat the string n times instead of multiplying the integer

This commit is contained in:
Amritanshu Agrawal 2021-08-09 23:07:04 +05:30
parent 5e0e99340e
commit baefaeb228
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ def from_bill(
query = select(Voucher)
if re.compile(r"^\d{1,3}-\d{1,4}$").match(id_):
s, n = id_.split("-")
i = int(s * 10000) + int(n)
i = (int(s) * 10000) + int(n)
query = query.where(Voucher.bill_id == i, Voucher.voucher_type == VoucherType.REGULAR_BILL)
elif re.compile(r"^K-\d+$").match(id_):
query = query.where(