|
|
@@ -78,7 +78,7 @@ def _n2l(data: dict) -> None:
|
|
|
det['wrong_tax'] = listed * wrong_rate
|
|
|
det['sales_tax'] = listed * SALES_TAX
|
|
|
det['wrong_tax_loss'] = det['sales_tax'] - det['wrong_tax']
|
|
|
- data['listed'] = listed
|
|
|
+ data['listed'] = round(listed, 2)
|
|
|
def _l2n(data: dict) -> None:
|
|
|
svc = data['service']
|
|
|
det = data['details']
|
|
|
@@ -92,7 +92,7 @@ def _l2n(data: dict) -> None:
|
|
|
for k in [ 'commission', 'wrong_tax_loss' ]:
|
|
|
if k in det:
|
|
|
net -= det[k]
|
|
|
- data['net'] = net
|
|
|
+ data['net'] = round(net,2)
|
|
|
|
|
|
def _l2r(data: dict) -> None:
|
|
|
svc = data['service']
|
|
|
@@ -110,7 +110,7 @@ def _l2r(data: dict) -> None:
|
|
|
if 'taxes' in svc and 'flat_tax' in svc['taxes']:
|
|
|
det['service_tax'] = svc['taxes']['flat_tax']
|
|
|
retail += det['service_tax']
|
|
|
- data['retail'] = retail
|
|
|
+ data['retail'] = round(retail, 2)
|
|
|
def _r2l(data: dict) -> None:
|
|
|
svc = data['service']
|
|
|
det = data['details']
|
|
|
@@ -127,7 +127,7 @@ def _r2l(data: dict) -> None:
|
|
|
if 'fees' in svc and 'client_fee' in svc['fees']:
|
|
|
det['client_fee'] = listed - (listed / (1 + svc['fees']['client_fee']))
|
|
|
listed -= det['client_fee']
|
|
|
- data['listed'] = listed
|
|
|
+ data['listed'] = round(listed, 2)
|
|
|
|
|
|
# Routing
|
|
|
@app.route(f"{URL_PREFIX}/services", methods=['GET'])
|