Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
06b90012
Commit
06b90012
authored
May 21, 2022
by
季圣华
Browse files
给出库单据中对于sku商品换个方式计算库存
parent
8108d639
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java
View file @
06b90012
...
...
@@ -539,6 +539,10 @@ public class DepotItemService {
continue
;
}
BigDecimal
stock
=
getStockByParam
(
depotItem
.
getDepotId
(),
depotItem
.
getMaterialId
(),
null
,
null
);
if
(
StringUtil
.
isNotEmpty
(
depotItem
.
getSku
()))
{
//对于sku商品要换个方式计算库存
stock
=
getSkuStockByParam
(
depotItem
.
getDepotId
(),
depotItem
.
getMaterialExtendId
(),
null
,
null
);
}
BigDecimal
thisBasicNumber
=
depotItem
.
getBasicNumber
()==
null
?
BigDecimal
.
ZERO
:
depotItem
.
getBasicNumber
();
if
(
systemConfigService
.
getMinusStockFlag
()
==
false
&&
stock
.
compareTo
(
thisBasicNumber
)<
0
){
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
MATERIAL_STOCK_NOT_ENOUGH_CODE
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment