Fix: query productPriceRepository

This commit is contained in:
mfadiln2018 2022-08-10 15:56:10 +07:00
parent 4298366e56
commit 2a6f0faae3
2 changed files with 9 additions and 9 deletions

View File

@ -22,7 +22,7 @@ import {ProductHistoryPrice} from "../product/entities/product-history-price.ent
Transactions, Transactions,
CheckBillHistory, CheckBillHistory,
CallbackPartner, CallbackPartner,
ProductHistoryPrice, // ProductHistoryPrice,
]), ]),
ProductModule, ProductModule,
ConfigurableModule, ConfigurableModule,

View File

@ -35,8 +35,8 @@ export class TransactionService {
private transactionRepository: Repository<Transactions>, private transactionRepository: Repository<Transactions>,
@InjectRepository(TransactionJournal) @InjectRepository(TransactionJournal)
private transactionJournalRepository: Repository<TransactionJournal>, private transactionJournalRepository: Repository<TransactionJournal>,
@InjectRepository(ProductHistoryPrice) // @InjectRepository(ProductHistoryPrice)
private productPriceRepository: Repository<ProductHistoryPrice>, // private productPriceRepository: Repository<ProductHistoryPrice>,
@InjectRepository(COA) @InjectRepository(COA)
private coaRepository: Repository<COA>, private coaRepository: Repository<COA>,
@InjectRepository(CheckBillHistory) @InjectRepository(CheckBillHistory)
@ -1204,11 +1204,11 @@ export class TransactionService {
relations: ['product_price'], relations: ['product_price'],
}); });
const dataProductPrice = await this.productPriceRepository.findOne({ // const dataProductPrice = await this.productPriceRepository.findOne({
where: { // where: {
id:dataTransaction.product_price // id:dataTransaction.product_price
} // }
}); // });
// const dataMsg = callback.msg; // const dataMsg = callback.msg;
// const failedReason = dataMsg.split('.'); // const failedReason = dataMsg.split('.');
@ -1239,7 +1239,7 @@ export class TransactionService {
console.log("inipricetable", dataTransaction.product_price.price) console.log("inipricetable", dataTransaction.product_price.price)
console.log("inipricecallback", callback['price']) console.log("inipricecallback", callback['price'])
console.log("mskupdt", "msk") console.log("mskupdt", "msk")
dataProductPrice.price = callback['price'] dataTransaction.product_price.price = callback['price']
} }
} }
} }