diff --git a/brewman/models/master.py b/brewman/models/master.py index ecd30f1a..7aacfd0e 100644 --- a/brewman/models/master.py +++ b/brewman/models/master.py @@ -479,18 +479,18 @@ class AccountType: @classmethod def list(cls): return [ - AccountType(1, "Cash", True, True, "Cash", 10, True), - AccountType(2, "Purchase", False, True, "Operating", 20, True), - AccountType(3, "Sale", False, False, "Operating", 10, True), - AccountType(4, "Assets", True, True, "Investing", 20, True), - AccountType(5, "Capital", True, False, "Financing", 70, True), - AccountType(6, "Debtors", True, True, "Operating", 30, True), - AccountType(7, "Expenses", False, True, "Operating", 40, True), - AccountType(9, "Creditors", True, False, "Operating", 60, True), - AccountType(10, "Salary", True, True, "Operating", 40, False), - AccountType(11, "Liabilities", True, False, "Operating", 50, True), - AccountType(12, "Revenue", False, False, "Operating", 30, True), - AccountType(13, "Tax", True, False, "Operating", 80, True), + AccountType(1, "Cash", True, True, "Cash", 10000, True), + AccountType(2, "Purchase", False, True, "Operating", 20000, True), + AccountType(3, "Sale", False, False, "Operating", 10000, True), + AccountType(4, "Assets", True, True, "Investing", 20000, True), + AccountType(5, "Capital", True, False, "Financing", 70000, True), + AccountType(6, "Debtors", True, True, "Operating", 30000, True), + AccountType(7, "Expenses", False, True, "Operating", 40000, True), + AccountType(9, "Creditors", True, False, "Operating", 60000, True), + AccountType(10, "Salary", True, True, "Operating", 40000, False), + AccountType(11, "Liabilities", True, False, "Operating", 50000, True), + AccountType(12, "Revenue", False, False, "Operating", 30000, True), + AccountType(13, "Tax", True, False, "Operating", 80000, True), ] # list.append(AccountType(8, 'Discount', False, False, True, 30, True)) # list.append(AccountType(14, 'Total', False, False, False, 900, False)) diff --git a/brewman/routers/batch.py b/brewman/routers/batch.py index 1774963c..87830495 100644 --- a/brewman/routers/batch.py +++ b/brewman/routers/batch.py @@ -27,7 +27,7 @@ def batch_term( filter_ = q if q is not None and q.strip() != "" else None date = None if not d else datetime.datetime.strptime(d, "%d-%b-%Y") list_ = [] - for index, item in enumerate(Batch.list(filter_, include_nil=False, date=date, dbsession=db)): + for index, item in enumerate(Batch.list(filter_, include_nil=False, date=date, db=db)): text = f"{item.product.name} ({item.product.units}) {item.quantity_remaining:.2f}@{item.rate:.2f} from {item.name.strftime('%d-%b-%Y')}" list_.append( { diff --git a/brewman/schemas/reports.py b/brewman/schemas/reports.py index a34322e8..cb02faa0 100644 --- a/brewman/schemas/reports.py +++ b/brewman/schemas/reports.py @@ -245,12 +245,12 @@ class ProductLedgerItem(BaseModel): url: List[str] type_: str narration: str - debit_quantity: Optional[Decimal] = Field(multiple_of=0.01) - debit_amount: Optional[Decimal] = Field(multiple_of=0.01) - credit_quantity: Optional[Decimal] = Field(multiple_of=0.01) - credit_amount: Optional[Decimal] = Field(multiple_of=0.01) - running_quantity: Decimal = Field(multiple_of=0.01) - running_amount: Decimal = Field(multiple_of=0.01) + debit_quantity: Optional[Decimal] + debit_amount: Optional[Decimal] + credit_quantity: Optional[Decimal] + credit_amount: Optional[Decimal] + running_quantity: Decimal + running_amount: Decimal posted: bool @validator("date_", pre=True) diff --git a/overlord/package.json b/overlord/package.json index b6e1fe29..dc39b1e8 100644 --- a/overlord/package.json +++ b/overlord/package.json @@ -1,6 +1,6 @@ { "name": "overlord", - "version": "7.0.3", + "version": "7.0.4", "scripts": { "ng": "ng", "start": "ng serve", diff --git a/setup.py b/setup.py index edfdcf5d..3289baba 100644 --- a/setup.py +++ b/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='7.0.3', + version='7.0.4', description='brewman', long_description=README + '\n\n' + CHANGES, classifiers=[