kelvin.yau 23 часов назад
Родитель
Сommit
8f743b2b39
1 измененных файлов: 1 добавлений и 6 удалений
  1. +1
    -6
      src/main/java/com/ffii/fpsms/modules/stock/service/StockInLineService.kt

+ 1
- 6
src/main/java/com/ffii/fpsms/modules/stock/service/StockInLineService.kt Просмотреть файл

@@ -740,17 +740,12 @@ open class StockInLineService(
) )
} }
@Transactional @Transactional
<<<<<<< Updated upstream
private fun createStockLedgerForStockIn(stockInLine: StockInLine) { private fun createStockLedgerForStockIn(stockInLine: StockInLine) {
val item = stockInLine.item ?: return val item = stockInLine.item ?: return
val inventory = inventoryRepository.findByItemId(item.id!!).orElse(null) ?: return val inventory = inventoryRepository.findByItemId(item.id!!).orElse(null) ?: return


val inQty = stockInLine.acceptedQty?.toDouble() ?: 0.0 val inQty = stockInLine.acceptedQty?.toDouble() ?: 0.0
=======
private fun createStockLedgerForStockIn(stockInLine: StockInLine) {
val item = stockInLine.item ?: return
val inventory = inventoryRepository.findFirstByItemIdAndDeletedIsFalseOrderByIdAsc(item.id!!) ?: return
>>>>>>> Stashed changes

// ✅ 修复:查询最新的 stock_ledger 记录,基于前一笔 balance 计算 // ✅ 修复:查询最新的 stock_ledger 记录,基于前一笔 balance 计算
val latestLedger = stockLedgerRepository.findLatestByItemId(item.id!!).firstOrNull() val latestLedger = stockLedgerRepository.findLatestByItemId(item.id!!).firstOrNull()


Загрузка…
Отмена
Сохранить