This commit is contained in:
fro1991
2025-03-06 22:04:35 +07:00
parent c6ac8643ce
commit b3536dab0f
2 changed files with 23 additions and 0 deletions

View File

@ -33,6 +33,15 @@ export class AssetPurchase {
}) })
quantity: number; quantity: number;
@Column({ type: 'float8', nullable: true })
sub_total: number;
@Column({ type: 'int2', nullable: true })
tax_percent: number;
@Column({ type: 'float8', nullable: true })
tax_amount: number;
@Column({ @Column({
type: 'float8', type: 'float8',
nullable: false, nullable: false,

View File

@ -10,6 +10,7 @@ import {
JoinTable JoinTable
} from 'typeorm'; } from 'typeorm';
import { AssetRequestOrderCategory } from './asset_request_order_category'; import { AssetRequestOrderCategory } from './asset_request_order_category';
import { AssetSupplier } from './asset_supplier';
@Entity('asset_request_orders') @Entity('asset_request_orders')
export class AssetRequestOrder { export class AssetRequestOrder {
@ -26,6 +27,10 @@ export class AssetRequestOrder {
@Column({ type: 'varchar', length: 255 }) @Column({ type: 'varchar', length: 255 })
department_name: string; department_name: string;
@ManyToOne(() => AssetSupplier, { onDelete: 'NO ACTION', nullable: true })
@JoinTable()
supplier: AssetSupplier;
@Column({ type: 'varchar', length: 50, unique: true }) @Column({ type: 'varchar', length: 50, unique: true })
code: string; code: string;
@ -44,6 +49,15 @@ export class AssetRequestOrder {
@Column({ type: 'int2' }) @Column({ type: 'int2' })
quantity: number; quantity: number;
@Column({ type: 'float8', nullable: true })
sub_total: number;
@Column({ type: 'int2', nullable: true })
tax_percent: number;
@Column({ type: 'float8', nullable: true })
tax_amount: number;
@Column({ type: 'float8' }) @Column({ type: 'float8' })
total: number; total: number;