|
@@ -839,7 +839,7 @@ func (*supplier) CreateSupplierWithdraw(ctx context.Context, req *http_model.Cre
|
|
if supplierPaymentErr != nil {
|
|
if supplierPaymentErr != nil {
|
|
return supplierPaymentErr
|
|
return supplierPaymentErr
|
|
}
|
|
}
|
|
- if supplierPaymentInfo != nil {
|
|
|
|
|
|
+ if supplierPaymentInfo != nil && supplierPaymentInfo.PaymentInfoID != 0 {
|
|
for _, withdrawInfo := range req.IncomeIds {
|
|
for _, withdrawInfo := range req.IncomeIds {
|
|
var supplierWithdrawInfo *gorm_model.YounggeeSupplierWithdraw
|
|
var supplierWithdrawInfo *gorm_model.YounggeeSupplierWithdraw
|
|
supplierWithdrawInfo = &gorm_model.YounggeeSupplierWithdraw{}
|
|
supplierWithdrawInfo = &gorm_model.YounggeeSupplierWithdraw{}
|
|
@@ -876,7 +876,7 @@ func (*supplier) CreateSupplierWithdraw(ctx context.Context, req *http_model.Cre
|
|
if supplierPaymentErr != nil {
|
|
if supplierPaymentErr != nil {
|
|
return supplierPaymentErr
|
|
return supplierPaymentErr
|
|
}
|
|
}
|
|
- if supplierPaymentInfo != nil {
|
|
|
|
|
|
+ if supplierPaymentInfo != nil && supplierPaymentInfo.PaymentInfoID != 0 {
|
|
for _, withdrawInfo := range req.InvoiceIds {
|
|
for _, withdrawInfo := range req.InvoiceIds {
|
|
var supplierWithdrawInfo *gorm_model.YounggeeSupplierWithdraw
|
|
var supplierWithdrawInfo *gorm_model.YounggeeSupplierWithdraw
|
|
supplierWithdrawInfo = &gorm_model.YounggeeSupplierWithdraw{}
|
|
supplierWithdrawInfo = &gorm_model.YounggeeSupplierWithdraw{}
|
|
@@ -1266,7 +1266,7 @@ func (*supplier) GetWithdrawPaymentInfo(ctx context.Context, req *http_model.Wit
|
|
if supplierPaymentErr != nil {
|
|
if supplierPaymentErr != nil {
|
|
return nil, supplierPaymentErr
|
|
return nil, supplierPaymentErr
|
|
}
|
|
}
|
|
- if supplierPaymentInfo != nil {
|
|
|
|
|
|
+ if supplierPaymentInfo != nil && supplierPaymentInfo.PaymentInfoID != 0 {
|
|
paymentInfo.Tag = 2
|
|
paymentInfo.Tag = 2
|
|
paymentInfo.Phone = supplierPaymentInfo.Phone
|
|
paymentInfo.Phone = supplierPaymentInfo.Phone
|
|
paymentInfo.SupplierType = supplierPaymentInfo.SupplierType
|
|
paymentInfo.SupplierType = supplierPaymentInfo.SupplierType
|
|
@@ -1291,7 +1291,7 @@ func (*supplier) GetWithdrawPaymentInfo(ctx context.Context, req *http_model.Wit
|
|
if supplierPaymentErr != nil {
|
|
if supplierPaymentErr != nil {
|
|
return nil, supplierPaymentErr
|
|
return nil, supplierPaymentErr
|
|
}
|
|
}
|
|
- if supplierPaymentInfo != nil {
|
|
|
|
|
|
+ if supplierPaymentInfo != nil && supplierPaymentInfo.PaymentInfoID != 0 {
|
|
paymentInfo.Tag = 2
|
|
paymentInfo.Tag = 2
|
|
paymentInfo.PaymentInfoID = supplierPaymentInfo.PaymentInfoID
|
|
paymentInfo.PaymentInfoID = supplierPaymentInfo.PaymentInfoID
|
|
paymentInfo.SupplierType = supplierPaymentInfo.SupplierType
|
|
paymentInfo.SupplierType = supplierPaymentInfo.SupplierType
|