|
|
|
@ -691,7 +691,7 @@ func (o logic) CompanyApply(args company.Apply) error {
|
|
|
|
|
|
|
|
|
|
res := o.CompanyAllAmount(uint(args.UserID))
|
|
|
|
|
args.Balance = res.Balance
|
|
|
|
|
args.Withdrawal = res.Withdrawal
|
|
|
|
|
// args.Withdrawal = res.Withdrawal
|
|
|
|
|
args.TaxAmount = res.TaxAmount
|
|
|
|
|
args.ActualAmount = res.ActualAmount
|
|
|
|
|
|
|
|
|
@ -716,10 +716,10 @@ func (o logic) CompanyApply(args company.Apply) error {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Data struct {
|
|
|
|
|
Balance decimal.Decimal `json:"balance"`
|
|
|
|
|
TaxAmount decimal.Decimal `json:"tax_amount"`
|
|
|
|
|
Withdrawal decimal.Decimal `json:"withdrawal"`
|
|
|
|
|
// ActualAmount decimal.Decimal `json:"actual_amount"`
|
|
|
|
|
Balance decimal.Decimal `json:"balance"`
|
|
|
|
|
TaxAmount decimal.Decimal `json:"tax_amount"`
|
|
|
|
|
Withdrawal decimal.Decimal `json:"withdrawal"`
|
|
|
|
|
ActualAmount decimal.Decimal `json:"actual_amount"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (o logic) CompanyAllAmount(id uint) (res Data) {
|
|
|
|
@ -743,7 +743,7 @@ func (o logic) CompanyAllAmount(id uint) (res Data) {
|
|
|
|
|
Mul(decimal.NewFromFloat(1.12)).Round(2))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
res.Withdrawal = res.Balance.Sub(res.TaxAmount)
|
|
|
|
|
res.ActualAmount = res.Balance.Sub(res.TaxAmount)
|
|
|
|
|
// res.ActualAmount = res.Withdrawal.Mul(decimal.NewFromFloat(1.06)).Round(2)
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|