Merge branch 'master' of https://gitlab.com/empatnusabangsa/ppob/ppob-backend into devops-production
This commit is contained in:
commit
306e5d2376
|
@ -1533,6 +1533,25 @@ export class TransactionService {
|
|||
|
||||
// dataTransaction.balance_remaining = coaAccount.amount - product_price.mark_up_price - costInventory;
|
||||
|
||||
try {
|
||||
console.log('updatestatustrans', 'update');
|
||||
await this.connection.transaction(async (manager) => {
|
||||
await manager.save(dataTransaction);
|
||||
await manager.save(dataProductHistoryPrice);
|
||||
|
||||
await this.accountingTransaction({
|
||||
createTransaction: false,
|
||||
transactionalEntityManager: manager,
|
||||
transaction: dataTransaction,
|
||||
amount: dataTransaction.amount,
|
||||
journals: supervisorData,
|
||||
});
|
||||
});
|
||||
} catch (e) {
|
||||
console.log('errupdatestatus', e);
|
||||
throw e;
|
||||
}
|
||||
|
||||
if (userData.partner == null) {
|
||||
console.log('partnernull', 'masuk');
|
||||
//GET SALES
|
||||
|
@ -1557,25 +1576,6 @@ export class TransactionService {
|
|||
]);
|
||||
}
|
||||
|
||||
try {
|
||||
console.log('updatestatustrans', 'update');
|
||||
await this.connection.transaction(async (manager) => {
|
||||
await manager.save(dataTransaction);
|
||||
await manager.save(dataProductHistoryPrice);
|
||||
|
||||
await this.accountingTransaction({
|
||||
createTransaction: false,
|
||||
transactionalEntityManager: manager,
|
||||
transaction: dataTransaction,
|
||||
amount: dataTransaction.amount,
|
||||
journals: supervisorData,
|
||||
});
|
||||
});
|
||||
} catch (e) {
|
||||
console.log('errupdatestatus', e);
|
||||
throw e;
|
||||
}
|
||||
|
||||
if (userData.partner != null) {
|
||||
if (userData.partner) {
|
||||
console.log('partnernotnull', 'masuk');
|
||||
|
|
Loading…
Reference in New Issue
Block a user