|
@@ -122,7 +122,7 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend |
|
@@ -122,7 +122,7 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend |
122
|
CompanyId: good.CompanyId,
|
122
|
CompanyId: good.CompanyId,
|
123
|
OrgId: good.OrgId,
|
123
|
OrgId: good.OrgId,
|
124
|
OrderGoodExpense: good.OrderGoodExpense,
|
124
|
OrderGoodExpense: good.OrderGoodExpense,
|
125
|
- OrderGoodDividendsStatus: good.OrderGoodDividendsStatus,
|
125
|
+ OrderGoodDividendsStatus: 1,
|
126
|
CreatedAt: time.Now(),
|
126
|
CreatedAt: time.Now(),
|
127
|
DeletedAt: time.Time{},
|
127
|
DeletedAt: time.Time{},
|
128
|
UpdatedAt: time.Time{},
|
128
|
UpdatedAt: time.Time{},
|
|
@@ -228,7 +228,7 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend |
|
@@ -228,7 +228,7 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend |
228
|
OrderGoodExpense: goodDomain.OrderGoodExpense,
|
228
|
OrderGoodExpense: goodDomain.OrderGoodExpense,
|
229
|
OrgId: goodDomain.OrgId,
|
229
|
OrgId: goodDomain.OrgId,
|
230
|
CompanyId: goodDomain.CompanyId,
|
230
|
CompanyId: goodDomain.CompanyId,
|
231
|
- OrderGoodDividendsStatus: goodDomain.OrderGoodDividendsStatus,
|
231
|
+ OrderGoodDividendsStatus: 1,
|
232
|
CreatedAt: time.Now(),
|
232
|
CreatedAt: time.Now(),
|
233
|
DeletedAt: time.Time{},
|
233
|
DeletedAt: time.Time{},
|
234
|
UpdatedAt: time.Time{},
|
234
|
UpdatedAt: time.Time{},
|
|
@@ -266,20 +266,20 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend |
|
@@ -266,20 +266,20 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend |
266
|
for _, orderGood := range dividendsOrder.Goods {
|
266
|
for _, orderGood := range dividendsOrder.Goods {
|
267
|
if orderGood.OrderGoodId == orderGoodModelToUpdate.OrderGoodId {
|
267
|
if orderGood.OrderGoodId == orderGoodModelToUpdate.OrderGoodId {
|
268
|
orderGoodModelsToUpdate[i] = &models.OrderGood{
|
268
|
orderGoodModelsToUpdate[i] = &models.OrderGood{
|
269
|
- OrderGoodId: orderGood.OrderGoodId,
|
269
|
+ OrderGoodId: orderGoodModelToUpdate.OrderGoodId,
|
270
|
OrderGoodAmount: orderGood.OrderGoodAmount,
|
270
|
OrderGoodAmount: orderGood.OrderGoodAmount,
|
271
|
OrderGoodName: orderGood.OrderGoodName,
|
271
|
OrderGoodName: orderGood.OrderGoodName,
|
272
|
OrderGoodPrice: orderGood.OrderGoodPrice,
|
272
|
OrderGoodPrice: orderGood.OrderGoodPrice,
|
273
|
OrderGoodQuantity: orderGood.OrderGoodQuantity,
|
273
|
OrderGoodQuantity: orderGood.OrderGoodQuantity,
|
274
|
DividendsOrderNumber: orderGood.DividendsOrderNumber,
|
274
|
DividendsOrderNumber: orderGood.DividendsOrderNumber,
|
275
|
- DividendsReturnedOrderNumber: orderGood.DividendsReturnedOrderNumber,
|
275
|
+ DividendsReturnedOrderNumber: "",
|
276
|
CooperationContractNumber: orderGood.CooperationContractNumber,
|
276
|
CooperationContractNumber: orderGood.CooperationContractNumber,
|
277
|
- OrgId: orderGood.OrgId,
|
|
|
278
|
- CompanyId: orderGood.CompanyId,
|
277
|
+ OrgId: orderGoodModelToUpdate.OrgId,
|
|
|
278
|
+ CompanyId: orderGoodModelToUpdate.CompanyId,
|
279
|
OrderGoodExpense: orderGood.OrderGoodExpense,
|
279
|
OrderGoodExpense: orderGood.OrderGoodExpense,
|
280
|
- OrderGoodDividendsStatus: orderGood.OrderGoodDividendsStatus,
|
|
|
281
|
- CreatedAt: orderGood.CreatedAt,
|
|
|
282
|
- DeletedAt: orderGood.DeletedAt,
|
280
|
+ OrderGoodDividendsStatus: orderGoodModelToUpdate.OrderGoodDividendsStatus,
|
|
|
281
|
+ CreatedAt: orderGoodModelToUpdate.CreatedAt,
|
|
|
282
|
+ DeletedAt: orderGoodModelToUpdate.DeletedAt,
|
283
|
UpdatedAt: time.Now(),
|
283
|
UpdatedAt: time.Now(),
|
284
|
}
|
284
|
}
|
285
|
}
|
285
|
}
|