lambda-erp 0.6.6__tar.gz → 0.6.7__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-0.6.6 → lambda_erp-0.6.7}/PKG-INFO +1 -1
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/utils.py +10 -3
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/pyproject.toml +1 -1
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/.gitignore +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/LICENSE +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/README.md +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/__init__.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/attachments.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/auth.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/bootstrap.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/chat.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/demo_limits.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/deps.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/errors.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/main.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/oauth.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/pdf.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/providers.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/remarks_md.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/routers/__init__.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/routers/accounting.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/routers/admin.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/routers/analytics.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/routers/bank_reconciliation.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/routers/chat_api.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/routers/documents.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/routers/masters.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/routers/proposals.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/routers/reports.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/routers/setup.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/services.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/templates/document.html +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/api/templates/proposal.html +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/docs/agents/README.md +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/frontend/LICENSE +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/frontend/README.md +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/frontend/src/api/client.ts +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/__init__.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/__init__.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/bank_transaction.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/budget.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/chart_of_accounts.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/general_ledger.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/journal_entry.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/payment_entry.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/pos_invoice.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/purchase_invoice.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/revaluation.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/sales_invoice.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/setup/__init__.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/setup/engine.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/setup/pack.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/setup/packs/__init__.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/setup/packs/ch.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/setup/packs/de_common.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/setup/packs/de_skr03.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/setup/packs/de_skr04.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/setup/packs/generic.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/setup/profiles.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/setup/spine.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/accounting/subscription.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/buying/__init__.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/buying/purchase_order.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/controllers/__init__.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/controllers/currency.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/controllers/defaults.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/controllers/pricing_rule.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/controllers/taxes_and_totals.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/database.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/exceptions.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/hooks.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/model.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/selling/__init__.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/selling/proposal.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/selling/quotation.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/selling/sales_order.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/simulation.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/stock/__init__.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/stock/delivery_note.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/stock/purchase_receipt.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/stock/stock_entry.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/lambda_erp/stock/stock_ledger.py +0 -0
- {lambda_erp-0.6.6 → lambda_erp-0.6.7}/terraform/README.md +0 -0
|
@@ -6,7 +6,7 @@ throughout the the reference implementation business logic.
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
import math
|
|
9
|
-
from datetime import date, datetime, timedelta
|
|
9
|
+
from datetime import date, datetime, timedelta, timezone
|
|
10
10
|
from decimal import Decimal, ROUND_HALF_UP
|
|
11
11
|
|
|
12
12
|
def flt(value, precision=None):
|
|
@@ -54,8 +54,15 @@ def nowdate():
|
|
|
54
54
|
return date.today().isoformat()
|
|
55
55
|
|
|
56
56
|
def now():
|
|
57
|
-
"""Return current
|
|
58
|
-
|
|
57
|
+
"""Return the current instant as a timezone-aware UTC ISO string
|
|
58
|
+
(e.g. "2026-07-29T09:57:00.123456+00:00").
|
|
59
|
+
|
|
60
|
+
The offset is deliberate: a naive isoformat() (no zone) is ambiguous, and a
|
|
61
|
+
client parsing it (JS `new Date(...)`) reads it as *browser-local*, so a
|
|
62
|
+
timestamp stamped on a UTC server renders shifted by the viewer's UTC
|
|
63
|
+
offset. Stamping the zone makes every stored timestamp (creation, modified,
|
|
64
|
+
occurred_at, …) an unambiguous instant that round-trips correctly."""
|
|
65
|
+
return datetime.now(timezone.utc).isoformat()
|
|
59
66
|
|
|
60
67
|
def add_days(dt, days):
|
|
61
68
|
"""Add days to a date."""
|
|
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
|