Bumped the version to 7
Fixed double exception being thrown Currency pipe broke the accounts pipe
This commit is contained in:
parent
1c2c98e7b5
commit
7b4756fe1a
brewman/routers
account.pyattendance.py
auth
cost_centre.pyemployee.pyemployee_benefit.pyincentive.pyissue.pyjournal.pyproduct.pyproduct_group.pypurchase.pypurchase_return.pyvoucher.pyoverlord
setup.py@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
import uuid
|
||||
from typing import List, Optional
|
||||
from datetime import datetime
|
||||
@ -49,9 +48,7 @@ def save(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.put("/{id_}", response_model=schemas.Account)
|
||||
@ -84,9 +81,7 @@ def update(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.delete("/{id}")
|
||||
|
@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
from datetime import datetime, date, timedelta
|
||||
|
||||
from fastapi import APIRouter, HTTPException, status, Depends, Security, Request
|
||||
@ -107,9 +106,7 @@ def save(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def date_range(start: date, stop: date, step=timedelta(days=1), inclusive=False):
|
||||
|
@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
import uuid
|
||||
|
||||
from fastapi import APIRouter, HTTPException, status, Depends, Security
|
||||
@ -46,9 +45,7 @@ def update(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.delete("/{id_}")
|
||||
@ -68,9 +65,7 @@ def delete(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.get("/list")
|
||||
|
@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
import uuid
|
||||
from typing import List, Optional
|
||||
|
||||
@ -41,9 +40,7 @@ def save(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.put("/{id_}", response_model=schemas.Role)
|
||||
@ -66,9 +63,7 @@ def update(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def add_permissions(role: Role, permissions: List[schemas.PermissionItem], db):
|
||||
@ -97,9 +92,7 @@ def delete(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.get("")
|
||||
|
@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
import uuid
|
||||
from typing import List, Optional
|
||||
|
||||
@ -41,9 +40,7 @@ def save(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.get("/me", response_model=schemas.User)
|
||||
@ -75,9 +72,7 @@ def update_me(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.put("/{id_}", response_model=schemas.User)
|
||||
@ -103,9 +98,7 @@ def update(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def add_roles(user: User, roles: List[schemas.RoleItem], db: Session):
|
||||
@ -134,9 +127,7 @@ def delete(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.get("")
|
||||
|
@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
import uuid
|
||||
from typing import List, Optional
|
||||
|
||||
@ -42,9 +41,7 @@ def save(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.put("/{id_}", response_model=schemas.CostCentre)
|
||||
@ -70,9 +67,8 @@ def update(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
|
||||
@router.delete("/{id_}")
|
||||
@ -96,9 +92,7 @@ def delete(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.get("")
|
||||
|
@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
import uuid
|
||||
|
||||
from sqlalchemy import desc
|
||||
@ -51,9 +50,7 @@ def save(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.put("/{id_}", response_model=schemas.Employee)
|
||||
@ -87,9 +84,7 @@ def update(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.delete("/{id_}")
|
||||
|
@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
import uuid
|
||||
from math import ceil
|
||||
from typing import List
|
||||
@ -75,9 +74,7 @@ def save_route(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def save(data: schema_in.EmployeeBenefitIn, date_: date, user: UserToken, db: Session) -> Voucher:
|
||||
@ -163,9 +160,7 @@ def update_route(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def update(id_: uuid.UUID, data: schema_in.EmployeeBenefitIn, user: UserToken, db: Session) -> Voucher:
|
||||
@ -222,9 +217,7 @@ def get_id(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.get("", response_model=output.Voucher)
|
||||
|
@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
import uuid
|
||||
from decimal import Decimal
|
||||
from typing import List, Optional
|
||||
@ -73,9 +72,7 @@ def save_route(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def save(data: schema_in.IncentiveIn, user: UserToken, db: Session) -> Voucher:
|
||||
@ -138,9 +135,7 @@ def update_route(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def update(id_: uuid.UUID, data: schema_in.IncentiveIn, user: UserToken, db: Session) -> Voucher:
|
||||
@ -185,9 +180,7 @@ def get_id(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.get("", response_model=output.Voucher)
|
||||
|
@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
from decimal import Decimal
|
||||
@ -69,9 +68,7 @@ def save_route(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def save(data: schema_in.IssueIn, user: UserToken, db: Session) -> (Voucher, Optional[bool]):
|
||||
@ -176,9 +173,7 @@ def update_route(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def update(id_: uuid.UUID, data: schema_in.IssueIn, user: UserToken, db: Session) -> (Voucher, Optional[bool]):
|
||||
@ -306,9 +301,7 @@ def get_id(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.get("", response_model=output.Voucher)
|
||||
|
@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
import uuid
|
||||
from typing import List
|
||||
from datetime import datetime
|
||||
@ -65,6 +64,7 @@ def save_route(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=str(e),
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise
|
||||
|
||||
|
||||
@ -111,9 +111,7 @@ def update_route(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def update(id_: uuid.UUID, data: schema_in.JournalIn, user: UserToken, db: Session) -> Voucher:
|
||||
@ -174,9 +172,7 @@ def get_id(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.get("", response_model=output.Voucher)
|
||||
|
@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
import uuid
|
||||
from typing import Optional
|
||||
|
||||
@ -54,9 +53,7 @@ def save(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.put("/{id_}", response_model=schemas.Product)
|
||||
@ -93,9 +90,7 @@ def update(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.delete("/{id_}")
|
||||
|
@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
import uuid
|
||||
from typing import List, Optional
|
||||
|
||||
@ -42,9 +41,7 @@ def save(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.put("/{id_}", response_model=schemas.ProductGroup)
|
||||
@ -70,9 +67,7 @@ def update(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.delete("/{id_}")
|
||||
@ -96,9 +91,7 @@ def delete(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.get("")
|
||||
|
@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
import uuid
|
||||
from decimal import Decimal
|
||||
from typing import List
|
||||
@ -69,9 +68,7 @@ def save_route(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def save(data: schema_in.PurchaseIn, user: UserToken, db: Session) -> Voucher:
|
||||
@ -158,9 +155,7 @@ def update_route(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def update(id_: uuid.UUID, data: schema_in.PurchaseIn, user: UserToken, db: Session) -> Voucher:
|
||||
@ -301,9 +296,7 @@ def get_id(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.get("", response_model=output.Voucher)
|
||||
|
@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
import uuid
|
||||
from decimal import Decimal
|
||||
from typing import List
|
||||
@ -68,9 +67,7 @@ def save_route(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def save(data: schema_in.PurchaseIn, user: UserToken, db: Session) -> Voucher:
|
||||
@ -154,9 +151,7 @@ def update_route(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def update(id_: uuid.UUID, data: schema_in.PurchaseIn, user: UserToken, db: Session) -> Voucher:
|
||||
@ -248,9 +243,7 @@ def get_id(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
@router.get("", response_model=output.Voucher)
|
||||
|
@ -1,4 +1,3 @@
|
||||
import traceback
|
||||
import uuid
|
||||
from typing import Optional
|
||||
from datetime import datetime, date
|
||||
@ -67,9 +66,7 @@ def post_voucher(
|
||||
)
|
||||
except Exception:
|
||||
db.rollback()
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, detail=traceback.format_exc(),
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
def check_delete_permissions(voucher: Voucher, user: UserToken):
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "overlord",
|
||||
"version": "0.0.0",
|
||||
"version": "7.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
|
@ -66,8 +66,8 @@
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;" [ngClass]="getRowClass(row.id, row.posted)"
|
||||
(click)="selectRow(row.id)"></mat-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;" [class.selected]="selectedRowId === row.id"
|
||||
[class.unposted]="!row.posted && selectedRowId !== row.id" (click)="selectRow(row.id)"></mat-row>
|
||||
</mat-table>
|
||||
|
||||
<mat-paginator #paginator
|
||||
|
@ -48,16 +48,6 @@ export class DaybookComponent implements OnInit {
|
||||
this.selectedRowId = id;
|
||||
}
|
||||
|
||||
getRowClass(id: string, posted: boolean): string {
|
||||
if (this.selectedRowId === id) {
|
||||
return 'selected';
|
||||
} else if (!posted) {
|
||||
return 'unposted';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
show() {
|
||||
const l = this.prepareSubmit();
|
||||
this.router.navigate(['daybook'], {
|
||||
|
@ -133,7 +133,8 @@ export class JournalComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
rowAmount(amount: string = '', debit: number): any {
|
||||
try {
|
||||
const val = math.eval(amount.trim().replace(',', ''));
|
||||
amount = amount.replace(new RegExp('(₹[\s]*)|(,)|(\s)', 'g'), '');
|
||||
const val = math.eval(amount);
|
||||
if (val < 0) {
|
||||
debit *= -1;
|
||||
}
|
||||
|
@ -87,8 +87,8 @@
|
||||
</ng-container>
|
||||
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;" [ngClass]="getRowClass(row.id, row.posted)"
|
||||
(click)="selectRow(row.id)"></mat-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;" [class.selected]="selectedRowId === row.id"
|
||||
[class.unposted]="!row.posted && selectedRowId !== row.id" (click)="selectRow(row.id)"></mat-row>
|
||||
<mat-footer-row *matFooterRowDef="displayedColumns"></mat-footer-row>
|
||||
</mat-table>
|
||||
|
||||
|
@ -104,16 +104,6 @@ export class LedgerComponent implements OnInit, AfterViewInit {
|
||||
this.selectedRowId = id;
|
||||
}
|
||||
|
||||
getRowClass(id: string, posted: boolean): string {
|
||||
if (this.selectedRowId === id) {
|
||||
return 'selected';
|
||||
} else if (!posted) {
|
||||
return 'unposted';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
show() {
|
||||
const info = this.getInfo();
|
||||
this.router.navigate(['ledger', info.account.id], {
|
||||
|
@ -141,7 +141,8 @@ export class PaymentComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
rowAmount(amount: string = ''): number {
|
||||
try {
|
||||
return math.eval(amount.trim().replace(',', ''));
|
||||
amount = amount.replace(new RegExp('(₹[\s]*)|(,)|(\s)', 'g'), '');
|
||||
return math.eval(amount);
|
||||
} catch {
|
||||
return 0;
|
||||
}
|
||||
|
@ -140,7 +140,8 @@ export class ReceiptComponent implements OnInit, AfterViewInit, OnDestroy {
|
||||
|
||||
rowAmount(amount: string = ''): number {
|
||||
try {
|
||||
return math.eval(amount.trim().replace(',', ''));
|
||||
amount = amount.replace(new RegExp('(₹[\s]*)|(,)|(\s)', 'g'), '');
|
||||
return math.eval(amount);
|
||||
} catch {
|
||||
return 0;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ export class AccountingPipe implements PipeTransform {
|
||||
if (value === null) {
|
||||
return '';
|
||||
}
|
||||
const amount = +(value.replace(new RegExp('(₹ )|(,)', 'g'), ''));
|
||||
const amount = +(value.replace(new RegExp('(₹[\s]*)|(,)', 'g'), ''));
|
||||
return value.replace('-', '') + ((amount < 0) ? '\u00A0Cr' : '\u00A0Dr');
|
||||
}
|
||||
|
||||
|
2
setup.py
2
setup.py
@ -11,7 +11,7 @@ with open(os.path.join(here, 'requirements.txt'), "r") as r:
|
||||
requires = r.read().splitlines()
|
||||
|
||||
setup(name='brewman',
|
||||
version='6.0',
|
||||
version='7.0',
|
||||
description='brewman',
|
||||
long_description=README + '\n\n' + CHANGES,
|
||||
classifiers=[
|
||||
|
Loading…
x
Reference in New Issue
Block a user