Merge branch 'development' into 'master'
fix: transaction service See merge request empatnusabangsa/ppob/ppob-backend!127
This commit is contained in:
commit
93832fa1e4
|
@ -505,9 +505,11 @@ export class TransactionService {
|
||||||
responseAPISupplier: hitSupplier,
|
responseAPISupplier: hitSupplier,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let costInventory = product_price.price;
|
||||||
|
|
||||||
if (hitSupplier.harga != product_price.price) {
|
if (hitSupplier.harga != product_price.price) {
|
||||||
product_price.endDate = new Date();
|
product_price.endDate = new Date();
|
||||||
|
costInventory = hitSupplier.harga;
|
||||||
const listActivePrice =
|
const listActivePrice =
|
||||||
await this.productHistoryPriceService.getAllActivePriceByProduct(
|
await this.productHistoryPriceService.getAllActivePriceByProduct(
|
||||||
product.id,
|
product.id,
|
||||||
|
@ -570,7 +572,7 @@ export class TransactionService {
|
||||||
journals: [
|
journals: [
|
||||||
{
|
{
|
||||||
coa_id: coaInventory.id,
|
coa_id: coaInventory.id,
|
||||||
credit: product_price.price,
|
credit: costInventory,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
coa_id: coaCostOfSales.id,
|
coa_id: coaCostOfSales.id,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user