account records balancer added
This commit is contained in:
@@ -6,7 +6,6 @@ from databases.sql_models.account.account import (
|
||||
AccountCodes,
|
||||
AccountDetail,
|
||||
AccountMaster,
|
||||
AccountRecordDecisionPaymentClosed,
|
||||
AccountRecordExchanges,
|
||||
)
|
||||
from databases.sql_models.building.budget import (
|
||||
@@ -108,7 +107,6 @@ __all__ = [
|
||||
"AccountCodes",
|
||||
"AccountDetail",
|
||||
"AccountMaster",
|
||||
"AccountRecordDecisionPaymentClosed",
|
||||
"AccountRecordExchanges",
|
||||
"BuildIbans",
|
||||
"BuildIbanDescription",
|
||||
|
||||
@@ -412,6 +412,9 @@ class AccountRecords(CrudCollection):
|
||||
process_comment: Mapped[str] = mapped_column(
|
||||
String, nullable=False, comment="Transaction Record Comment"
|
||||
)
|
||||
process_garbage: Mapped[str] = mapped_column(
|
||||
String, nullable=True, comment="Transaction Record Garbage"
|
||||
)
|
||||
bank_reference_code: Mapped[str] = mapped_column(
|
||||
String, nullable=False, comment="Bank Reference Code"
|
||||
)
|
||||
@@ -465,8 +468,6 @@ class AccountRecords(CrudCollection):
|
||||
String, nullable=True, comment="Send Company UU ID"
|
||||
)
|
||||
|
||||
customer_id: Mapped[int] = mapped_column(ForeignKey("people.id"), nullable=True)
|
||||
customer_uu_id = mapped_column(String, nullable=True, comment="Customer UU ID")
|
||||
send_person_id: Mapped[int] = mapped_column(ForeignKey("people.id"), nullable=True)
|
||||
send_person_uu_id: Mapped[str] = mapped_column(
|
||||
String, nullable=True, comment="Send Person UU ID"
|
||||
@@ -477,7 +478,20 @@ class AccountRecords(CrudCollection):
|
||||
approving_accounting_person_uu_id: Mapped[str] = mapped_column(
|
||||
String, nullable=True, comment="Approving Accounting Person UU ID"
|
||||
)
|
||||
# build_id: Mapped[int] = mapped_column(ForeignKey("build.id"), nullable=True)
|
||||
|
||||
living_space_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("build_living_space.id"), nullable=True
|
||||
)
|
||||
living_space_uu_id: Mapped[str] = mapped_column(
|
||||
String, nullable=True, comment="Living Space UU ID"
|
||||
)
|
||||
customer_id: Mapped[int] = mapped_column(ForeignKey("people.id"), nullable=True)
|
||||
customer_uu_id = mapped_column(String, nullable=True, comment="Customer UU ID")
|
||||
|
||||
build_id: Mapped[int] = mapped_column(ForeignKey("build.id"), nullable=True)
|
||||
build_uu_id: Mapped[str] = mapped_column(
|
||||
String, nullable=True, comment="Build UU ID"
|
||||
)
|
||||
build_parts_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("build_parts.id"), nullable=True
|
||||
)
|
||||
@@ -652,54 +666,55 @@ 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 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):
|
||||
|
||||
@@ -81,7 +81,9 @@ class BuildIbanDescription(CrudCollection):
|
||||
company_uu_id: Mapped[str] = mapped_column(
|
||||
String, nullable=True, comment="Company UUID"
|
||||
)
|
||||
build_parts_id: Mapped[int] = mapped_column(ForeignKey("build_parts.id"), nullable=True)
|
||||
build_parts_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("build_parts.id"), nullable=True
|
||||
)
|
||||
build_parts_uu_id: Mapped[str] = mapped_column(
|
||||
String, nullable=True, comment="Build Parts UUID"
|
||||
)
|
||||
|
||||
@@ -865,7 +865,13 @@ class BuildDecisionBookPayments(CrudCollection):
|
||||
comment="Build Decision Book Item ID",
|
||||
)
|
||||
build_decision_book_item_uu_id: Mapped[str] = mapped_column(
|
||||
String, nullable=True, comment="Decision Book Item UUID"
|
||||
String, nullable=False, comment="Decision Book Item UUID"
|
||||
)
|
||||
build_parts_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("build_parts.id"), nullable=False
|
||||
)
|
||||
build_parts_uu_id: Mapped[str] = mapped_column(
|
||||
String, nullable=False, comment="Build Part UUID"
|
||||
)
|
||||
decision_book_project_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("build_decision_book_projects.id"),
|
||||
@@ -875,12 +881,11 @@ class BuildDecisionBookPayments(CrudCollection):
|
||||
decision_book_project_uu_id: Mapped[str] = mapped_column(
|
||||
String, nullable=True, comment="Decision Book Project UUID"
|
||||
)
|
||||
|
||||
build_parts_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("build_parts.id"), nullable=False
|
||||
account_records_id: Mapped[int] = mapped_column(
|
||||
ForeignKey("account_records.id"), nullable=True
|
||||
)
|
||||
build_parts_uu_id: Mapped[str] = mapped_column(
|
||||
String, nullable=False, comment="Build Part UUID"
|
||||
account_records_uu_id: Mapped[str] = mapped_column(
|
||||
String, nullable=True, comment="Account Record UU ID"
|
||||
)
|
||||
|
||||
# budget_records_id: Mapped[int] = mapped_column(ForeignKey("account_records.id"), nullable=True)
|
||||
@@ -918,8 +923,11 @@ class BuildDecisionBookPayments(CrudCollection):
|
||||
build_parts_id,
|
||||
payment_plan_time_periods,
|
||||
process_date,
|
||||
payment_types_id,
|
||||
account_records_id,
|
||||
unique=True,
|
||||
),
|
||||
Index("build_decision_book_payments_detail_ndx_01", account_records_id),
|
||||
{"comment": "Payment Details of Decision Book Payments"},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user