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:
@ -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,
|
||||
|
||||
@ -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(
|
||||
|
||||
Reference in New Issue
Block a user