lambda-erp 1.4.33__tar.gz → 1.4.34__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/PKG-INFO +1 -1
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/chat.py +1 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/controllers/item_price.py +45 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/controllers/taxes_and_totals.py +9 -1
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/pyproject.toml +1 -1
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/.gitignore +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/LICENSE +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/README.md +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/__init__.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/attachments.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/auth.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/bootstrap.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/chat_links.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/demo_limits.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/deps.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/erp_context.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/errors.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/list_columns.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/list_values.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/llm_provider.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/mail.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/main.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/mcp_oauth.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/mentions.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/menu_layout.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/number_series.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/oauth.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/order_actions.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/pdf.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/pdf_contract.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/pdf_exports.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/pdf_fonts.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/pdf_pages.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/pdf_profiles.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/pdf_templates.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/pricing_actions.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/providers.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/record_attachments.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/record_notes.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/remarks_md.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/__init__.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/accounting.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/actions.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/admin.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/analytics.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/availability.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/bank_reconciliation.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/bank_statements.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/chat_api.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/documents.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/masters.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/mcp.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/pdf_templates.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/proposals.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/reports.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/routers/setup.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/services.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/stock_actions.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/templates/_proposal_totals.html +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/templates/_record_base.html +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/templates/delivery_note.html +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/templates/document.html +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/templates/proposal.html +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/templates/record.html +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/templates/reservation.html +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/time_filters.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/tool_permissions.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/tool_results.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/api/write_context.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/docs/agents/README.md +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/frontend/LICENSE +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/frontend/README.md +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/frontend/src/api/client.ts +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/__init__.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/__init__.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/bank_account.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/bank_reconciliation.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/bank_statement_import.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/bank_transaction.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/budget.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/camt.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/chart_of_accounts.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/general_ledger.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/journal_entry.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/payment_entry.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/pos_invoice.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/purchase_invoice.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/revaluation.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/sales_invoice.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/settlement.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/setup/__init__.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/setup/engine.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/setup/pack.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/setup/packs/__init__.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/setup/packs/ch.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/setup/packs/de_common.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/setup/packs/de_skr03.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/setup/packs/de_skr04.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/setup/packs/generic.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/setup/profiles.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/setup/spine.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/accounting/subscription.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/addresses.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/assets/__init__.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/assets/asset.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/assets/lifecycle.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/assets/reservation.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/backlog.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/bundles.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/buying/__init__.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/buying/purchase_order.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/controllers/__init__.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/controllers/currency.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/controllers/defaults.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/controllers/item_prices.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/controllers/price_resolution.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/controllers/pricing_rule.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/controllers/tax_defaults.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/customer_terms.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/database.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/exceptions.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/hooks.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/master_integrity.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/model.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/order_closing.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/permissions.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/selling/__init__.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/selling/proposal.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/selling/quotation.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/selling/sales_order.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/simulation.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/stock/__init__.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/stock/consignment.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/stock/delivery_note.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/stock/purchase_receipt.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/stock/reservation.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/stock/serial.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/stock/stock_count.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/stock/stock_entry.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/stock/stock_ledger.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/timestamps.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/units.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/utils.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/validation.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/lambda_erp/workflow.py +0 -0
- {lambda_erp-1.4.33 → lambda_erp-1.4.34}/terraform/README.md +0 -0
|
@@ -3195,6 +3195,7 @@ Quotations also have `intro_text`: the opening text (greeting, "Gerne unterbreit
|
|
|
3195
3195
|
|
|
3196
3196
|
### Deductions on a line
|
|
3197
3197
|
To take an amount off one position (already invoiced, credited from a previous project, a project rebate), keep the position at its full price and put the deduction on that same line: `price_list_rate` = full price per unit, `discount_amount` = deduction per unit, `discount_label` = its printed text (e.g. "Abzüglich bereits verrechnet (Rechnung SINV-0003)"). The line then counts the net (rate = price_list_rate − discount_amount); the PDF prints the full price and the deduction as an italic sub-line. A deduction can't exceed its position's price, so a line never goes negative and keeps its tax rate. Sending only `rate` with a new deduction takes that rate as the full price. To remove one, set `discount_amount` 0, `discount_label` empty and `rate` back to the full price. The deduction is carried into the sales order and invoice. There are no negative lines: a deduction always belongs to a position.
|
|
3198
|
+
A deduction can also be a percentage of the full price: `discount_percentage` (e.g. 15) with `price_list_rate` and `discount_label`; the ERP computes `discount_amount` and the rate. 100 % is free of charge (rate 0, the full price is printed with the deduction below). Name the reason in `discount_label`, starting with one of the standard reasons so everyone uses the same words: "Rabatt", "Gratis", "Kulanz", "Testrabatt", optionally followed by " – " and details (e.g. "Testrabatt – Erstbestellung"). Ask which reason applies when the user doesn't say; don't invent one. A line with a deduction text keeps the agreed price; pricing rules no longer change it.
|
|
3198
3199
|
|
|
3199
3200
|
### Internal notes (never printed)
|
|
3200
3201
|
`remarks` is PRINTED and goes to the customer or supplier. Internal team remarks ("customer disputes line 2", "@Anna please check the price") belong in an internal note on the record instead: `add_record_note` (doctype = the record type slug, e.g. `sales-invoice` or `customer`; record_id = its name), read with `list_record_notes`, change with `update_record_note` / `delete_record_note`. Every document and master type supports them; they appear in the record's "Internal notes" card and never change the record. To notify a colleague, first `search_mention_users` and put their exact `mention_text` in the body. Never put internal remarks into `remarks`, and never copy internal notes into customer-facing text.
|
|
@@ -249,6 +249,50 @@ def find_item_price(item_code, price_list, qty=0, party_field=None, party=None,
|
|
|
249
249
|
return best
|
|
250
250
|
|
|
251
251
|
|
|
252
|
+
# Documents whose stock lines need a warehouse; an invoice only when it moves stock.
|
|
253
|
+
WAREHOUSE_DOCUMENTS = {"Quotation", "Sales Order", "Delivery Note", "Purchase Order", "Purchase Receipt"}
|
|
254
|
+
STOCK_INVOICES = {"Sales Invoice", "Purchase Invoice", "POS Invoice"}
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
def default_warehouse(item_code, company):
|
|
258
|
+
"""Where a stock line of this item goes when nobody named a warehouse: the
|
|
259
|
+
item's default warehouse (if it belongs to the company), else the company's
|
|
260
|
+
only warehouse. Group, disabled and consignment warehouses never count.
|
|
261
|
+
None when it is not clear; then the line keeps asking for one."""
|
|
262
|
+
db = get_db()
|
|
263
|
+
columns = db._get_table_columns("Warehouse")
|
|
264
|
+
usable = ["COALESCE(is_group, 0) = 0", "COALESCE(disabled, 0) = 0"]
|
|
265
|
+
if "consignment_customer" in columns:
|
|
266
|
+
usable.append("COALESCE(consignment_customer, '') = ''")
|
|
267
|
+
preferred = db.get_value("Item", item_code, "default_warehouse") if "default_warehouse" in db._get_table_columns("Item") else None
|
|
268
|
+
if preferred:
|
|
269
|
+
where, params = ["name = ?", *usable], [preferred]
|
|
270
|
+
if company:
|
|
271
|
+
where.append("company = ?")
|
|
272
|
+
params.append(company)
|
|
273
|
+
rows = db.sql('SELECT name FROM "Warehouse" WHERE ' + " AND ".join(where), params)
|
|
274
|
+
if rows:
|
|
275
|
+
return preferred
|
|
276
|
+
if not company:
|
|
277
|
+
return None
|
|
278
|
+
rows = db.sql('SELECT name FROM "Warehouse" WHERE company = ? AND ' + " AND ".join(usable) + " LIMIT 2", [company])
|
|
279
|
+
return rows[0]["name"] if len(rows) == 1 else None
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
def _set_default_warehouse(doc, item, item_code):
|
|
283
|
+
if item.get("warehouse") or doc.docstatus != 0:
|
|
284
|
+
return
|
|
285
|
+
if doc.DOCTYPE not in WAREHOUSE_DOCUMENTS and not (doc.DOCTYPE in STOCK_INVOICES and flt(doc.get("update_stock"))):
|
|
286
|
+
return
|
|
287
|
+
if "warehouse" not in get_db()._get_table_columns(doc.CHILD_TABLES["items"][0]):
|
|
288
|
+
return
|
|
289
|
+
if not get_db().get_value("Item", item_code, "is_stock_item"):
|
|
290
|
+
return
|
|
291
|
+
chosen = default_warehouse(item_code, doc.get("company"))
|
|
292
|
+
if chosen:
|
|
293
|
+
item["warehouse"] = chosen
|
|
294
|
+
|
|
295
|
+
|
|
252
296
|
def set_item_defaults(doc, party_type=None, party_field=None, *, set_description=True):
|
|
253
297
|
"""Fill item names, units and unsupplied rates from master data.
|
|
254
298
|
|
|
@@ -278,6 +322,7 @@ def set_item_defaults(doc, party_type=None, party_field=None, *, set_description
|
|
|
278
322
|
)
|
|
279
323
|
if not item_data:
|
|
280
324
|
continue
|
|
325
|
+
_set_default_warehouse(doc, item, item_code)
|
|
281
326
|
|
|
282
327
|
# A line entered in one of the item's further units (2 Karton) is
|
|
283
328
|
# converted to the stock unit here, before it is priced; see units.py.
|
|
@@ -95,9 +95,17 @@ class TaxCalculator:
|
|
|
95
95
|
item['rate'] = 0.0
|
|
96
96
|
elif flt(item.get("discount_percentage")) == 100:
|
|
97
97
|
item["rate"] = 0.0
|
|
98
|
+
# Free of charge: the whole price is the deduction, so a labelled
|
|
99
|
+
# line prints the full price and "Gratis" below it.
|
|
100
|
+
if item.get("price_list_rate") not in (None, ""):
|
|
101
|
+
item["discount_amount"] = money(dec(item["price_list_rate"]), places)
|
|
98
102
|
elif item.get("price_list_rate") is not None and (flt(item['price_list_rate']) != 0 or item.get('rate') is None):
|
|
99
103
|
list_rate, percent = dec(item["price_list_rate"]), dec(item.get("discount_percentage"))
|
|
100
|
-
if item.get("rate") is None
|
|
104
|
+
if item.get("rate") is None and percent <= 0 and flt(item.get("discount_amount")) > 0:
|
|
105
|
+
# Full price and a deduction per unit, without a rate: the
|
|
106
|
+
# deduction comes off (it used to be dropped).
|
|
107
|
+
item["rate"] = float(list_rate - dec(item["discount_amount"]))
|
|
108
|
+
elif item.get("rate") is None or percent > 0:
|
|
101
109
|
item["rate"] = money(list_rate * (1 - percent / HUNDRED), places)
|
|
102
110
|
item["discount_amount"] = money(list_rate * percent / HUNDRED, places)
|
|
103
111
|
elif item.get("discount_amount"):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|