@@ -1,5 +1,7 @@ | |||||
package com.ffii.fpsms.m18.model | package com.ffii.fpsms.m18.model | ||||
import java.math.BigDecimal | |||||
// Purchase Quotation | // Purchase Quotation | ||||
data class M18PurchaseQuotationResponse( | data class M18PurchaseQuotationResponse( | ||||
val data: M18PurchaseQuotationData?, | val data: M18PurchaseQuotationData?, | ||||
@@ -35,6 +37,7 @@ data class M18PurchaseQuotationVqut( | |||||
val refCode: String, | val refCode: String, | ||||
val unitId: Long, | val unitId: Long, | ||||
val proId: Long, | val proId: Long, | ||||
val up: BigDecimal, | |||||
) | ) | ||||
// Purchase Quotation List | // Purchase Quotation List | ||||
@@ -143,6 +143,7 @@ open class M18PurchaseQuotationService( | |||||
m18ItemId = line.proId, | m18ItemId = line.proId, | ||||
code = line.refCode, | code = line.refCode, | ||||
description = line.bDesc, | description = line.bDesc, | ||||
price = line.up, | |||||
m18Id = line.id, | m18Id = line.id, | ||||
m18LastModifyDate = commonUtils.timestampToLocalDateTime(mainvqu.lastModifyDate) | m18LastModifyDate = commonUtils.timestampToLocalDateTime(mainvqu.lastModifyDate) | ||||
) | ) | ||||
@@ -1,10 +1,12 @@ | |||||
package com.ffii.fpsms.modules.purchaseQuotation.entity | package com.ffii.fpsms.modules.purchaseQuotation.entity | ||||
import com.ffii.core.entity.BaseEntity | import com.ffii.core.entity.BaseEntity | ||||
import com.ffii.fpsms.modules.master.entity.Currency | |||||
import com.ffii.fpsms.modules.master.entity.Items | import com.ffii.fpsms.modules.master.entity.Items | ||||
import com.ffii.fpsms.modules.master.entity.UomConversion | import com.ffii.fpsms.modules.master.entity.UomConversion | ||||
import jakarta.persistence.* | import jakarta.persistence.* | ||||
import jakarta.validation.constraints.Size | import jakarta.validation.constraints.Size | ||||
import java.math.BigDecimal | |||||
import java.time.Instant | import java.time.Instant | ||||
import java.time.LocalDateTime | import java.time.LocalDateTime | ||||
@@ -27,6 +29,9 @@ open class PurchaseQuotationLine : BaseEntity<Long>() { | |||||
@Column(name = "description", length = 300) | @Column(name = "description", length = 300) | ||||
open var description: String? = null | open var description: String? = null | ||||
@Column(name = "price") | |||||
open var price: BigDecimal? = null | |||||
@ManyToOne | @ManyToOne | ||||
@JoinColumn(name = "uomId") | @JoinColumn(name = "uomId") | ||||
open var uom: UomConversion? = null | open var uom: UomConversion? = null | ||||
@@ -36,6 +36,7 @@ open class PurchaseQuotationLineService ( | |||||
this.item = item | this.item = item | ||||
code = request.code | code = request.code | ||||
description = request.description | description = request.description | ||||
price = request.price | |||||
this.uom = uom | this.uom = uom | ||||
m18Id = request.m18Id ?: this.m18Id | m18Id = request.m18Id ?: this.m18Id | ||||
m18LastModifyDate = request.m18LastModifyDate ?: this.m18LastModifyDate | m18LastModifyDate = request.m18LastModifyDate ?: this.m18LastModifyDate | ||||
@@ -1,5 +1,6 @@ | |||||
package com.ffii.fpsms.modules.purchaseQuotation.web.model | package com.ffii.fpsms.modules.purchaseQuotation.web.model | ||||
import java.math.BigDecimal | |||||
import java.time.LocalDateTime | import java.time.LocalDateTime | ||||
data class SavePurchaseQuotationLineRequest( | data class SavePurchaseQuotationLineRequest( | ||||
@@ -9,6 +10,7 @@ data class SavePurchaseQuotationLineRequest( | |||||
val m18ItemId: Long? = null, | val m18ItemId: Long? = null, | ||||
val code: String? = null, | val code: String? = null, | ||||
val description: String? = null, | val description: String? = null, | ||||
val price: BigDecimal? = null, | |||||
val uomId: Long? = null, | val uomId: Long? = null, | ||||
val m18UomId: Long? = null, | val m18UomId: Long? = null, | ||||
val m18Id: Long? = null, | val m18Id: Long? = null, | ||||
@@ -0,0 +1,5 @@ | |||||
-- liquibase formatted sql | |||||
-- changeset cyril:inventory | |||||
ALTER TABLE `inventory` | |||||
ADD COLUMN `itemId` INT NULL AFTER `deleted`, | |||||
ADD CONSTRAINT `FK_INVENTORY_ON_ITEMID` FOREIGN KEY (`itemId`) REFERENCES `items` (`id`); |
@@ -0,0 +1,19 @@ | |||||
-- liquibase formatted sql | |||||
-- changeset cyril:trigger debug log | |||||
CREATE TABLE `trigger_debug_log` | |||||
( | |||||
`id` INT NOT NULL AUTO_INCREMENT, | |||||
`created` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
`createdBy` VARCHAR(30) NULL DEFAULT NULL, | |||||
`version` INT NOT NULL DEFAULT '0', | |||||
`modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | |||||
`modifiedBy` VARCHAR(30) NULL DEFAULT NULL, | |||||
`deleted` TINYINT(1) NOT NULL DEFAULT '0', | |||||
`tableName` VARCHAR(255) NULL, | |||||
`triggerName` VARCHAR(255) NULL, | |||||
`description` VARCHAR(255) NULL, | |||||
`errorMessages` TEXT NULL, | |||||
`status` VARCHAR(255) NULL default 'success', | |||||
CONSTRAINT pk_trigger_debug_log PRIMARY KEY (id) | |||||
); |
@@ -0,0 +1,6 @@ | |||||
-- liquibase formatted sql | |||||
-- changeset cyril:update purchase quotation line | |||||
ALTER TABLE `purchase_quotation_line` | |||||
ADD COLUMN `price` DECIMAL(14, 2) NULL AFTER `description`; |
@@ -0,0 +1,12 @@ | |||||
-- liquibase formatted sql | |||||
-- changeset cyril:update inventory | |||||
ALTER TABLE `inventory` | |||||
DROP FOREIGN KEY `FK_INVENTORY_TO_CURRENCY_ON_CURRENCY_ID`; | |||||
ALTER TABLE `inventory` | |||||
CHANGE COLUMN `currencyId` `currencyId` INT NULL ; | |||||
ALTER TABLE `inventory` | |||||
ADD CONSTRAINT `FK_INVENTORY_TO_CURRENCY_ON_CURRENCY_ID` | |||||
FOREIGN KEY (`currencyId`) | |||||
REFERENCES `currency` (`id`); |