Add tax was not working

This commit is contained in:
2025-05-27 13:57:46 +00:00
parent ad8ccb26df
commit 2ca94e5bea
2 changed files with 4 additions and 1 deletions

View File

@ -2,7 +2,7 @@ HOST=0.0.0.0
PORT=80
LOG_LEVEL=WARN
DEBUG=false
SQLALCHEMY_DATABASE_URI=postgresql://postgres:123456@db:5432/petty{{ name }}
SQLALCHEMY_DATABASE_URI=postgresql+psycopg://postgres:123456@db:5432/petty{{ name }}
MODULE_NAME=barker.main
PROJECT_NAME=barker
MAX_WORKERS=4

View File

@ -122,6 +122,9 @@ export class TaxDetailComponent implements OnInit, AfterViewInit {
const formModel = this.form.value;
this.item.name = formModel.name ?? '';
this.item.rate = round((formModel.rate ?? 0) / 100, 5);
if (this.item.regime === null || this.item.regime === undefined) {
this.item.regime = new Regime();
}
this.item.regime.id = formModel.regime;
return this.item;
}