add gst%
This commit is contained in:
parent
387e203bc8
commit
d28a3215d1
@ -306,7 +306,7 @@ open class PurchaseOrder : BaseTenantModel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum class UOM {
|
enum class UOM {
|
||||||
NOS, LTR, MTR, ALL
|
KG, CFT, TON, LTR, NUMBER, MTR, BOX, CUM, PACKET, ALL, NOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class TypeOfProduct {
|
enum class TypeOfProduct {
|
||||||
@ -330,6 +330,8 @@ open class Product : BaseTenantModel() {
|
|||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
var uom: UOM? = null
|
var uom: UOM? = null
|
||||||
|
|
||||||
|
var gstPct: Double? = 0.0
|
||||||
|
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
var type: TypeOfProduct? = null
|
var type: TypeOfProduct? = null
|
||||||
|
|
||||||
|
|||||||
7
src/main/resources/dbmigration/1.26.sql
Normal file
7
src/main/resources/dbmigration/1.26.sql
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
-- drop dependencies
|
||||||
|
alter table product drop constraint if exists ck_product_uom;
|
||||||
|
-- apply alter tables
|
||||||
|
alter table product alter column uom type varchar(6);
|
||||||
|
alter table product add column if not exists gst_pct float;
|
||||||
|
-- apply post alter
|
||||||
|
alter table product add constraint ck_product_uom check ( uom in ('KG','CFT','TON','LTR','NUMBER','MTR','BOX','CUM','PACKET','ALL','NOS'));
|
||||||
9
src/main/resources/dbmigration/model/1.26.model.xml
Normal file
9
src/main/resources/dbmigration/model/1.26.model.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<migration xmlns="http://ebean-orm.github.io/xml/ns/dbmigration">
|
||||||
|
<changeSet type="apply">
|
||||||
|
<alterColumn columnName="uom" tableName="product" type="varchar(6)" currentType="varchar(3)" currentNotnull="false" checkConstraint="check ( uom in ('KG','CFT','TON','LTR','NUMBER','MTR','BOX','CUM','PACKET','ALL','NOS'))" checkConstraintName="ck_product_uom"/>
|
||||||
|
<addColumn tableName="product">
|
||||||
|
<column name="gst_pct" type="double"/>
|
||||||
|
</addColumn>
|
||||||
|
</changeSet>
|
||||||
|
</migration>
|
||||||
Loading…
x
Reference in New Issue
Block a user