project budget updated

This commit is contained in:
2024-11-20 12:04:02 +03:00
parent 48682b1914
commit 0b3e0c299c
26 changed files with 742 additions and 310 deletions

View File

@@ -650,3 +650,99 @@ class AccountRecords(CrudCollection):
# )
# )
# print("is all dues_type", payment_dict["dues_type"], paid_value)
class AccountRecordDecisionPaymentClosed(CrudCollection):
__tablename__ = "account_record_decision_payment_closed"
__exclude__fields__ = []
arc_currency: Mapped[str] = mapped_column(
String(5), nullable=False, comment="Unit of Currency"
)
arc_processing_time: Mapped[TIMESTAMP] = mapped_column(
TIMESTAMP, nullable=False, comment="Processing Time"
)
arc_currency_value: Mapped[float] = mapped_column(
Numeric(20, 6), nullable=False, comment="Currency Value"
)
decision_book_budgets_id: Mapped[int] = mapped_column(
ForeignKey("decision_book_budgets.id"), nullable=True
)
decision_book_budgets_uu_id: Mapped[str] = mapped_column(
String, nullable=True, comment="Budget UUID"
)
build_decision_book_payment_id: Mapped[int] = mapped_column(
ForeignKey("build_decision_book_payments.id")
)
build_decision_book_payment_uu_id: Mapped[str] = mapped_column(
String, nullable=True, comment="Build Decision Book Payment UU ID"
)
account_records_id: Mapped[int] = mapped_column(ForeignKey("account_records.id"))
account_records_uu_id: Mapped[str] = mapped_column(
String, nullable=True, comment="Account Record UU ID"
)
__table_args__ = (
Index(
"_account_record_decision_payment_closed_ndx_00",
account_records_id,
build_decision_book_payment_id,
arc_processing_time,
),
Index(
"_account_record_decision_payment_closed_ndx_01",
build_decision_book_payment_id,
account_records_id,
arc_processing_time,
),
{"comment": "Account Record Decision Payment Closed Information"},
)
class AccountRecordExchanges(CrudCollection):
__tablename__ = "account_record_exchanges"
__exclude__fields__ = []
are_currency: Mapped[str] = mapped_column(
String(5), nullable=False, comment="Unit of Currency"
)
are_exchange_rate: Mapped[float] = mapped_column(
Numeric(18, 6), nullable=False, server_default="1"
)
usd_exchange_rate_value: Mapped[float] = mapped_column(
Numeric(18, 6),
nullable=True,
server_default="0",
comment="It will be written by multiplying the usd exchange rate with the current value result.",
)
eur_exchange_rate_value: Mapped[float] = mapped_column(
Numeric(18, 6),
nullable=True,
server_default="0",
comment="It will be written by multiplying the eur exchange rate with the current value result.",
)
gbp_exchange_rate_value: Mapped[float] = mapped_column(
Numeric(18, 6),
nullable=True,
server_default="0",
comment="It will be written by multiplying the gpd exchange rate with the current value result.",
)
cny_exchange_rate_value: Mapped[float] = mapped_column(
Numeric(18, 6),
nullable=True,
server_default="0",
comment="It will be written by multiplying the cny exchange rate with the current value result.",
)
account_records_id: Mapped[int] = mapped_column(ForeignKey("account_records.id"))
account_records_uu_id: Mapped[str] = mapped_column(
String, nullable=True, comment="Account Record UU ID"
)
__table_args__ = (
Index("_account_record_exchanges_ndx_00", account_records_id),
{"comment": "Account Record Exchanges Information"},
)