|
@@ -200,13 +200,12 @@ func UpdateProduceBill(c *gin.Context, apictx *ApiSession) (interface{}, error)
|
|
|
return nil, errors.New("id的为空")
|
|
|
}
|
|
|
|
|
|
- billType, err := searchBillTypeById(apictx, repo.CollectionBillProduce, bill.Id)
|
|
|
- if err != nil {
|
|
|
- return nil, err
|
|
|
- }
|
|
|
-
|
|
|
// 如果更改类型
|
|
|
if len(bill.Type) > 0 {
|
|
|
+ billType, err := searchBillTypeById(apictx, repo.CollectionBillPurchase, bill.Id)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
if billType != bill.Type {
|
|
|
bill.SerialNumber, err = generateSerial(apictx, bill.Type)
|
|
|
if err != nil {
|