update: order item and receive order done
This commit is contained in:
88
src/entity/pharmacy-logistic/receive_order.ts
Normal file
88
src/entity/pharmacy-logistic/receive_order.ts
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, ManyToOne, JoinColumn } from 'typeorm';
|
||||||
|
import { Supplier } from '../pharmacy/supplier';
|
||||||
|
import { ItemOrigin } from '../pharmacy/item_origin';
|
||||||
|
import { OrderItem } from './order_item';
|
||||||
|
|
||||||
|
@Entity({ schema: 'pharmacy_logistic', name: 'receive_order' })
|
||||||
|
export class ReceiveOrder {
|
||||||
|
@PrimaryGeneratedColumn('uuid')
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 128
|
||||||
|
})
|
||||||
|
receive_number: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 128
|
||||||
|
})
|
||||||
|
invoice_number: string;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
invoice_date: Date;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
due_date: Date;
|
||||||
|
|
||||||
|
@ManyToOne(() => Supplier, { onDelete: "NO ACTION" })
|
||||||
|
@JoinColumn()
|
||||||
|
supplier: Supplier;
|
||||||
|
|
||||||
|
@ManyToOne(() => OrderItem, { onDelete: "NO ACTION" })
|
||||||
|
@JoinColumn()
|
||||||
|
orderitem: OrderItem;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
receive_date: Date;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: 'bigint'
|
||||||
|
})
|
||||||
|
total_cost: number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: 'bigint'
|
||||||
|
})
|
||||||
|
tax: number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: 'bigint'
|
||||||
|
})
|
||||||
|
discount: number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: 'bigint'
|
||||||
|
})
|
||||||
|
sub_total: number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: 'bigint'
|
||||||
|
})
|
||||||
|
stamp: number;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
invoice_submission_date: Date;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deleted_at: Date;
|
||||||
|
}
|
||||||
75
src/entity/pharmacy-logistic/receive_order_detail.ts
Normal file
75
src/entity/pharmacy-logistic/receive_order_detail.ts
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, ManyToOne, JoinColumn } from 'typeorm';
|
||||||
|
import { OrderItemDetail } from './order_item_detail';
|
||||||
|
import { ReceiveOrder } from './receive_order';
|
||||||
|
|
||||||
|
@Entity({ schema: 'pharmacy_logistic', name: 'receive_order_detail' })
|
||||||
|
export class ReceiveOrderDetail {
|
||||||
|
@PrimaryGeneratedColumn('uuid')
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: 'bigint'
|
||||||
|
})
|
||||||
|
receive_qty: number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: 'bigint'
|
||||||
|
})
|
||||||
|
pack: number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: 'bigint'
|
||||||
|
})
|
||||||
|
pack_prize: number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: 'bigint'
|
||||||
|
})
|
||||||
|
unit_price: number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: 'bigint'
|
||||||
|
})
|
||||||
|
discount: number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
type: 'bigint'
|
||||||
|
})
|
||||||
|
total_price: number;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
exp_date: Date;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 128
|
||||||
|
})
|
||||||
|
batch: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => OrderItemDetail, { onDelete: "NO ACTION" })
|
||||||
|
@JoinColumn()
|
||||||
|
orderitemdetail: OrderItemDetail;
|
||||||
|
|
||||||
|
@ManyToOne(() => ReceiveOrder, { onDelete: "NO ACTION" })
|
||||||
|
@JoinColumn()
|
||||||
|
receiveorder: ReceiveOrder;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deleted_at: Date;
|
||||||
|
}
|
||||||
@ -1,2 +1,4 @@
|
|||||||
export * from "../entity/pharmacy-logistic/order_item"
|
export * from "../entity/pharmacy-logistic/order_item"
|
||||||
export * from "../entity/pharmacy-logistic/order_item_detail"
|
export * from "../entity/pharmacy-logistic/order_item_detail"
|
||||||
|
export * from "../entity/pharmacy-logistic/receive_order"
|
||||||
|
export * from "../entity/pharmacy-logistic/receive_order_detail"
|
||||||
Reference in New Issue
Block a user