Add inventory

This commit is contained in:
2024-03-01 18:12:17 +05:30
parent f8263e8a35
commit d475d3828b
19 changed files with 578 additions and 25 deletions

View File

@@ -8,7 +8,7 @@ object DBMigration {
private fun create(){
val dbMigration: DbMigration = DbMigration.create()
dbMigration.setPlatform(Platform.POSTGRES)
//dbMigration.setGeneratePendingDrop("1.8")
dbMigration.generateMigration()
}

View File

@@ -305,6 +305,10 @@ enum class UOM {
NOS, LTR, MTR, ALL
}
enum class TypeOfProduct {
RAW_MATERIAL
}
@Entity
open class Product : BaseTenantModel() {
fun patchValues(updatedProduct: Product) {
@@ -321,6 +325,11 @@ open class Product : BaseTenantModel() {
@Enumerated(EnumType.STRING)
var uom: UOM? = null
@Enumerated(EnumType.STRING)
var type: TypeOfProduct? = null
}
@Entity
@@ -355,6 +364,8 @@ open class Quotation : BaseTenantModel() {
@DbArray
var documents: List<String>? = arrayListOf()
var taxesIncluded: Boolean ?= null
}
enum class DocType {
@@ -387,10 +398,63 @@ open class ReqForQuote : BaseTenantModel() {
@Enumerated(EnumType.STRING)
var status: RFQStatus? = null
// @DbArray
// var docs :List<Document>? = null
@DbJsonB
var products: List<POProducts>? = null
var reqForQuoteNum: String? = null
var openTill: LocalDate? = null
}
@Entity
open class IncomingInventory : BaseTenantModel() {
fun patchValues(updated: IncomingInventory) {
this.date = updated.date
this.vendorBillNum = updated.vendorBillNum
this.vendorBillAmount = updated.vendorBillAmount
this.vehicle = updated.vehicle
this.products = updated.products
this.vendor = updated.vendor
}
var mrn: String? = null
var date: LocalDate? = null
var vendorBillNum: String? = null
var vendorBillAmount: Double = 0.0
var vehicle: String = ""
@DbJsonB
var products: List<POProducts>? = null
@ManyToOne
var vendor: Vendor? = null
}
enum class OutMode {
PERSON, VEHICLE, ALL
}
@Entity
open class OutgoingInventory : BaseTenantModel() {
fun patchValues(updated: OutgoingInventory) {
this.date = updated.date
this.products = updated.products
this.purpose = updated.purpose
this.outMode = updated.outMode
this.person = updated.person
this.vehicle = updated.vehicle
}
var mdn: String? = null
var date: LocalDate? = null
@DbJsonB
var products: List<POProducts>? = null
var purpose: String? = null
@Enumerated(EnumType.STRING)
var outMode: OutMode? = null
var person: String? = null
var vehicle: String? = null
}