definir PMP pour les sorties de stock / sophal interne

This commit is contained in:
walid seghier
2022-07-27 15:18:08 +01:00
parent 576b885410
commit a20569bbd6

View File

@@ -801,10 +801,10 @@ public class StockMoveLineServiceImpl implements StockMoveLineService {
BigDecimal unitPriceUntaxed = BigDecimal.ZERO; BigDecimal unitPriceUntaxed = BigDecimal.ZERO;
if (stockMoveLine.getProduct() != null && stockMove != null) { if (stockMoveLine.getProduct() != null && stockMove != null) {
if (stockMove.getTypeSelect() == StockMoveRepository.TYPE_OUTGOING) { if (stockMove.getTypeSelect() == StockMoveRepository.TYPE_OUTGOING) {
if(stockMoveLine.getProduct().getSellable() == true){ if(stockMoveLine.getProduct().getSellable() == true){
unitPriceUntaxed = stockMoveLine.getProduct().getSalePrice(); unitPriceUntaxed = stockMoveLine.getProduct().getSalePrice();
}else{ }else{
unitPriceUntaxed = stockMoveLine.getProduct().getPurchasePrice(); unitPriceUntaxed = stockMoveLine.getProduct().getAvgPrice();
} }
} else if (stockMove.getTypeSelect() == StockMoveRepository.TYPE_INCOMING) { } else if (stockMove.getTypeSelect() == StockMoveRepository.TYPE_INCOMING) {
unitPriceUntaxed = stockMoveLine.getProduct().getPurchasePrice(); unitPriceUntaxed = stockMoveLine.getProduct().getPurchasePrice();