feat: Portal, Email Inbound, Discuss + module improvements
- Portal: /my/* routes, signup, password reset, portal user support - Email Inbound: IMAP polling (go-imap/v2), thread matching - Discuss: mail.channel, long-polling bus, DM, unread count - Cron: ir.cron runner (goroutine scheduler) - Bank Import, CSV/Excel Import - Automation (ir.actions.server) - Fetchmail service - HR Payroll model - Various fixes across account, sale, stock, purchase, crm, hr, project Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -51,10 +51,12 @@ func ComputeTax(env *orm.Environment, taxID int64, baseAmount float64) (*TaxResu
|
||||
case "fixed":
|
||||
taxAmount = amount
|
||||
case "division":
|
||||
// Division tax: price = base / (1 - rate/100)
|
||||
// Mirrors: odoo/addons/account/models/account_tax.py _compute_amount (division case)
|
||||
if priceInclude {
|
||||
taxAmount = baseAmount - (baseAmount / (1 + amount/100))
|
||||
taxAmount = baseAmount - (baseAmount * (100 - amount) / 100)
|
||||
} else {
|
||||
taxAmount = baseAmount * amount / 100
|
||||
taxAmount = baseAmount/(1-amount/100) - baseAmount
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user