...
|
...
|
@@ -122,7 +122,7 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend |
|
|
CompanyId: good.CompanyId,
|
|
|
OrgId: good.OrgId,
|
|
|
OrderGoodExpense: good.OrderGoodExpense,
|
|
|
OrderGoodDividendsStatus: good.OrderGoodDividendsStatus,
|
|
|
OrderGoodDividendsStatus: 1,
|
|
|
CreatedAt: time.Now(),
|
|
|
DeletedAt: time.Time{},
|
|
|
UpdatedAt: time.Time{},
|
...
|
...
|
@@ -228,7 +228,7 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend |
|
|
OrderGoodExpense: goodDomain.OrderGoodExpense,
|
|
|
OrgId: goodDomain.OrgId,
|
|
|
CompanyId: goodDomain.CompanyId,
|
|
|
OrderGoodDividendsStatus: goodDomain.OrderGoodDividendsStatus,
|
|
|
OrderGoodDividendsStatus: 1,
|
|
|
CreatedAt: time.Now(),
|
|
|
DeletedAt: time.Time{},
|
|
|
UpdatedAt: time.Time{},
|
...
|
...
|
@@ -266,20 +266,20 @@ func (repository *DividendsOrderRepository) Save(dividendsOrder *domain.Dividend |
|
|
for _, orderGood := range dividendsOrder.Goods {
|
|
|
if orderGood.OrderGoodId == orderGoodModelToUpdate.OrderGoodId {
|
|
|
orderGoodModelsToUpdate[i] = &models.OrderGood{
|
|
|
OrderGoodId: orderGood.OrderGoodId,
|
|
|
OrderGoodId: orderGoodModelToUpdate.OrderGoodId,
|
|
|
OrderGoodAmount: orderGood.OrderGoodAmount,
|
|
|
OrderGoodName: orderGood.OrderGoodName,
|
|
|
OrderGoodPrice: orderGood.OrderGoodPrice,
|
|
|
OrderGoodQuantity: orderGood.OrderGoodQuantity,
|
|
|
DividendsOrderNumber: orderGood.DividendsOrderNumber,
|
|
|
DividendsReturnedOrderNumber: orderGood.DividendsReturnedOrderNumber,
|
|
|
DividendsReturnedOrderNumber: "",
|
|
|
CooperationContractNumber: orderGood.CooperationContractNumber,
|
|
|
OrgId: orderGood.OrgId,
|
|
|
CompanyId: orderGood.CompanyId,
|
|
|
OrgId: orderGoodModelToUpdate.OrgId,
|
|
|
CompanyId: orderGoodModelToUpdate.CompanyId,
|
|
|
OrderGoodExpense: orderGood.OrderGoodExpense,
|
|
|
OrderGoodDividendsStatus: orderGood.OrderGoodDividendsStatus,
|
|
|
CreatedAt: orderGood.CreatedAt,
|
|
|
DeletedAt: orderGood.DeletedAt,
|
|
|
OrderGoodDividendsStatus: orderGoodModelToUpdate.OrderGoodDividendsStatus,
|
|
|
CreatedAt: orderGoodModelToUpdate.CreatedAt,
|
|
|
DeletedAt: orderGoodModelToUpdate.DeletedAt,
|
|
|
UpdatedAt: time.Now(),
|
|
|
}
|
|
|
}
|
...
|
...
|
|