IDEMPIERE-5687 Base Price List (#1858)
This commit is contained in:
parent
013ba190fd
commit
fde6e0a1d1
|
@ -0,0 +1,18 @@
|
||||||
|
-- IDEMPIERE-5687 Base Price List
|
||||||
|
SELECT register_migration_script('202305271307_IDEMPIERE-5687.sql') FROM dual;
|
||||||
|
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- May 27, 2023, 1:07:01 PM CEST
|
||||||
|
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50, XPosition=1,Updated=TO_TIMESTAMP('2023-05-27 13:07:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3316
|
||||||
|
;
|
||||||
|
|
||||||
|
-- May 27, 2023, 1:07:01 PM CEST
|
||||||
|
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=120, XPosition=5,Updated=TO_TIMESTAMP('2023-05-27 13:07:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1175
|
||||||
|
;
|
||||||
|
|
||||||
|
-- May 27, 2023, 1:07:01 PM CEST
|
||||||
|
UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2023-05-27 13:07:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204933
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
-- IDEMPIERE-5687 Base Price List
|
||||||
|
SELECT register_migration_script('202305271307_IDEMPIERE-5687.sql') FROM dual;
|
||||||
|
|
||||||
|
-- May 27, 2023, 1:07:01 PM CEST
|
||||||
|
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=50, XPosition=1,Updated=TO_TIMESTAMP('2023-05-27 13:07:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3316
|
||||||
|
;
|
||||||
|
|
||||||
|
-- May 27, 2023, 1:07:01 PM CEST
|
||||||
|
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=120, XPosition=5,Updated=TO_TIMESTAMP('2023-05-27 13:07:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=1175
|
||||||
|
;
|
||||||
|
|
||||||
|
-- May 27, 2023, 1:07:01 PM CEST
|
||||||
|
UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2023-05-27 13:07:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204933
|
||||||
|
;
|
||||||
|
|
|
@ -76,6 +76,7 @@ public class CalloutTimeExpense extends CalloutEngine
|
||||||
+ " AND pp.M_PriceList_Version_ID=pv.M_PriceList_Version_ID"
|
+ " AND pp.M_PriceList_Version_ID=pv.M_PriceList_Version_ID"
|
||||||
+ " AND pv.M_PriceList_ID=pl.M_PriceList_ID"
|
+ " AND pv.M_PriceList_ID=pl.M_PriceList_ID"
|
||||||
+ " AND pv.IsActive='Y'"
|
+ " AND pv.IsActive='Y'"
|
||||||
|
+ " AND pp.IsActive='Y'"
|
||||||
+ " AND p.M_Product_ID=?" // 1
|
+ " AND p.M_Product_ID=?" // 1
|
||||||
+ " AND pl.M_PriceList_ID=?" // 2
|
+ " AND pl.M_PriceList_ID=?" // 2
|
||||||
+ " ORDER BY pv.ValidFrom DESC";
|
+ " ORDER BY pv.ValidFrom DESC";
|
||||||
|
@ -117,6 +118,7 @@ public class CalloutTimeExpense extends CalloutEngine
|
||||||
+ " AND pp.M_PriceList_Version_ID=pv.M_PriceList_Version_ID"
|
+ " AND pp.M_PriceList_Version_ID=pv.M_PriceList_Version_ID"
|
||||||
+ " AND pv.M_PriceList_ID=bpl.M_PriceList_ID"
|
+ " AND pv.M_PriceList_ID=bpl.M_PriceList_ID"
|
||||||
+ " AND pv.IsActive='Y'"
|
+ " AND pv.IsActive='Y'"
|
||||||
|
+ " AND pp.IsActive='Y'"
|
||||||
+ " AND bpl.M_PriceList_ID=pl.BasePriceList_ID" // Base
|
+ " AND bpl.M_PriceList_ID=pl.BasePriceList_ID" // Base
|
||||||
+ " AND p.M_Product_ID=?" // 1
|
+ " AND p.M_Product_ID=?" // 1
|
||||||
+ " AND pl.M_PriceList_ID=?" // 2
|
+ " AND pl.M_PriceList_ID=?" // 2
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class MProductPricing extends AbstractProductPricing
|
||||||
|
|
||||||
private void checkVendorBreak() {
|
private void checkVendorBreak() {
|
||||||
int thereAreVendorBreakRecords = DB.getSQLValue(trxName,
|
int thereAreVendorBreakRecords = DB.getSQLValue(trxName,
|
||||||
"SELECT count(M_Product_ID) FROM M_ProductPriceVendorBreak WHERE M_Product_ID=? AND (C_BPartner_ID=? OR C_BPartner_ID is NULL)",
|
"SELECT COUNT(M_Product_ID) FROM M_ProductPriceVendorBreak WHERE IsActive='Y' AND M_Product_ID=? AND (C_BPartner_ID=? OR C_BPartner_ID IS NULL)",
|
||||||
m_M_Product_ID, m_C_BPartner_ID);
|
m_M_Product_ID, m_C_BPartner_ID);
|
||||||
m_useVendorBreak = thereAreVendorBreakRecords > 0;
|
m_useVendorBreak = thereAreVendorBreakRecords > 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue