src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java
changeset 21925 c385f03ea176
parent 21853 6528ffadbc93
child 22006 34cb4c191d5e
equal deleted inserted replaced
21924:8b7a6ede079c 21925:c385f03ea176
   108     String strEnforceAttribute = "N";
   108     String strEnforceAttribute = "N";
   109     String isSOTrx = SLOrderStockData.isSotrx(this, strCOrderId);
   109     String isSOTrx = SLOrderStockData.isSotrx(this, strCOrderId);
   110     String strStockNoAttribute;
   110     String strStockNoAttribute;
   111     String strStockAttribute;
   111     String strStockAttribute;
   112     String strPriceActual = _strPriceActual;
   112     String strPriceActual = _strPriceActual;
   113     boolean isTaxIncludedPriceList = OBDal.getInstance().get(PriceList.class, data[0].mPricelistId)
   113     PriceList currentPriceList = OBDal.getInstance().get(PriceList.class, data[0].mPricelistId);
   114         .isPriceIncludesTax();
   114     boolean isTaxIncludedPriceList = currentPriceList.isPriceIncludesTax();
   115     boolean isGrossUnitPriceChanged = strChanged.equals("inpgrossUnitPrice");
   115     boolean isGrossUnitPriceChanged = strChanged.equals("inpgrossUnitPrice");
   116     boolean forceSetPriceStd = false;
   116     boolean forceSetPriceStd = false;
   117     if (data1 != null && data1.length > 0) {
   117     if (data1 != null && data1.length > 0) {
   118       strStockSecurity = data1[0].stock;
   118       strStockSecurity = data1[0].stock;
   119       strEnforceAttribute = data1[0].enforceAttribute;
   119       strEnforceAttribute = data1[0].enforceAttribute;
   156         OrderLineQtyChangedHookObject hookObject = new OrderLineQtyChangedHookObject();
   156         OrderLineQtyChangedHookObject hookObject = new OrderLineQtyChangedHookObject();
   157         hookObject.setProductId(strProduct);
   157         hookObject.setProductId(strProduct);
   158         hookObject.setQty(qtyOrdered);
   158         hookObject.setQty(qtyOrdered);
   159         hookObject.setOrderId(strCOrderId);
   159         hookObject.setOrderId(strCOrderId);
   160         hookObject.setPricePrecision(pricePrecision);
   160         hookObject.setPricePrecision(pricePrecision);
       
   161         hookObject.setPriceList(currentPriceList);
   161         if (isTaxIncludedPriceList) {
   162         if (isTaxIncludedPriceList) {
   162           hookObject.setPrice(grossPriceList);
   163           hookObject.setListPrice(grossPriceList);
       
   164           hookObject.setPrice(grossBaseUnitPrice);
   163         } else {
   165         } else {
   164           hookObject.setPrice(netPriceList);
   166           hookObject.setListPrice(netPriceList);
       
   167           hookObject.setPrice(priceStd);
   165         }
   168         }
   166 
   169 
   167         hookObject.setChanged(strChanged);
   170         hookObject.setChanged(strChanged);
   168         WeldUtils.getInstanceFromStaticBeanManager(OrderLineQtyChangedHookManager.class)
   171         WeldUtils.getInstanceFromStaticBeanManager(OrderLineQtyChangedHookManager.class)
   169             .executeHooks(hookObject);
   172             .executeHooks(hookObject);