Fix: Vouchertype as int not string. This fucked up everthing in the frontend and was not able to print kot or bills.

This commit is contained in:
2025-07-09 06:37:31 +00:00
parent add3ad35d7
commit 5317e3de23
2 changed files with 2 additions and 2 deletions

View File

@ -221,7 +221,7 @@ def voucher_info(item: Voucher, db: Session) -> VoucherOut:
customer=CustomerLink(id_=item.customer.id, name=item.customer.name) if item.customer is not None else None,
narration=item.narration,
reason=item.reason,
voucher_type=str(item.voucher_type),
voucher_type=item.voucher_type,
kots=[
KotOut(
id_=k.id,

View File

@ -130,7 +130,7 @@ class VoucherOut(BaseModel):
customer: CustomerLink | None = None
narration: str | None
reason: str | None
voucher_type: str
voucher_type: int
kots: list[Kot]
model_config = ConfigDict(