add vendor module
This commit is contained in:
@@ -12,7 +12,13 @@ import java.time.LocalDateTime
|
||||
import javax.persistence.*
|
||||
|
||||
data class Comments(val text: String = "", val by: String = "", val at: LocalDateTime = LocalDateTime.now())
|
||||
data class POProducts(val productId: String = "", val productName: String = "", val unitPrice: Double = 0.0, val quantity: Double = 0.0, val description: String = "")
|
||||
data class POProducts(
|
||||
val productId: String = "",
|
||||
val productName: String = "",
|
||||
val unitPrice: Double = 0.0,
|
||||
val quantity: Double = 0.0,
|
||||
val description: String = ""
|
||||
)
|
||||
|
||||
|
||||
enum class ApprovalStatus {
|
||||
@@ -246,9 +252,15 @@ data class ContactPerson(val name: String = "", val email: String = "", val mobi
|
||||
|
||||
@Entity
|
||||
open class Vendor : BaseTenantModel() {
|
||||
fun patchValues(updatedVendor : Vendor) {
|
||||
|
||||
fun patchValues(updatedVendor: Vendor) {
|
||||
this.name = updatedVendor.name
|
||||
this.msme = updatedVendor.msme
|
||||
this.gstNumber = updatedVendor.gstNumber
|
||||
this.address = updatedVendor.address
|
||||
this.rating = updatedVendor.rating
|
||||
this.contacts = updatedVendor.contacts
|
||||
}
|
||||
|
||||
var name: String = ""
|
||||
var msme: String = ""
|
||||
var gstNumber: String = ""
|
||||
@@ -261,9 +273,16 @@ open class Vendor : BaseTenantModel() {
|
||||
|
||||
@Entity
|
||||
open class PurchaseOrder : BaseTenantModel() {
|
||||
fun patchValues(updatedPo : PurchaseOrder){
|
||||
|
||||
fun patchValues(updatedPo: PurchaseOrder) {
|
||||
this.poDate = updatedPo.poDate
|
||||
this.validTill = updatedPo.validTill
|
||||
this.tnc = updatedPo.tnc
|
||||
this.products = updatedPo.products
|
||||
this.vendor = updatedPo.vendor
|
||||
this.documents = updatedPo.documents
|
||||
this.totalAmount = updatedPo.totalAmount
|
||||
}
|
||||
|
||||
@DbJsonB
|
||||
var products: MutableList<POProducts> = mutableListOf()
|
||||
|
||||
@@ -306,8 +325,16 @@ open class Product : BaseTenantModel() {
|
||||
|
||||
@Entity
|
||||
open class Quotation : BaseTenantModel() {
|
||||
fun patchValues(updatedQuote : Quotation) {
|
||||
|
||||
fun patchValues(updatedQuote: Quotation) {
|
||||
this.quoteDate = updatedQuote.quoteDate
|
||||
this.vendorQuoteNum = updatedQuote.vendorQuoteNum
|
||||
this.validTill = updatedQuote.validTill
|
||||
this.reqForQuoteNum = updatedQuote.reqForQuoteNum
|
||||
this.tnc = updatedQuote.tnc
|
||||
this.products = updatedQuote.products
|
||||
this.vendor = updatedQuote.vendor
|
||||
this.documents = updatedQuote.documents
|
||||
this.totalAmount = updatedQuote.totalAmount
|
||||
}
|
||||
|
||||
@DbJsonB
|
||||
|
||||
Reference in New Issue
Block a user