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

View File

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

View File

@ -2,3 +2,6 @@ export * from "../entity/cashier/cashier";
export * from "../entity/cashier/cashier_item"; export * from "../entity/cashier/cashier_item";
export * from "../entity/cashier/payment_received"; export * from "../entity/cashier/payment_received";
export * from "../entity/cashier/payment_received_item"; 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",
}