feat(cashier): enum status for billing and billing item

This commit is contained in:
avicenan
2026-04-25 16:11:54 +07:00
parent eb83ca5b16
commit 83cb4ab261
4 changed files with 18 additions and 4 deletions

View File

@ -13,6 +13,7 @@ import {
import { EmrRegistration } from "../emr/emr_registration";
import { Room } from "../room";
import { CashierItem } from "./cashier_item";
import { BillingStatus } from "../../types/billing_status";
@Entity("cashiers", { schema: "cashier" })
export class Cashier {
@ -51,8 +52,8 @@ export class Cashier {
})
balance_due: number;
@Column({ nullable: true, type: "text" })
status: string;
@Column({ nullable: true })
status: BillingStatus;
@Column()
@CreateDateColumn()

View File

@ -16,6 +16,7 @@ import { Service } from "../service";
import { ServiceType } from "../service_type";
import { ItemType } from "../pharmacy/item_type";
import { ItemMaster } from "../pharmacy/item_master";
import { BillingItemStatus } from "../../types/billing_item_status";
@Entity("cashier_item", { schema: "cashier" })
export class CashierItem {
@ -96,8 +97,8 @@ export class CashierItem {
})
balance_due: number;
@Column({ nullable: true, type: "text" })
status: string;
@Column({ nullable: true })
status: BillingItemStatus;
@Column({ nullable: true, length: 256 })
category: string;

View File

@ -2,3 +2,6 @@ export * from "../entity/cashier/cashier";
export * from "../entity/cashier/cashier_item";
export * from "../entity/cashier/payment_received";
export * from "../entity/cashier/payment_received_item";
export * from "../types/billing_status";
export * from "../types/billing_item_status";

View File

@ -0,0 +1,9 @@
/**
* Workflow status for cashier billing item.
* Paid: billing item has been fully paid
* Unpaid: billing item has not been paid
*/
export enum BillingItemStatus {
PAID = "PAID",
UNPAID = "UNPAID",
}