git sale price in return client

This commit is contained in:
2023-02-20 08:39:11 +01:00
parent 535d181d82
commit fa72c20f04

View File

@@ -807,7 +807,11 @@ public class StockMoveLineServiceImpl implements StockMoveLineService {
unitPriceUntaxed = stockMoveLine.getProduct().getAvgPrice();
}
} else if (stockMove.getTypeSelect() == StockMoveRepository.TYPE_INCOMING) {
unitPriceUntaxed = stockMoveLine.getProduct().getPurchasePrice();
if(stockMoveLine.getProduct().getSellable() == true){
unitPriceUntaxed = stockMoveLine.getProduct().getSalePrice();
}else{
unitPriceUntaxed = stockMoveLine.getProduct().getPurchasePrice();
}
} else if (stockMove.getTypeSelect() == StockMoveRepository.TYPE_INTERNAL
&& stockMove.getFromStockLocation() != null
&& stockMove.getFromStockLocation().getTypeSelect()