update: add new field for payment received
This commit is contained in:
@ -15,6 +15,9 @@ import { Room } from "../room";
|
||||
import { Cashier } from "./cashier";
|
||||
import { User } from "../users";
|
||||
import { PaymentReceivedItem } from "./payment_received_item";
|
||||
import { PaymentMethod } from "../payment_method";
|
||||
import { CardType } from "../card_type";
|
||||
|
||||
@Entity("payment_received", { schema: "cashier" })
|
||||
export class PaymentReceived {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
@ -27,6 +30,14 @@ export class PaymentReceived {
|
||||
@JoinColumn()
|
||||
emrregistration: EmrRegistration;
|
||||
|
||||
@ManyToOne(() => PaymentMethod, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
paymentmethod: PaymentMethod;
|
||||
|
||||
@ManyToOne(() => CardType, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
cardtype: CardType;
|
||||
|
||||
@ManyToOne(() => Cashier, { onDelete: "CASCADE" })
|
||||
@JoinColumn()
|
||||
cashier: Cashier;
|
||||
@ -54,6 +65,33 @@ export class PaymentReceived {
|
||||
@Column({ nullable: true, type: "text" })
|
||||
status: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
card_provider: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
card_number: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
card_holder_name: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
paidby: string;
|
||||
|
||||
@Column({ nullable: true, type: "text" })
|
||||
notes: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: 'bigint'
|
||||
})
|
||||
change: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: 'bigint'
|
||||
})
|
||||
exemption: number;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
Reference in New Issue
Block a user