add (ppa - pvg - ug - shp - stklim) inheritance (saleOrder stockMove Invoice(s))
This commit is contained in:
@@ -72,6 +72,12 @@
|
||||
]]>
|
||||
</string>
|
||||
|
||||
<decimal name="ppa" title="PPA" precision="20" scale="10"/>
|
||||
<decimal name="pvg" title="PVG" precision="20" scale="10"/>
|
||||
<decimal name="ug" title="UG" precision="20" scale="10"/>
|
||||
<decimal name="stklim" title="Stklim" precision="20" scale="10" />
|
||||
<decimal name="shp" title="SHP" precision="20" scale="10" />
|
||||
|
||||
<extra-code><![CDATA[
|
||||
public static final int TYPE_NORMAL = 0;
|
||||
public static final int TYPE_TITLE = 1;
|
||||
|
||||
@@ -141,6 +141,8 @@
|
||||
|
||||
<boolean name="allowToForcePurchaseQty" title="Allow to force purchases quantities"/>
|
||||
|
||||
<decimal name="ppa" title="PPA" />
|
||||
<decimal name="shp" title="SHP" />
|
||||
<decimal name="pvg" title="PVG" />
|
||||
<decimal name="stklim" title="Stklim" />
|
||||
<decimal name="ug" title="UG" />
|
||||
|
||||
@@ -44,6 +44,10 @@ import com.axelor.inject.Beans;
|
||||
import com.axelor.rpc.ActionResponse;
|
||||
import com.axelor.rpc.Context;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import wslite.json.JSONException;
|
||||
import wslite.json.JSONObject;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
@@ -72,10 +76,16 @@ public class SaleOrderLineServiceImpl implements SaleOrderLineService {
|
||||
public void computeProductInformation(
|
||||
SaleOrderLine saleOrderLine, SaleOrder saleOrder, Integer packPriceSelect)
|
||||
throws AxelorException {
|
||||
saleOrderLine.setProductName(saleOrderLine.getProduct().getName());
|
||||
Product product = saleOrderLine.getProduct();
|
||||
saleOrderLine.setProductName(product.getName());
|
||||
saleOrderLine.setPvg(product.getPvg());
|
||||
saleOrderLine.setUg(product.getUg());
|
||||
saleOrderLine.setStklim(product.getStklim());
|
||||
saleOrderLine.setPpa(product.getPpa());
|
||||
saleOrderLine.setShp(product.getShp());
|
||||
saleOrderLine.setUnit(this.getSaleUnit(saleOrderLine));
|
||||
if (appSaleService.getAppSale().getIsEnabledProductDescriptionCopy()) {
|
||||
saleOrderLine.setDescription(saleOrderLine.getProduct().getDescription());
|
||||
saleOrderLine.setDescription(product.getDescription());
|
||||
}
|
||||
|
||||
saleOrderLine.setTypeSelect(SaleOrderLineRepository.TYPE_NORMAL);
|
||||
|
||||
@@ -68,6 +68,12 @@
|
||||
<decimal name="totalPack" title="Total for pack lines"/>
|
||||
<integer name="packPriceSelect" title="Pack price select" selection="product.pack.price.select"/>
|
||||
|
||||
<decimal name="ppa" title="PPA" precision="20" scale="10"/>
|
||||
<decimal name="pvg" title="PVG" precision="20" scale="10"/>
|
||||
<decimal name="ug" title="UG" precision="20" scale="10"/>
|
||||
<decimal name="stklim" title="Stklim" precision="20" scale="10" />
|
||||
<decimal name="shp" title="SHP" precision="20" scale="10" />
|
||||
|
||||
<finder-method name="findAllBySaleOrder" using="saleOrder" all="true"/>
|
||||
|
||||
<extra-code>
|
||||
|
||||
@@ -1340,6 +1340,11 @@ public class StockMoveServiceImpl implements StockMoveService {
|
||||
// Set quantity in new stock move line
|
||||
newStockMoveLine = stockMoveLineRepo.copy(moveLine, false);
|
||||
newStockMoveLine.setQty(moveLine.getQty());
|
||||
newStockMoveLine.setUg(moveLine.getUg());
|
||||
newStockMoveLine.setPpa(moveLine.getPpa());
|
||||
newStockMoveLine.setPvg(moveLine.getPvg());
|
||||
newStockMoveLine.setStklim(moveLine.getStklim());
|
||||
newStockMoveLine.setShp(moveLine.getShp());
|
||||
newStockMoveLine.setRealQty(moveLine.getQty());
|
||||
newStockMoveLine.setProductTypeSelect(moveLine.getProductTypeSelect());
|
||||
// add stock move line
|
||||
|
||||
@@ -69,6 +69,12 @@
|
||||
<enum name="natureOfTransaction" ref="com.axelor.apps.stock.db.NatureOfTransaction"/>
|
||||
<many-to-one name="countryOfOrigin" ref="com.axelor.apps.base.db.Country"/>
|
||||
|
||||
<decimal name="ppa" title="PPA" precision="20" scale="10"/>
|
||||
<decimal name="pvg" title="PVG" precision="20" scale="10"/>
|
||||
<decimal name="ug" title="UG" precision="20" scale="10"/>
|
||||
<decimal name="stklim" title="Stklim" precision="20" scale="10" />
|
||||
<decimal name="shp" title="SHP" precision="20" scale="10" />
|
||||
|
||||
<extra-code><![CDATA[
|
||||
// CONFORMITY SELECT
|
||||
public static final int CONFORMITY_NONE = 1;
|
||||
|
||||
@@ -455,6 +455,11 @@ public class StockMoveInvoiceServiceImpl implements StockMoveInvoiceService {
|
||||
for (InvoiceLine invoiceLine : invoiceLines) {
|
||||
invoiceLine.setStockMoveLine(stockMoveLine);
|
||||
invoiceLine.setTrackingNumber(stockMoveLine.getTrackingNumber());
|
||||
invoiceLine.setPvg(stockMoveLine.getPvg());
|
||||
invoiceLine.setPpa(stockMoveLine.getPpa());
|
||||
invoiceLine.setUg(stockMoveLine.getUg());
|
||||
invoiceLine.setShp(stockMoveLine.getShp());
|
||||
invoiceLine.setStklim(stockMoveLine.getStklim());
|
||||
}
|
||||
return invoiceLines;
|
||||
}
|
||||
|
||||
@@ -121,6 +121,11 @@ public class StockMoveLineServiceSupplychainImpl extends StockMoveLineServiceImp
|
||||
stockMoveLine.setRequestedReservedQty(BigDecimal.ZERO);
|
||||
stockMoveLine.setSaleOrderLine(saleOrderLine);
|
||||
stockMoveLine.setPurchaseOrderLine(purchaseOrderLine);
|
||||
stockMoveLine.setShp(saleOrderLine.getShp());
|
||||
stockMoveLine.setPpa(saleOrderLine.getPpa());
|
||||
stockMoveLine.setPvg(saleOrderLine.getPvg());
|
||||
stockMoveLine.setStklim(saleOrderLine.getStklim());
|
||||
stockMoveLine.setUg(saleOrderLine.getUg());
|
||||
TrackingNumberConfiguration trackingNumberConfiguration =
|
||||
product.getTrackingNumberConfiguration();
|
||||
|
||||
|
||||
@@ -465,6 +465,11 @@ StockMoveLineRepository stockMoveLineRepo = Beans.get(StockMoveLineRepository.cl
|
||||
newStockMoveLine.setProductTypeSelect(moveLine.getProductTypeSelect());
|
||||
newStockMoveLine.setSaleOrderLine(moveLine.getSaleOrderLine());
|
||||
newStockMoveLine.setCompanyUnitPriceUntaxed(moveLine.getCompanyUnitPriceUntaxed());
|
||||
newStockMoveLine.setUg(moveLine.getUg());
|
||||
newStockMoveLine.setPpa(moveLine.getPpa());
|
||||
newStockMoveLine.setPvg(moveLine.getPvg());
|
||||
newStockMoveLine.setStklim(moveLine.getStklim());
|
||||
newStockMoveLine.setShp(moveLine.getShp());
|
||||
// add stock move line
|
||||
originalStockMove.addStockMoveLineListItem(newStockMoveLine);
|
||||
|
||||
|
||||
@@ -278,6 +278,11 @@ public abstract class InvoiceLineGeneratorSupplyChain extends InvoiceLineGenerat
|
||||
invoiceLine.setInTaxPrice(inTaxPrice);
|
||||
// sophal
|
||||
invoiceLine.setTrackingNumber(stockMoveLine.getTrackingNumber());
|
||||
invoiceLine.setPvg(stockMoveLine.getPvg());
|
||||
invoiceLine.setPpa(stockMoveLine.getPpa());
|
||||
invoiceLine.setUg(stockMoveLine.getUg());
|
||||
invoiceLine.setShp(stockMoveLine.getShp());
|
||||
invoiceLine.setStklim(stockMoveLine.getStklim());
|
||||
|
||||
analyticMoveLineList =
|
||||
invoiceLineService.getAndComputeAnalyticDistribution(invoiceLine, invoice);
|
||||
|
||||
Reference in New Issue
Block a user