feat: enable automatic type annotations (#38452) (cherry picked from commit 63313eef6f6618f52c7e6194f7abd345cf920b15) Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
parent
7f4d2b707a
commit
5e6a4d257e
@ -23,6 +23,65 @@ class InvalidAccountMergeError(frappe.ValidationError):
|
||||
|
||||
|
||||
class Account(NestedSet):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account_currency: DF.Link | None
|
||||
account_name: DF.Data
|
||||
account_number: DF.Data | None
|
||||
account_type: DF.Literal[
|
||||
"",
|
||||
"Accumulated Depreciation",
|
||||
"Asset Received But Not Billed",
|
||||
"Bank",
|
||||
"Cash",
|
||||
"Chargeable",
|
||||
"Capital Work in Progress",
|
||||
"Cost of Goods Sold",
|
||||
"Current Asset",
|
||||
"Current Liability",
|
||||
"Depreciation",
|
||||
"Direct Expense",
|
||||
"Direct Income",
|
||||
"Equity",
|
||||
"Expense Account",
|
||||
"Expenses Included In Asset Valuation",
|
||||
"Expenses Included In Valuation",
|
||||
"Fixed Asset",
|
||||
"Income Account",
|
||||
"Indirect Expense",
|
||||
"Indirect Income",
|
||||
"Liability",
|
||||
"Payable",
|
||||
"Receivable",
|
||||
"Round Off",
|
||||
"Stock",
|
||||
"Stock Adjustment",
|
||||
"Stock Received But Not Billed",
|
||||
"Service Received But Not Billed",
|
||||
"Tax",
|
||||
"Temporary",
|
||||
]
|
||||
balance_must_be: DF.Literal["", "Debit", "Credit"]
|
||||
company: DF.Link
|
||||
disabled: DF.Check
|
||||
freeze_account: DF.Literal["No", "Yes"]
|
||||
include_in_gross: DF.Check
|
||||
is_group: DF.Check
|
||||
lft: DF.Int
|
||||
old_parent: DF.Data | None
|
||||
parent_account: DF.Link
|
||||
report_type: DF.Literal["", "Balance Sheet", "Profit and Loss"]
|
||||
rgt: DF.Int
|
||||
root_type: DF.Literal["", "Asset", "Liability", "Income", "Expense", "Equity"]
|
||||
tax_rate: DF.Float
|
||||
# end: auto-generated types
|
||||
|
||||
nsm_parent_field = "parent_account"
|
||||
|
||||
def on_update(self):
|
||||
|
@ -11,6 +11,29 @@ from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
|
||||
|
||||
|
||||
class AccountClosingBalance(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account: DF.Link | None
|
||||
account_currency: DF.Link | None
|
||||
closing_date: DF.Date | None
|
||||
company: DF.Link | None
|
||||
cost_center: DF.Link | None
|
||||
credit: DF.Currency
|
||||
credit_in_account_currency: DF.Currency
|
||||
debit: DF.Currency
|
||||
debit_in_account_currency: DF.Currency
|
||||
finance_book: DF.Link | None
|
||||
is_period_closing_voucher_entry: DF.Check
|
||||
period_closing_voucher: DF.Link | None
|
||||
project: DF.Link | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
||||
|
||||
|
@ -13,6 +13,25 @@ from frappe.utils import cstr
|
||||
|
||||
|
||||
class AccountingDimension(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.accounting_dimension_detail.accounting_dimension_detail import (
|
||||
AccountingDimensionDetail,
|
||||
)
|
||||
|
||||
dimension_defaults: DF.Table[AccountingDimensionDetail]
|
||||
disabled: DF.Check
|
||||
document_type: DF.Link
|
||||
fieldname: DF.Data | None
|
||||
label: DF.Data | None
|
||||
# end: auto-generated types
|
||||
|
||||
def before_insert(self):
|
||||
self.set_fieldname_and_label()
|
||||
|
||||
|
@ -7,4 +7,24 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class AccountingDimensionDetail(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
automatically_post_balancing_accounting_entry: DF.Check
|
||||
company: DF.Link | None
|
||||
default_dimension: DF.DynamicLink | None
|
||||
mandatory_for_bs: DF.Check
|
||||
mandatory_for_pl: DF.Check
|
||||
offsetting_account: DF.Link | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
reference_document: DF.Link | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -8,6 +8,28 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class AccountingDimensionFilter(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.allowed_dimension.allowed_dimension import AllowedDimension
|
||||
from erpnext.accounts.doctype.applicable_on_account.applicable_on_account import (
|
||||
ApplicableOnAccount,
|
||||
)
|
||||
|
||||
accounting_dimension: DF.Literal
|
||||
accounts: DF.Table[ApplicableOnAccount]
|
||||
allow_or_restrict: DF.Literal["Allow", "Restrict"]
|
||||
apply_restriction_on_values: DF.Check
|
||||
company: DF.Link
|
||||
dimensions: DF.Table[AllowedDimension]
|
||||
disabled: DF.Check
|
||||
# end: auto-generated types
|
||||
|
||||
def before_save(self):
|
||||
# If restriction is not applied on values, then remove all the dimensions and set allow_or_restrict to Restrict
|
||||
if not self.apply_restriction_on_values:
|
||||
|
@ -16,6 +16,23 @@ class ClosedAccountingPeriod(frappe.ValidationError):
|
||||
|
||||
|
||||
class AccountingPeriod(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.closed_document.closed_document import ClosedDocument
|
||||
|
||||
closed_documents: DF.Table[ClosedDocument]
|
||||
company: DF.Link
|
||||
end_date: DF.Date
|
||||
period_name: DF.Data
|
||||
start_date: DF.Date
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
self.validate_overlap()
|
||||
|
||||
|
@ -14,6 +14,52 @@ from erpnext.stock.utils import check_pending_reposting
|
||||
|
||||
|
||||
class AccountsSettings(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
acc_frozen_upto: DF.Date | None
|
||||
add_taxes_from_item_tax_template: DF.Check
|
||||
allow_multi_currency_invoices_against_single_party_account: DF.Check
|
||||
allow_stale: DF.Check
|
||||
auto_reconcile_payments: DF.Check
|
||||
automatically_fetch_payment_terms: DF.Check
|
||||
automatically_process_deferred_accounting_entry: DF.Check
|
||||
book_asset_depreciation_entry_automatically: DF.Check
|
||||
book_deferred_entries_based_on: DF.Literal["Days", "Months"]
|
||||
book_deferred_entries_via_journal_entry: DF.Check
|
||||
book_tax_discount_loss: DF.Check
|
||||
check_supplier_invoice_uniqueness: DF.Check
|
||||
credit_controller: DF.Link | None
|
||||
delete_linked_ledger_entries: DF.Check
|
||||
determine_address_tax_category_from: DF.Literal["Billing Address", "Shipping Address"]
|
||||
enable_common_party_accounting: DF.Check
|
||||
enable_fuzzy_matching: DF.Check
|
||||
enable_party_matching: DF.Check
|
||||
frozen_accounts_modifier: DF.Link | None
|
||||
general_ledger_remarks_length: DF.Int
|
||||
ignore_account_closing_balance: DF.Check
|
||||
make_payment_via_journal_entry: DF.Check
|
||||
merge_similar_account_heads: DF.Check
|
||||
over_billing_allowance: DF.Currency
|
||||
post_change_gl_entries: DF.Check
|
||||
receivable_payable_remarks_length: DF.Int
|
||||
role_allowed_to_over_bill: DF.Link | None
|
||||
round_row_wise_tax: DF.Check
|
||||
show_balance_in_coa: DF.Check
|
||||
show_inclusive_tax_in_print: DF.Check
|
||||
show_payment_schedule_in_print: DF.Check
|
||||
show_taxes_as_table_in_print: DF.Check
|
||||
stale_days: DF.Int
|
||||
submit_journal_entries: DF.Check
|
||||
unlink_advance_payment_on_cancelation_of_order: DF.Check
|
||||
unlink_payment_on_cancellation_of_invoice: DF.Check
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
old_doc = self.get_doc_before_save()
|
||||
clear_cache = False
|
||||
|
@ -6,4 +6,22 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class AdvanceTax(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account_head: DF.Link | None
|
||||
allocated_amount: DF.Currency
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
reference_detail: DF.Data | None
|
||||
reference_name: DF.DynamicLink | None
|
||||
reference_type: DF.Link | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -7,4 +7,33 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class AdvanceTaxesandCharges(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account_head: DF.Link
|
||||
add_deduct_tax: DF.Literal["Add", "Deduct"]
|
||||
allocated_amount: DF.Currency
|
||||
base_tax_amount: DF.Currency
|
||||
base_total: DF.Currency
|
||||
charge_type: DF.Literal[
|
||||
"", "Actual", "On Paid Amount", "On Previous Row Amount", "On Previous Row Total"
|
||||
]
|
||||
cost_center: DF.Link | None
|
||||
currency: DF.Link | None
|
||||
description: DF.SmallText
|
||||
included_in_paid_amount: DF.Check
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
rate: DF.Float
|
||||
row_id: DF.Data | None
|
||||
tax_amount: DF.Currency
|
||||
total: DF.Currency
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -7,4 +7,19 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class AllowedDimension(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
accounting_dimension: DF.Link | None
|
||||
dimension_value: DF.DynamicLink | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,18 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class AllowedToTransactWith(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
company: DF.Link
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -7,4 +7,19 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class ApplicableOnAccount(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
applicable_on_account: DF.Link
|
||||
is_mandatory: DF.Check
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -10,6 +10,25 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class Bank(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.bank_transaction_mapping.bank_transaction_mapping import (
|
||||
BankTransactionMapping,
|
||||
)
|
||||
|
||||
bank_name: DF.Data
|
||||
bank_transaction_mapping: DF.Table[BankTransactionMapping]
|
||||
plaid_access_token: DF.Data | None
|
||||
swift_number: DF.Data | None
|
||||
website: DF.Data | None
|
||||
# end: auto-generated types
|
||||
|
||||
def onload(self):
|
||||
"""Load address and contacts in `__onload`"""
|
||||
load_address_and_contact(self)
|
||||
|
@ -12,6 +12,33 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class BankAccount(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account: DF.Link | None
|
||||
account_name: DF.Data
|
||||
account_subtype: DF.Link | None
|
||||
account_type: DF.Link | None
|
||||
bank: DF.Link
|
||||
bank_account_no: DF.Data | None
|
||||
branch_code: DF.Data | None
|
||||
company: DF.Link | None
|
||||
disabled: DF.Check
|
||||
iban: DF.Data | None
|
||||
integration_id: DF.Data | None
|
||||
is_company_account: DF.Check
|
||||
is_default: DF.Check
|
||||
last_integration_date: DF.Date | None
|
||||
mask: DF.Data | None
|
||||
party: DF.DynamicLink | None
|
||||
party_type: DF.Link | None
|
||||
# end: auto-generated types
|
||||
|
||||
def onload(self):
|
||||
"""Load address and contacts in `__onload`"""
|
||||
load_address_and_contact(self)
|
||||
|
@ -6,4 +6,15 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class BankAccountSubtype(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account_subtype: DF.Data | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -7,4 +7,15 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class BankAccountType(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account_type: DF.Data | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -13,6 +13,28 @@ form_grid_templates = {"journal_entries": "templates/form_grid/bank_reconciliati
|
||||
|
||||
|
||||
class BankClearance(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.bank_clearance_detail.bank_clearance_detail import (
|
||||
BankClearanceDetail,
|
||||
)
|
||||
|
||||
account: DF.Link
|
||||
account_currency: DF.Link | None
|
||||
bank_account: DF.Link | None
|
||||
from_date: DF.Date
|
||||
include_pos_transactions: DF.Check
|
||||
include_reconciled_entries: DF.Check
|
||||
payment_entries: DF.Table[BankClearanceDetail]
|
||||
to_date: DF.Date
|
||||
# end: auto-generated types
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_payment_entries(self):
|
||||
if not (self.from_date and self.to_date):
|
||||
|
@ -6,4 +6,25 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class BankClearanceDetail(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
against_account: DF.Data | None
|
||||
amount: DF.Data | None
|
||||
cheque_date: DF.Date | None
|
||||
cheque_number: DF.Data | None
|
||||
clearance_date: DF.Date | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
payment_document: DF.Link | None
|
||||
payment_entry: DF.DynamicLink | None
|
||||
posting_date: DF.Date | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -8,6 +8,40 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class BankGuarantee(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account: DF.Link | None
|
||||
amended_from: DF.Link | None
|
||||
amount: DF.Currency
|
||||
bank: DF.Link | None
|
||||
bank_account: DF.Link | None
|
||||
bank_account_no: DF.Data | None
|
||||
bank_guarantee_number: DF.Data | None
|
||||
bg_type: DF.Literal["", "Receiving", "Providing"]
|
||||
branch_code: DF.Data | None
|
||||
charges: DF.Currency
|
||||
customer: DF.Link | None
|
||||
end_date: DF.Date | None
|
||||
fixed_deposit_number: DF.Data | None
|
||||
iban: DF.Data | None
|
||||
margin_money: DF.Currency
|
||||
more_information: DF.TextEditor | None
|
||||
name_of_beneficiary: DF.Data | None
|
||||
project: DF.Link | None
|
||||
reference_docname: DF.DynamicLink | None
|
||||
reference_doctype: DF.Link | None
|
||||
start_date: DF.Date
|
||||
supplier: DF.Link | None
|
||||
swift_number: DF.Data | None
|
||||
validity: DF.Int
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
if not (self.customer or self.supplier):
|
||||
frappe.throw(_("Select the customer or supplier."))
|
||||
|
@ -21,6 +21,26 @@ from erpnext.accounts.utils import get_account_currency, get_balance_on
|
||||
|
||||
|
||||
class BankReconciliationTool(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account_currency: DF.Link | None
|
||||
account_opening_balance: DF.Currency
|
||||
bank_account: DF.Link | None
|
||||
bank_statement_closing_balance: DF.Currency
|
||||
bank_statement_from_date: DF.Date | None
|
||||
bank_statement_to_date: DF.Date | None
|
||||
company: DF.Link | None
|
||||
filter_by_reference_date: DF.Check
|
||||
from_reference_date: DF.Date | None
|
||||
to_reference_date: DF.Date | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
||||
|
||||
|
@ -20,6 +20,30 @@ INVALID_VALUES = ("", None)
|
||||
|
||||
|
||||
class BankStatementImport(DataImport):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
bank: DF.Link | None
|
||||
bank_account: DF.Link
|
||||
company: DF.Link
|
||||
google_sheets_url: DF.Data | None
|
||||
import_file: DF.Attach | None
|
||||
import_type: DF.Literal["", "Insert New Records", "Update Existing Records"]
|
||||
mute_emails: DF.Check
|
||||
reference_doctype: DF.Link
|
||||
show_failed_logs: DF.Check
|
||||
statement_import_log: DF.Code | None
|
||||
status: DF.Literal["Pending", "Success", "Partial Success", "Error"]
|
||||
submit_after_import: DF.Check
|
||||
template_options: DF.Code | None
|
||||
template_warnings: DF.Code | None
|
||||
# end: auto-generated types
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(BankStatementImport, self).__init__(*args, **kwargs)
|
||||
|
||||
|
@ -9,6 +9,41 @@ from erpnext.controllers.status_updater import StatusUpdater
|
||||
|
||||
|
||||
class BankTransaction(StatusUpdater):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.bank_transaction_payments.bank_transaction_payments import (
|
||||
BankTransactionPayments,
|
||||
)
|
||||
|
||||
allocated_amount: DF.Currency
|
||||
amended_from: DF.Link | None
|
||||
bank_account: DF.Link | None
|
||||
bank_party_account_number: DF.Data | None
|
||||
bank_party_iban: DF.Data | None
|
||||
bank_party_name: DF.Data | None
|
||||
company: DF.Link | None
|
||||
currency: DF.Link | None
|
||||
date: DF.Date | None
|
||||
deposit: DF.Currency
|
||||
description: DF.SmallText | None
|
||||
naming_series: DF.Literal["ACC-BTN-.YYYY.-"]
|
||||
party: DF.DynamicLink | None
|
||||
party_type: DF.Link | None
|
||||
payment_entries: DF.Table[BankTransactionPayments]
|
||||
reference_number: DF.Data | None
|
||||
status: DF.Literal["", "Pending", "Settled", "Unreconciled", "Reconciled", "Cancelled"]
|
||||
transaction_id: DF.Data | None
|
||||
transaction_type: DF.Data | None
|
||||
unallocated_amount: DF.Currency
|
||||
withdrawal: DF.Currency
|
||||
# end: auto-generated types
|
||||
|
||||
def before_validate(self):
|
||||
self.update_allocated_amount()
|
||||
|
||||
|
@ -6,4 +6,19 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class BankTransactionMapping(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
bank_transaction_field: DF.Literal
|
||||
file_field: DF.Data
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,21 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class BankTransactionPayments(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
allocated_amount: DF.Currency
|
||||
clearance_date: DF.Date | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
payment_document: DF.Link
|
||||
payment_entry: DF.DynamicLink
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -22,6 +22,36 @@ class DuplicateBudgetError(frappe.ValidationError):
|
||||
|
||||
|
||||
class Budget(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.budget_account.budget_account import BudgetAccount
|
||||
|
||||
accounts: DF.Table[BudgetAccount]
|
||||
action_if_accumulated_monthly_budget_exceeded: DF.Literal["", "Stop", "Warn", "Ignore"]
|
||||
action_if_accumulated_monthly_budget_exceeded_on_mr: DF.Literal["", "Stop", "Warn", "Ignore"]
|
||||
action_if_accumulated_monthly_budget_exceeded_on_po: DF.Literal["", "Stop", "Warn", "Ignore"]
|
||||
action_if_annual_budget_exceeded: DF.Literal["", "Stop", "Warn", "Ignore"]
|
||||
action_if_annual_budget_exceeded_on_mr: DF.Literal["", "Stop", "Warn", "Ignore"]
|
||||
action_if_annual_budget_exceeded_on_po: DF.Literal["", "Stop", "Warn", "Ignore"]
|
||||
amended_from: DF.Link | None
|
||||
applicable_on_booking_actual_expenses: DF.Check
|
||||
applicable_on_material_request: DF.Check
|
||||
applicable_on_purchase_order: DF.Check
|
||||
budget_against: DF.Literal["", "Cost Center", "Project"]
|
||||
company: DF.Link
|
||||
cost_center: DF.Link | None
|
||||
fiscal_year: DF.Link
|
||||
monthly_distribution: DF.Link | None
|
||||
naming_series: DF.Data | None
|
||||
project: DF.Link | None
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
if not self.get(frappe.scrub(self.budget_against)):
|
||||
frappe.throw(_("{0} is mandatory").format(self.budget_against))
|
||||
|
@ -6,4 +6,19 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class BudgetAccount(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account: DF.Link
|
||||
budget_amount: DF.Currency
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,18 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class CampaignItem(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
campaign: DF.Link | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -9,6 +9,32 @@ from frappe.utils import flt
|
||||
|
||||
|
||||
class CashierClosing(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.cashier_closing_payments.cashier_closing_payments import (
|
||||
CashierClosingPayments,
|
||||
)
|
||||
|
||||
amended_from: DF.Link | None
|
||||
custody: DF.Float
|
||||
date: DF.Date | None
|
||||
expense: DF.Float
|
||||
from_time: DF.Time
|
||||
naming_series: DF.Literal["POS-CLO-"]
|
||||
net_amount: DF.Float
|
||||
outstanding_amount: DF.Float
|
||||
payments: DF.Table[CashierClosingPayments]
|
||||
returns: DF.Float
|
||||
time: DF.Time
|
||||
user: DF.Link
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
self.validate_time()
|
||||
|
||||
|
@ -6,4 +6,19 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class CashierClosingPayments(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
amount: DF.Float
|
||||
mode_of_payment: DF.Link
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -24,6 +24,18 @@ from erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts import
|
||||
|
||||
|
||||
class ChartofAccountsImporter(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
company: DF.Link | None
|
||||
import_file: DF.Attach | None
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
if self.import_file:
|
||||
get_coa(
|
||||
|
@ -8,6 +8,41 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class ChequePrintTemplate(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
acc_no_dist_from_left_edge: DF.Float
|
||||
acc_no_dist_from_top_edge: DF.Float
|
||||
acc_pay_dist_from_left_edge: DF.Float
|
||||
acc_pay_dist_from_top_edge: DF.Float
|
||||
amt_in_figures_from_left_edge: DF.Float
|
||||
amt_in_figures_from_top_edge: DF.Float
|
||||
amt_in_word_width: DF.Float
|
||||
amt_in_words_from_left_edge: DF.Float
|
||||
amt_in_words_from_top_edge: DF.Float
|
||||
amt_in_words_line_spacing: DF.Float
|
||||
bank_name: DF.Data
|
||||
cheque_height: DF.Float
|
||||
cheque_size: DF.Literal["", "Regular", "A4"]
|
||||
cheque_width: DF.Float
|
||||
date_dist_from_left_edge: DF.Float
|
||||
date_dist_from_top_edge: DF.Float
|
||||
has_print_format: DF.Check
|
||||
is_account_payable: DF.Check
|
||||
message_to_show: DF.Data | None
|
||||
payer_name_from_left_edge: DF.Float
|
||||
payer_name_from_top_edge: DF.Float
|
||||
scanned_cheque: DF.Attach | None
|
||||
signatory_from_left_edge: DF.Float
|
||||
signatory_from_top_edge: DF.Float
|
||||
starting_position_from_top_edge: DF.Float
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
||||
|
||||
|
@ -6,4 +6,19 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class ClosedDocument(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
closed: DF.Check
|
||||
document_type: DF.Link
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -10,6 +10,25 @@ from erpnext.accounts.utils import validate_field_number
|
||||
|
||||
|
||||
class CostCenter(NestedSet):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
company: DF.Link
|
||||
cost_center_name: DF.Data
|
||||
cost_center_number: DF.Data | None
|
||||
disabled: DF.Check
|
||||
is_group: DF.Check
|
||||
lft: DF.Int
|
||||
old_parent: DF.Link | None
|
||||
parent_cost_center: DF.Link
|
||||
rgt: DF.Int
|
||||
# end: auto-generated types
|
||||
|
||||
nsm_parent_field = "parent_cost_center"
|
||||
|
||||
def autoname(self):
|
||||
|
@ -28,6 +28,25 @@ class InvalidDateError(frappe.ValidationError):
|
||||
|
||||
|
||||
class CostCenterAllocation(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.cost_center_allocation_percentage.cost_center_allocation_percentage import (
|
||||
CostCenterAllocationPercentage,
|
||||
)
|
||||
|
||||
allocation_percentages: DF.Table[CostCenterAllocationPercentage]
|
||||
amended_from: DF.Link | None
|
||||
company: DF.Link
|
||||
main_cost_center: DF.Link
|
||||
valid_from: DF.Date
|
||||
# end: auto-generated types
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(CostCenterAllocation, self).__init__(*args, **kwargs)
|
||||
self._skip_from_date_validation = False
|
||||
|
@ -6,4 +6,19 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class CostCenterAllocationPercentage(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
cost_center: DF.Link
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
percentage: DF.Percent
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -9,6 +9,27 @@ from frappe.utils import strip
|
||||
|
||||
|
||||
class CouponCode(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
amended_from: DF.Link | None
|
||||
coupon_code: DF.Data | None
|
||||
coupon_name: DF.Data
|
||||
coupon_type: DF.Literal["Promotional", "Gift Card"]
|
||||
customer: DF.Link | None
|
||||
description: DF.TextEditor | None
|
||||
maximum_use: DF.Int
|
||||
pricing_rule: DF.Link
|
||||
used: DF.Int
|
||||
valid_from: DF.Date | None
|
||||
valid_upto: DF.Date | None
|
||||
# end: auto-generated types
|
||||
|
||||
def autoname(self):
|
||||
self.coupon_name = strip(self.coupon_name)
|
||||
self.name = self.coupon_name
|
||||
|
@ -9,6 +9,30 @@ from frappe.utils import nowdate
|
||||
|
||||
|
||||
class CurrencyExchangeSettings(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.currency_exchange_settings_details.currency_exchange_settings_details import (
|
||||
CurrencyExchangeSettingsDetails,
|
||||
)
|
||||
from erpnext.accounts.doctype.currency_exchange_settings_result.currency_exchange_settings_result import (
|
||||
CurrencyExchangeSettingsResult,
|
||||
)
|
||||
|
||||
access_key: DF.Data | None
|
||||
api_endpoint: DF.Data
|
||||
disabled: DF.Check
|
||||
req_params: DF.Table[CurrencyExchangeSettingsDetails]
|
||||
result_key: DF.Table[CurrencyExchangeSettingsResult]
|
||||
service_provider: DF.Literal["frankfurter.app", "exchangerate.host", "Custom"]
|
||||
url: DF.Data | None
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
self.set_parameters_and_result()
|
||||
if frappe.flags.in_test or frappe.flags.in_install or frappe.flags.in_setup_wizard:
|
||||
|
@ -6,4 +6,19 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class CurrencyExchangeSettingsDetails(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
key: DF.Data
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
value: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,18 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class CurrencyExchangeSettingsResult(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
key: DF.Data
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,18 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class CustomerGroupItem(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
customer_group: DF.Link | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,18 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class CustomerItem(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
customer: DF.Link | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -7,4 +7,22 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class DiscountedInvoice(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
customer: DF.Link | None
|
||||
debit_to: DF.Link | None
|
||||
outstanding_amount: DF.Currency
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
posting_date: DF.Date | None
|
||||
sales_invoice: DF.Link
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -22,6 +22,52 @@ from erpnext.controllers.accounts_controller import AccountsController
|
||||
|
||||
|
||||
class Dunning(AccountsController):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.overdue_payment.overdue_payment import OverduePayment
|
||||
|
||||
address_display: DF.SmallText | None
|
||||
amended_from: DF.Link | None
|
||||
base_dunning_amount: DF.Currency
|
||||
body_text: DF.TextEditor | None
|
||||
closing_text: DF.TextEditor | None
|
||||
company: DF.Link
|
||||
company_address: DF.Link | None
|
||||
company_address_display: DF.SmallText | None
|
||||
contact_display: DF.SmallText | None
|
||||
contact_email: DF.Data | None
|
||||
contact_mobile: DF.SmallText | None
|
||||
contact_person: DF.Link | None
|
||||
conversion_rate: DF.Float
|
||||
cost_center: DF.Link | None
|
||||
currency: DF.Link | None
|
||||
customer: DF.Link
|
||||
customer_address: DF.Link | None
|
||||
customer_name: DF.Data | None
|
||||
dunning_amount: DF.Currency
|
||||
dunning_fee: DF.Currency
|
||||
dunning_type: DF.Link | None
|
||||
grand_total: DF.Currency
|
||||
income_account: DF.Link | None
|
||||
language: DF.Link | None
|
||||
letter_head: DF.Link | None
|
||||
naming_series: DF.Literal["DUNN-.MM.-.YY.-"]
|
||||
overdue_payments: DF.Table[OverduePayment]
|
||||
posting_date: DF.Date
|
||||
posting_time: DF.Time | None
|
||||
rate_of_interest: DF.Float
|
||||
spacer: DF.Data | None
|
||||
status: DF.Literal["Draft", "Resolved", "Unresolved", "Cancelled"]
|
||||
total_interest: DF.Currency
|
||||
total_outstanding: DF.Currency
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
self.validate_same_currency()
|
||||
self.validate_overdue_payments()
|
||||
|
@ -7,4 +7,21 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class DunningLetterText(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
body_text: DF.TextEditor | None
|
||||
closing_text: DF.TextEditor | None
|
||||
is_default_language: DF.Check
|
||||
language: DF.Link | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -7,6 +7,26 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class DunningType(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.dunning_letter_text.dunning_letter_text import DunningLetterText
|
||||
|
||||
company: DF.Link
|
||||
cost_center: DF.Link | None
|
||||
dunning_fee: DF.Currency
|
||||
dunning_letter_text: DF.Table[DunningLetterText]
|
||||
dunning_type: DF.Data
|
||||
income_account: DF.Link | None
|
||||
is_default: DF.Check
|
||||
rate_of_interest: DF.Float
|
||||
# end: auto-generated types
|
||||
|
||||
def autoname(self):
|
||||
company_abbr = frappe.get_value("Company", self.company, "abbr")
|
||||
self.name = f"{self.dunning_type} - {company_abbr}"
|
||||
|
@ -17,6 +17,28 @@ from erpnext.setup.utils import get_exchange_rate
|
||||
|
||||
|
||||
class ExchangeRateRevaluation(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.exchange_rate_revaluation_account.exchange_rate_revaluation_account import (
|
||||
ExchangeRateRevaluationAccount,
|
||||
)
|
||||
|
||||
accounts: DF.Table[ExchangeRateRevaluationAccount]
|
||||
amended_from: DF.Link | None
|
||||
company: DF.Link
|
||||
gain_loss_booked: DF.Currency
|
||||
gain_loss_unbooked: DF.Currency
|
||||
posting_date: DF.Date
|
||||
rounding_loss_allowance: DF.Float
|
||||
total_gain_loss: DF.Currency
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
self.validate_rounding_loss_allowance()
|
||||
self.set_total_gain_loss()
|
||||
|
@ -6,4 +6,29 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class ExchangeRateRevaluationAccount(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account: DF.Link
|
||||
account_currency: DF.Link | None
|
||||
balance_in_account_currency: DF.Currency
|
||||
balance_in_base_currency: DF.Currency
|
||||
current_exchange_rate: DF.Float
|
||||
gain_loss: DF.Currency
|
||||
new_balance_in_account_currency: DF.Currency
|
||||
new_balance_in_base_currency: DF.Currency
|
||||
new_exchange_rate: DF.Float
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
party: DF.DynamicLink | None
|
||||
party_type: DF.Link | None
|
||||
zero_balance: DF.Check
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,15 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class FinanceBook(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
finance_book_name: DF.Data | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -10,6 +10,25 @@ from frappe.utils import add_days, add_years, cstr, getdate
|
||||
|
||||
|
||||
class FiscalYear(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.fiscal_year_company.fiscal_year_company import FiscalYearCompany
|
||||
|
||||
auto_created: DF.Check
|
||||
companies: DF.Table[FiscalYearCompany]
|
||||
disabled: DF.Check
|
||||
is_short_year: DF.Check
|
||||
year: DF.Data
|
||||
year_end_date: DF.Date
|
||||
year_start_date: DF.Date
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
self.validate_dates()
|
||||
self.validate_overlap()
|
||||
|
@ -6,4 +6,18 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class FiscalYearCompany(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
company: DF.Link | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -28,6 +28,47 @@ exclude_from_linked_with = True
|
||||
|
||||
|
||||
class GLEntry(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account: DF.Link | None
|
||||
account_currency: DF.Link | None
|
||||
against: DF.Text | None
|
||||
against_voucher: DF.DynamicLink | None
|
||||
against_voucher_type: DF.Link | None
|
||||
company: DF.Link | None
|
||||
cost_center: DF.Link | None
|
||||
credit: DF.Currency
|
||||
credit_in_account_currency: DF.Currency
|
||||
credit_in_transaction_currency: DF.Currency
|
||||
debit: DF.Currency
|
||||
debit_in_account_currency: DF.Currency
|
||||
debit_in_transaction_currency: DF.Currency
|
||||
due_date: DF.Date | None
|
||||
finance_book: DF.Link | None
|
||||
fiscal_year: DF.Link | None
|
||||
is_advance: DF.Literal["No", "Yes"]
|
||||
is_cancelled: DF.Check
|
||||
is_opening: DF.Literal["No", "Yes"]
|
||||
party: DF.DynamicLink | None
|
||||
party_type: DF.Link | None
|
||||
posting_date: DF.Date | None
|
||||
project: DF.Link | None
|
||||
remarks: DF.Text | None
|
||||
to_rename: DF.Check
|
||||
transaction_currency: DF.Link | None
|
||||
transaction_date: DF.Date | None
|
||||
transaction_exchange_rate: DF.Float
|
||||
voucher_detail_no: DF.Data | None
|
||||
voucher_no: DF.DynamicLink | None
|
||||
voucher_type: DF.Link | None
|
||||
# end: auto-generated types
|
||||
|
||||
def autoname(self):
|
||||
"""
|
||||
Temporarily name doc for fast insertion
|
||||
|
@ -17,6 +17,34 @@ from erpnext.controllers.accounts_controller import AccountsController
|
||||
|
||||
|
||||
class InvoiceDiscounting(AccountsController):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.discounted_invoice.discounted_invoice import DiscountedInvoice
|
||||
|
||||
accounts_receivable_credit: DF.Link
|
||||
accounts_receivable_discounted: DF.Link
|
||||
accounts_receivable_unpaid: DF.Link
|
||||
amended_from: DF.Link | None
|
||||
bank_account: DF.Link
|
||||
bank_charges: DF.Currency
|
||||
bank_charges_account: DF.Link
|
||||
company: DF.Link
|
||||
invoices: DF.Table[DiscountedInvoice]
|
||||
loan_end_date: DF.Date | None
|
||||
loan_period: DF.Int
|
||||
loan_start_date: DF.Date | None
|
||||
posting_date: DF.Date
|
||||
short_term_loan: DF.Link
|
||||
status: DF.Literal["Draft", "Sanctioned", "Disbursed", "Settled", "Cancelled"]
|
||||
total_amount: DF.Currency
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
self.validate_mandatory()
|
||||
self.validate_invoices()
|
||||
|
@ -8,6 +8,24 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class ItemTaxTemplate(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.item_tax_template_detail.item_tax_template_detail import (
|
||||
ItemTaxTemplateDetail,
|
||||
)
|
||||
|
||||
company: DF.Link
|
||||
disabled: DF.Check
|
||||
taxes: DF.Table[ItemTaxTemplateDetail]
|
||||
title: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
self.validate_tax_accounts()
|
||||
|
||||
|
@ -6,4 +6,19 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class ItemTaxTemplateDetail(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
tax_rate: DF.Float
|
||||
tax_type: DF.Link
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -35,6 +35,78 @@ class StockAccountInvalidTransaction(frappe.ValidationError):
|
||||
|
||||
|
||||
class JournalEntry(AccountsController):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.journal_entry_account.journal_entry_account import (
|
||||
JournalEntryAccount,
|
||||
)
|
||||
|
||||
accounts: DF.Table[JournalEntryAccount]
|
||||
amended_from: DF.Link | None
|
||||
apply_tds: DF.Check
|
||||
auto_repeat: DF.Link | None
|
||||
bill_date: DF.Date | None
|
||||
bill_no: DF.Data | None
|
||||
cheque_date: DF.Date | None
|
||||
cheque_no: DF.Data | None
|
||||
clearance_date: DF.Date | None
|
||||
company: DF.Link
|
||||
difference: DF.Currency
|
||||
due_date: DF.Date | None
|
||||
finance_book: DF.Link | None
|
||||
from_template: DF.Link | None
|
||||
inter_company_journal_entry_reference: DF.Link | None
|
||||
is_opening: DF.Literal["No", "Yes"]
|
||||
is_system_generated: DF.Check
|
||||
letter_head: DF.Link | None
|
||||
mode_of_payment: DF.Link | None
|
||||
multi_currency: DF.Check
|
||||
naming_series: DF.Literal["ACC-JV-.YYYY.-"]
|
||||
paid_loan: DF.Data | None
|
||||
pay_to_recd_from: DF.Data | None
|
||||
payment_order: DF.Link | None
|
||||
posting_date: DF.Date
|
||||
process_deferred_accounting: DF.Link | None
|
||||
remark: DF.SmallText | None
|
||||
reversal_of: DF.Link | None
|
||||
select_print_heading: DF.Link | None
|
||||
stock_entry: DF.Link | None
|
||||
tax_withholding_category: DF.Link | None
|
||||
title: DF.Data | None
|
||||
total_amount: DF.Currency
|
||||
total_amount_currency: DF.Link | None
|
||||
total_amount_in_words: DF.Data | None
|
||||
total_credit: DF.Currency
|
||||
total_debit: DF.Currency
|
||||
user_remark: DF.SmallText | None
|
||||
voucher_type: DF.Literal[
|
||||
"Journal Entry",
|
||||
"Inter Company Journal Entry",
|
||||
"Bank Entry",
|
||||
"Cash Entry",
|
||||
"Credit Card Entry",
|
||||
"Debit Note",
|
||||
"Credit Note",
|
||||
"Contra Entry",
|
||||
"Excise Entry",
|
||||
"Write Off Entry",
|
||||
"Opening Entry",
|
||||
"Depreciation Entry",
|
||||
"Exchange Rate Revaluation",
|
||||
"Exchange Gain Or Loss",
|
||||
"Deferred Revenue",
|
||||
"Deferred Expense",
|
||||
]
|
||||
write_off_amount: DF.Currency
|
||||
write_off_based_on: DF.Literal["Accounts Receivable", "Accounts Payable"]
|
||||
# end: auto-generated types
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(JournalEntry, self).__init__(*args, **kwargs)
|
||||
|
||||
|
@ -6,4 +6,56 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class JournalEntryAccount(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account: DF.Link
|
||||
account_currency: DF.Link | None
|
||||
account_type: DF.Data | None
|
||||
against_account: DF.Text | None
|
||||
balance: DF.Currency
|
||||
bank_account: DF.Link | None
|
||||
cost_center: DF.Link | None
|
||||
credit: DF.Currency
|
||||
credit_in_account_currency: DF.Currency
|
||||
debit: DF.Currency
|
||||
debit_in_account_currency: DF.Currency
|
||||
exchange_rate: DF.Float
|
||||
is_advance: DF.Literal["No", "Yes"]
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
party: DF.DynamicLink | None
|
||||
party_balance: DF.Currency
|
||||
party_type: DF.Link | None
|
||||
project: DF.Link | None
|
||||
reference_detail_no: DF.Data | None
|
||||
reference_due_date: DF.Date | None
|
||||
reference_name: DF.DynamicLink | None
|
||||
reference_type: DF.Literal[
|
||||
"",
|
||||
"Sales Invoice",
|
||||
"Purchase Invoice",
|
||||
"Journal Entry",
|
||||
"Sales Order",
|
||||
"Purchase Order",
|
||||
"Expense Claim",
|
||||
"Asset",
|
||||
"Loan",
|
||||
"Payroll Entry",
|
||||
"Employee Advance",
|
||||
"Exchange Rate Revaluation",
|
||||
"Invoice Discounting",
|
||||
"Fees",
|
||||
"Full and Final Statement",
|
||||
"Payment Entry",
|
||||
]
|
||||
user_remark: DF.SmallText | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -7,6 +7,41 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class JournalEntryTemplate(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.journal_entry_template_account.journal_entry_template_account import (
|
||||
JournalEntryTemplateAccount,
|
||||
)
|
||||
|
||||
accounts: DF.Table[JournalEntryTemplateAccount]
|
||||
company: DF.Link
|
||||
is_opening: DF.Literal["No", "Yes"]
|
||||
multi_currency: DF.Check
|
||||
naming_series: DF.Literal
|
||||
template_title: DF.Data
|
||||
voucher_type: DF.Literal[
|
||||
"Journal Entry",
|
||||
"Inter Company Journal Entry",
|
||||
"Bank Entry",
|
||||
"Cash Entry",
|
||||
"Credit Card Entry",
|
||||
"Debit Note",
|
||||
"Credit Note",
|
||||
"Contra Entry",
|
||||
"Excise Entry",
|
||||
"Write Off Entry",
|
||||
"Opening Entry",
|
||||
"Depreciation Entry",
|
||||
"Exchange Rate Revaluation",
|
||||
]
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
||||
|
||||
|
@ -7,4 +7,18 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class JournalEntryTemplateAccount(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account: DF.Link
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -10,6 +10,27 @@ from erpnext.accounts.doctype.account.account import merge_account
|
||||
|
||||
|
||||
class LedgerMerge(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.ledger_merge_accounts.ledger_merge_accounts import (
|
||||
LedgerMergeAccounts,
|
||||
)
|
||||
|
||||
account: DF.Link
|
||||
account_name: DF.Data
|
||||
company: DF.Link
|
||||
is_group: DF.Check
|
||||
merge_accounts: DF.Table[LedgerMergeAccounts]
|
||||
root_type: DF.Literal["", "Asset", "Liability", "Income", "Expense", "Equity"]
|
||||
status: DF.Literal["Pending", "Success", "Partial Success", "Error"]
|
||||
# end: auto-generated types
|
||||
|
||||
def start_merge(self):
|
||||
from frappe.utils.background_jobs import enqueue
|
||||
from frappe.utils.scheduler import is_scheduler_inactive
|
||||
|
@ -6,4 +6,20 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class LedgerMergeAccounts(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account: DF.Link
|
||||
account_name: DF.Data
|
||||
merged: DF.Check
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -10,6 +10,27 @@ exclude_from_linked_with = True
|
||||
|
||||
|
||||
class LoyaltyPointEntry(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
company: DF.Link | None
|
||||
customer: DF.Link | None
|
||||
expiry_date: DF.Date | None
|
||||
invoice: DF.DynamicLink | None
|
||||
invoice_type: DF.Link | None
|
||||
loyalty_points: DF.Int
|
||||
loyalty_program: DF.Link | None
|
||||
loyalty_program_tier: DF.Data | None
|
||||
posting_date: DF.Date | None
|
||||
purchase_amount: DF.Currency
|
||||
redeem_against: DF.Link | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
||||
|
||||
|
@ -6,4 +6,20 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class LoyaltyPointEntryRedemption(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
redeemed_points: DF.Int
|
||||
redemption_date: DF.Date | None
|
||||
sales_invoice: DF.Data | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -9,6 +9,33 @@ from frappe.utils import flt, today
|
||||
|
||||
|
||||
class LoyaltyProgram(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.loyalty_program_collection.loyalty_program_collection import (
|
||||
LoyaltyProgramCollection,
|
||||
)
|
||||
|
||||
auto_opt_in: DF.Check
|
||||
collection_rules: DF.Table[LoyaltyProgramCollection]
|
||||
company: DF.Link | None
|
||||
conversion_factor: DF.Float
|
||||
cost_center: DF.Link | None
|
||||
customer_group: DF.Link | None
|
||||
customer_territory: DF.Link | None
|
||||
expense_account: DF.Link | None
|
||||
expiry_duration: DF.Int
|
||||
from_date: DF.Date
|
||||
loyalty_program_name: DF.Data
|
||||
loyalty_program_type: DF.Literal["Single Tier Program", "Multiple Tier Program"]
|
||||
to_date: DF.Date | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
||||
|
||||
|
@ -6,4 +6,20 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class LoyaltyProgramCollection(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
collection_factor: DF.Currency
|
||||
min_spent: DF.Currency
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
tier_name: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -8,6 +8,24 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class ModeofPayment(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.mode_of_payment_account.mode_of_payment_account import (
|
||||
ModeofPaymentAccount,
|
||||
)
|
||||
|
||||
accounts: DF.Table[ModeofPaymentAccount]
|
||||
enabled: DF.Check
|
||||
mode_of_payment: DF.Data
|
||||
type: DF.Literal["Cash", "Bank", "General", "Phone"]
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
self.validate_accounts()
|
||||
self.validate_repeating_companies()
|
||||
|
@ -6,4 +6,19 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class ModeofPaymentAccount(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
company: DF.Link | None
|
||||
default_account: DF.Link | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -9,6 +9,23 @@ from frappe.utils import add_months, flt
|
||||
|
||||
|
||||
class MonthlyDistribution(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.monthly_distribution_percentage.monthly_distribution_percentage import (
|
||||
MonthlyDistributionPercentage,
|
||||
)
|
||||
|
||||
distribution_id: DF.Data
|
||||
fiscal_year: DF.Link | None
|
||||
percentages: DF.Table[MonthlyDistributionPercentage]
|
||||
# end: auto-generated types
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_months(self):
|
||||
month_list = [
|
||||
|
@ -6,4 +6,19 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class MonthlyDistributionPercentage(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
month: DF.Data
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
percentage_allocation: DF.Float
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -14,6 +14,25 @@ from erpnext.accounts.doctype.accounting_dimension.accounting_dimension import (
|
||||
|
||||
|
||||
class OpeningInvoiceCreationTool(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.opening_invoice_creation_tool_item.opening_invoice_creation_tool_item import (
|
||||
OpeningInvoiceCreationToolItem,
|
||||
)
|
||||
|
||||
company: DF.Link
|
||||
cost_center: DF.Link | None
|
||||
create_missing_party: DF.Check
|
||||
invoice_type: DF.Literal["Sales", "Purchase"]
|
||||
invoices: DF.Table[OpeningInvoiceCreationToolItem]
|
||||
# end: auto-generated types
|
||||
|
||||
def onload(self):
|
||||
"""Load the Opening Invoice summary"""
|
||||
summary, max_count = self.get_opening_invoice_summary()
|
||||
|
@ -6,4 +6,27 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class OpeningInvoiceCreationToolItem(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
cost_center: DF.Link | None
|
||||
due_date: DF.Date | None
|
||||
invoice_number: DF.Data | None
|
||||
item_name: DF.Data | None
|
||||
outstanding_amount: DF.Currency
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
party: DF.DynamicLink
|
||||
party_type: DF.Link | None
|
||||
posting_date: DF.Date | None
|
||||
qty: DF.Data | None
|
||||
temporary_opening_account: DF.Link | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,31 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class OverduePayment(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
description: DF.SmallText | None
|
||||
discounted_amount: DF.Currency
|
||||
due_date: DF.Date | None
|
||||
dunning_level: DF.Int
|
||||
interest: DF.Currency
|
||||
invoice_portion: DF.Percent
|
||||
mode_of_payment: DF.Link | None
|
||||
outstanding: DF.Currency
|
||||
overdue_days: DF.Data | None
|
||||
paid_amount: DF.Currency
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
payment_amount: DF.Currency
|
||||
payment_schedule: DF.Data | None
|
||||
payment_term: DF.Link | None
|
||||
sales_invoice: DF.Link
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,20 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class PartyAccount(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account: DF.Link | None
|
||||
advance_account: DF.Link | None
|
||||
company: DF.Link
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -7,6 +7,20 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class PartyLink(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
primary_party: DF.DynamicLink | None
|
||||
primary_role: DF.Link
|
||||
secondary_party: DF.DynamicLink | None
|
||||
secondary_role: DF.Link | None
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
if self.primary_role not in ["Customer", "Supplier"]:
|
||||
frappe.throw(
|
||||
|
@ -6,4 +6,21 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class PaymentEntryDeduction(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account: DF.Link
|
||||
amount: DF.Currency
|
||||
cost_center: DF.Link
|
||||
description: DF.SmallText | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,28 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class PaymentEntryReference(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account: DF.Link | None
|
||||
allocated_amount: DF.Float
|
||||
bill_no: DF.Data | None
|
||||
due_date: DF.Date | None
|
||||
exchange_gain_loss: DF.Currency
|
||||
exchange_rate: DF.Float
|
||||
outstanding_amount: DF.Float
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
payment_term: DF.Link | None
|
||||
reference_doctype: DF.Link
|
||||
reference_name: DF.DynamicLink
|
||||
total_amount: DF.Float
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -7,6 +7,22 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class PaymentGatewayAccount(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
currency: DF.ReadOnly | None
|
||||
is_default: DF.Check
|
||||
message: DF.SmallText | None
|
||||
payment_account: DF.Link
|
||||
payment_channel: DF.Literal["", "Email", "Phone"]
|
||||
payment_gateway: DF.Link
|
||||
# end: auto-generated types
|
||||
|
||||
def autoname(self):
|
||||
self.name = self.payment_gateway + " - " + self.currency
|
||||
|
||||
|
@ -21,6 +21,35 @@ from erpnext.exceptions import InvalidAccountDimensionError, MandatoryAccountDim
|
||||
|
||||
|
||||
class PaymentLedgerEntry(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account: DF.Link | None
|
||||
account_currency: DF.Link | None
|
||||
account_type: DF.Literal["Receivable", "Payable"]
|
||||
against_voucher_no: DF.DynamicLink | None
|
||||
against_voucher_type: DF.Link | None
|
||||
amount: DF.Currency
|
||||
amount_in_account_currency: DF.Currency
|
||||
company: DF.Link | None
|
||||
cost_center: DF.Link | None
|
||||
delinked: DF.Check
|
||||
due_date: DF.Date | None
|
||||
finance_book: DF.Link | None
|
||||
party: DF.DynamicLink | None
|
||||
party_type: DF.Link | None
|
||||
posting_date: DF.Date | None
|
||||
remarks: DF.Text | None
|
||||
voucher_detail_no: DF.Data | None
|
||||
voucher_no: DF.DynamicLink | None
|
||||
voucher_type: DF.Link | None
|
||||
# end: auto-generated types
|
||||
|
||||
def validate_account(self):
|
||||
valid_account = frappe.db.get_list(
|
||||
"Account",
|
||||
|
@ -11,6 +11,30 @@ from erpnext.accounts.party import get_party_account
|
||||
|
||||
|
||||
class PaymentOrder(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.payment_order_reference.payment_order_reference import (
|
||||
PaymentOrderReference,
|
||||
)
|
||||
|
||||
account: DF.Data | None
|
||||
amended_from: DF.Link | None
|
||||
company: DF.Link
|
||||
company_bank: DF.Link | None
|
||||
company_bank_account: DF.Link
|
||||
naming_series: DF.Literal["PMO-"]
|
||||
party: DF.Link | None
|
||||
payment_order_type: DF.Literal["", "Payment Request", "Payment Entry"]
|
||||
posting_date: DF.Date | None
|
||||
references: DF.Table[PaymentOrderReference]
|
||||
# end: auto-generated types
|
||||
|
||||
def on_submit(self):
|
||||
self.update_payment_status()
|
||||
|
||||
|
@ -6,4 +6,26 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class PaymentOrderReference(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account: DF.Link | None
|
||||
amount: DF.Currency
|
||||
bank_account: DF.Link
|
||||
mode_of_payment: DF.Link | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
payment_reference: DF.Data | None
|
||||
payment_request: DF.Link | None
|
||||
reference_doctype: DF.Link
|
||||
reference_name: DF.DynamicLink
|
||||
supplier: DF.Link | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -23,6 +23,48 @@ from erpnext.controllers.accounts_controller import get_advance_payment_entries_
|
||||
|
||||
|
||||
class PaymentReconciliation(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.payment_reconciliation_allocation.payment_reconciliation_allocation import (
|
||||
PaymentReconciliationAllocation,
|
||||
)
|
||||
from erpnext.accounts.doctype.payment_reconciliation_invoice.payment_reconciliation_invoice import (
|
||||
PaymentReconciliationInvoice,
|
||||
)
|
||||
from erpnext.accounts.doctype.payment_reconciliation_payment.payment_reconciliation_payment import (
|
||||
PaymentReconciliationPayment,
|
||||
)
|
||||
|
||||
allocation: DF.Table[PaymentReconciliationAllocation]
|
||||
bank_cash_account: DF.Link | None
|
||||
company: DF.Link
|
||||
cost_center: DF.Link | None
|
||||
default_advance_account: DF.Link | None
|
||||
from_invoice_date: DF.Date | None
|
||||
from_payment_date: DF.Date | None
|
||||
invoice_limit: DF.Int
|
||||
invoice_name: DF.Data | None
|
||||
invoices: DF.Table[PaymentReconciliationInvoice]
|
||||
maximum_invoice_amount: DF.Currency
|
||||
maximum_payment_amount: DF.Currency
|
||||
minimum_invoice_amount: DF.Currency
|
||||
minimum_payment_amount: DF.Currency
|
||||
party: DF.DynamicLink
|
||||
party_type: DF.Link
|
||||
payment_limit: DF.Int
|
||||
payment_name: DF.Data | None
|
||||
payments: DF.Table[PaymentReconciliationPayment]
|
||||
receivable_payable_account: DF.Link
|
||||
to_invoice_date: DF.Date | None
|
||||
to_payment_date: DF.Date | None
|
||||
# end: auto-generated types
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(PaymentReconciliation, self).__init__(*args, **kwargs)
|
||||
self.common_filter_conditions = []
|
||||
|
@ -6,4 +6,32 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class PaymentReconciliationAllocation(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
allocated_amount: DF.Currency
|
||||
amount: DF.Currency
|
||||
cost_center: DF.Link | None
|
||||
currency: DF.Link | None
|
||||
difference_account: DF.Link | None
|
||||
difference_amount: DF.Currency
|
||||
exchange_rate: DF.Float
|
||||
gain_loss_posting_date: DF.Date | None
|
||||
invoice_number: DF.DynamicLink
|
||||
invoice_type: DF.Link
|
||||
is_advance: DF.Data | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
reference_name: DF.DynamicLink
|
||||
reference_row: DF.Data | None
|
||||
reference_type: DF.Link
|
||||
unreconciled_amount: DF.Currency
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,24 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class PaymentReconciliationInvoice(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
amount: DF.Currency
|
||||
currency: DF.Link | None
|
||||
exchange_rate: DF.Float
|
||||
invoice_date: DF.Date | None
|
||||
invoice_number: DF.DynamicLink | None
|
||||
invoice_type: DF.Literal["Sales Invoice", "Purchase Invoice", "Journal Entry"]
|
||||
outstanding_amount: DF.Currency
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,28 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class PaymentReconciliationPayment(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
amount: DF.Currency
|
||||
cost_center: DF.Link | None
|
||||
currency: DF.Link | None
|
||||
difference_amount: DF.Currency
|
||||
exchange_rate: DF.Float
|
||||
is_advance: DF.Data | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
posting_date: DF.Date | None
|
||||
reference_name: DF.DynamicLink | None
|
||||
reference_row: DF.Data | None
|
||||
reference_type: DF.Link | None
|
||||
remark: DF.SmallText | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -27,6 +27,65 @@ def _get_payment_gateway_controller(*args, **kwargs):
|
||||
|
||||
|
||||
class PaymentRequest(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.subscription_plan_detail.subscription_plan_detail import (
|
||||
SubscriptionPlanDetail,
|
||||
)
|
||||
|
||||
account: DF.ReadOnly | None
|
||||
amended_from: DF.Link | None
|
||||
bank: DF.Link | None
|
||||
bank_account: DF.Link | None
|
||||
bank_account_no: DF.ReadOnly | None
|
||||
branch_code: DF.ReadOnly | None
|
||||
cost_center: DF.Link | None
|
||||
currency: DF.Link | None
|
||||
email_to: DF.Data | None
|
||||
grand_total: DF.Currency
|
||||
iban: DF.ReadOnly | None
|
||||
is_a_subscription: DF.Check
|
||||
make_sales_invoice: DF.Check
|
||||
message: DF.Text | None
|
||||
mode_of_payment: DF.Link | None
|
||||
mute_email: DF.Check
|
||||
naming_series: DF.Literal["ACC-PRQ-.YYYY.-"]
|
||||
party: DF.DynamicLink | None
|
||||
party_type: DF.Link | None
|
||||
payment_account: DF.ReadOnly | None
|
||||
payment_channel: DF.Literal["", "Email", "Phone"]
|
||||
payment_gateway: DF.ReadOnly | None
|
||||
payment_gateway_account: DF.Link | None
|
||||
payment_order: DF.Link | None
|
||||
payment_request_type: DF.Literal["Outward", "Inward"]
|
||||
payment_url: DF.Data | None
|
||||
print_format: DF.Literal
|
||||
project: DF.Link | None
|
||||
reference_doctype: DF.Link | None
|
||||
reference_name: DF.DynamicLink | None
|
||||
status: DF.Literal[
|
||||
"",
|
||||
"Draft",
|
||||
"Requested",
|
||||
"Initiated",
|
||||
"Partially Paid",
|
||||
"Payment Ordered",
|
||||
"Paid",
|
||||
"Failed",
|
||||
"Cancelled",
|
||||
]
|
||||
subject: DF.Data | None
|
||||
subscription_plans: DF.Table[SubscriptionPlanDetail]
|
||||
swift_number: DF.ReadOnly | None
|
||||
transaction_date: DF.Date | None
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
if self.get("__islocal"):
|
||||
self.status = "Draft"
|
||||
|
@ -6,4 +6,30 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class PaymentSchedule(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
base_payment_amount: DF.Currency
|
||||
description: DF.SmallText | None
|
||||
discount: DF.Float
|
||||
discount_date: DF.Date | None
|
||||
discount_type: DF.Literal["Percentage", "Amount"]
|
||||
discounted_amount: DF.Currency
|
||||
due_date: DF.Date
|
||||
invoice_portion: DF.Percent
|
||||
mode_of_payment: DF.Link | None
|
||||
outstanding: DF.Currency
|
||||
paid_amount: DF.Currency
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
payment_amount: DF.Currency
|
||||
payment_term: DF.Link | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,33 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class PaymentTerm(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
credit_days: DF.Int
|
||||
credit_months: DF.Int
|
||||
description: DF.SmallText | None
|
||||
discount: DF.Float
|
||||
discount_type: DF.Literal["Percentage", "Amount"]
|
||||
discount_validity: DF.Int
|
||||
discount_validity_based_on: DF.Literal[
|
||||
"Day(s) after invoice date",
|
||||
"Day(s) after the end of the invoice month",
|
||||
"Month(s) after the end of the invoice month",
|
||||
]
|
||||
due_date_based_on: DF.Literal[
|
||||
"Day(s) after invoice date",
|
||||
"Day(s) after the end of the invoice month",
|
||||
"Month(s) after the end of the invoice month",
|
||||
]
|
||||
invoice_portion: DF.Float
|
||||
mode_of_payment: DF.Link | None
|
||||
payment_term_name: DF.Data | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -9,6 +9,23 @@ from frappe.utils import flt
|
||||
|
||||
|
||||
class PaymentTermsTemplate(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.payment_terms_template_detail.payment_terms_template_detail import (
|
||||
PaymentTermsTemplateDetail,
|
||||
)
|
||||
|
||||
allocate_payment_based_on_payment_terms: DF.Check
|
||||
template_name: DF.Data | None
|
||||
terms: DF.Table[PaymentTermsTemplateDetail]
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
self.validate_invoice_portion()
|
||||
self.validate_terms()
|
||||
|
@ -6,4 +6,36 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class PaymentTermsTemplateDetail(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
credit_days: DF.Int
|
||||
credit_months: DF.Int
|
||||
description: DF.SmallText | None
|
||||
discount: DF.Float
|
||||
discount_type: DF.Literal["Percentage", "Amount"]
|
||||
discount_validity: DF.Int
|
||||
discount_validity_based_on: DF.Literal[
|
||||
"Day(s) after invoice date",
|
||||
"Day(s) after the end of the invoice month",
|
||||
"Month(s) after the end of the invoice month",
|
||||
]
|
||||
due_date_based_on: DF.Literal[
|
||||
"Day(s) after invoice date",
|
||||
"Day(s) after the end of the invoice month",
|
||||
"Month(s) after the end of the invoice month",
|
||||
]
|
||||
invoice_portion: DF.Float
|
||||
mode_of_payment: DF.Link | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
payment_term: DF.Link | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -15,6 +15,26 @@ from erpnext.controllers.accounts_controller import AccountsController
|
||||
|
||||
|
||||
class PeriodClosingVoucher(AccountsController):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
amended_from: DF.Link | None
|
||||
closing_account_head: DF.Link
|
||||
company: DF.Link
|
||||
error_message: DF.Text | None
|
||||
fiscal_year: DF.Link
|
||||
gle_processing_status: DF.Literal["In Progress", "Completed", "Failed"]
|
||||
posting_date: DF.Date
|
||||
remarks: DF.SmallText
|
||||
transaction_date: DF.Date | None
|
||||
year_start_date: DF.Date | None
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
self.validate_account_head()
|
||||
self.validate_posting_date()
|
||||
|
@ -14,6 +14,43 @@ from erpnext.controllers.status_updater import StatusUpdater
|
||||
|
||||
|
||||
class POSClosingEntry(StatusUpdater):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.pos_closing_entry_detail.pos_closing_entry_detail import (
|
||||
POSClosingEntryDetail,
|
||||
)
|
||||
from erpnext.accounts.doctype.pos_closing_entry_taxes.pos_closing_entry_taxes import (
|
||||
POSClosingEntryTaxes,
|
||||
)
|
||||
from erpnext.accounts.doctype.pos_invoice_reference.pos_invoice_reference import (
|
||||
POSInvoiceReference,
|
||||
)
|
||||
|
||||
amended_from: DF.Link | None
|
||||
company: DF.Link
|
||||
error_message: DF.SmallText | None
|
||||
grand_total: DF.Currency
|
||||
net_total: DF.Currency
|
||||
payment_reconciliation: DF.Table[POSClosingEntryDetail]
|
||||
period_end_date: DF.Datetime
|
||||
period_start_date: DF.Datetime
|
||||
pos_opening_entry: DF.Link
|
||||
pos_profile: DF.Link
|
||||
pos_transactions: DF.Table[POSInvoiceReference]
|
||||
posting_date: DF.Date
|
||||
posting_time: DF.Time
|
||||
status: DF.Literal["Draft", "Submitted", "Queued", "Failed", "Cancelled"]
|
||||
taxes: DF.Table[POSClosingEntryTaxes]
|
||||
total_quantity: DF.Float
|
||||
user: DF.Link
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
self.posting_date = self.posting_date or frappe.utils.nowdate()
|
||||
self.posting_time = self.posting_time or frappe.utils.nowtime()
|
||||
|
@ -6,4 +6,22 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class POSClosingEntryDetail(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
closing_amount: DF.Currency
|
||||
difference: DF.Currency
|
||||
expected_amount: DF.Currency
|
||||
mode_of_payment: DF.Link
|
||||
opening_amount: DF.Currency
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,20 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class POSClosingEntryTaxes(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
account_head: DF.Link | None
|
||||
amount: DF.Currency
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
rate: DF.Percent
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,18 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class POSCustomerGroup(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
customer_group: DF.Link
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -7,4 +7,24 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class POSField(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
default_value: DF.Data | None
|
||||
fieldname: DF.Literal
|
||||
fieldtype: DF.Data | None
|
||||
label: DF.Data | None
|
||||
options: DF.Text | None
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
read_only: DF.Check
|
||||
reqd: DF.Check
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -20,6 +20,169 @@ from erpnext.stock.doctype.serial_no.serial_no import get_serial_nos
|
||||
|
||||
|
||||
class POSInvoice(SalesInvoice):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.payment_schedule.payment_schedule import PaymentSchedule
|
||||
from erpnext.accounts.doctype.pos_invoice_item.pos_invoice_item import POSInvoiceItem
|
||||
from erpnext.accounts.doctype.pricing_rule_detail.pricing_rule_detail import PricingRuleDetail
|
||||
from erpnext.accounts.doctype.sales_invoice_advance.sales_invoice_advance import (
|
||||
SalesInvoiceAdvance,
|
||||
)
|
||||
from erpnext.accounts.doctype.sales_invoice_payment.sales_invoice_payment import (
|
||||
SalesInvoicePayment,
|
||||
)
|
||||
from erpnext.accounts.doctype.sales_invoice_timesheet.sales_invoice_timesheet import (
|
||||
SalesInvoiceTimesheet,
|
||||
)
|
||||
from erpnext.accounts.doctype.sales_taxes_and_charges.sales_taxes_and_charges import (
|
||||
SalesTaxesandCharges,
|
||||
)
|
||||
from erpnext.selling.doctype.sales_team.sales_team import SalesTeam
|
||||
from erpnext.stock.doctype.packed_item.packed_item import PackedItem
|
||||
|
||||
account_for_change_amount: DF.Link | None
|
||||
additional_discount_percentage: DF.Float
|
||||
address_display: DF.SmallText | None
|
||||
advances: DF.Table[SalesInvoiceAdvance]
|
||||
against_income_account: DF.SmallText | None
|
||||
allocate_advances_automatically: DF.Check
|
||||
amended_from: DF.Link | None
|
||||
amount_eligible_for_commission: DF.Currency
|
||||
apply_discount_on: DF.Literal["", "Grand Total", "Net Total"]
|
||||
auto_repeat: DF.Link | None
|
||||
base_change_amount: DF.Currency
|
||||
base_discount_amount: DF.Currency
|
||||
base_grand_total: DF.Currency
|
||||
base_in_words: DF.Data | None
|
||||
base_net_total: DF.Currency
|
||||
base_paid_amount: DF.Currency
|
||||
base_rounded_total: DF.Currency
|
||||
base_rounding_adjustment: DF.Currency
|
||||
base_total: DF.Currency
|
||||
base_total_taxes_and_charges: DF.Currency
|
||||
base_write_off_amount: DF.Currency
|
||||
campaign: DF.Link | None
|
||||
cash_bank_account: DF.Link | None
|
||||
change_amount: DF.Currency
|
||||
commission_rate: DF.Float
|
||||
company: DF.Link
|
||||
company_address: DF.Link | None
|
||||
company_address_display: DF.SmallText | None
|
||||
consolidated_invoice: DF.Link | None
|
||||
contact_display: DF.SmallText | None
|
||||
contact_email: DF.Data | None
|
||||
contact_mobile: DF.Data | None
|
||||
contact_person: DF.Link | None
|
||||
conversion_rate: DF.Float
|
||||
cost_center: DF.Link | None
|
||||
coupon_code: DF.Link | None
|
||||
currency: DF.Link
|
||||
customer: DF.Link | None
|
||||
customer_address: DF.Link | None
|
||||
customer_group: DF.Link | None
|
||||
customer_name: DF.Data | None
|
||||
debit_to: DF.Link
|
||||
discount_amount: DF.Currency
|
||||
due_date: DF.Date | None
|
||||
from_date: DF.Date | None
|
||||
grand_total: DF.Currency
|
||||
group_same_items: DF.Check
|
||||
ignore_pricing_rule: DF.Check
|
||||
in_words: DF.Data | None
|
||||
inter_company_invoice_reference: DF.Link | None
|
||||
is_discounted: DF.Check
|
||||
is_opening: DF.Literal["No", "Yes"]
|
||||
is_pos: DF.Check
|
||||
is_return: DF.Check
|
||||
items: DF.Table[POSInvoiceItem]
|
||||
language: DF.Data | None
|
||||
letter_head: DF.Link | None
|
||||
loyalty_amount: DF.Currency
|
||||
loyalty_points: DF.Int
|
||||
loyalty_program: DF.Link | None
|
||||
loyalty_redemption_account: DF.Link | None
|
||||
loyalty_redemption_cost_center: DF.Link | None
|
||||
naming_series: DF.Literal["ACC-PSINV-.YYYY.-"]
|
||||
net_total: DF.Currency
|
||||
other_charges_calculation: DF.LongText | None
|
||||
outstanding_amount: DF.Currency
|
||||
packed_items: DF.Table[PackedItem]
|
||||
paid_amount: DF.Currency
|
||||
party_account_currency: DF.Link | None
|
||||
payment_schedule: DF.Table[PaymentSchedule]
|
||||
payment_terms_template: DF.Link | None
|
||||
payments: DF.Table[SalesInvoicePayment]
|
||||
plc_conversion_rate: DF.Float
|
||||
po_date: DF.Date | None
|
||||
po_no: DF.Data | None
|
||||
pos_profile: DF.Link | None
|
||||
posting_date: DF.Date
|
||||
posting_time: DF.Time | None
|
||||
price_list_currency: DF.Link
|
||||
pricing_rules: DF.Table[PricingRuleDetail]
|
||||
project: DF.Link | None
|
||||
redeem_loyalty_points: DF.Check
|
||||
remarks: DF.SmallText | None
|
||||
return_against: DF.Link | None
|
||||
rounded_total: DF.Currency
|
||||
rounding_adjustment: DF.Currency
|
||||
sales_partner: DF.Link | None
|
||||
sales_team: DF.Table[SalesTeam]
|
||||
scan_barcode: DF.Data | None
|
||||
select_print_heading: DF.Link | None
|
||||
selling_price_list: DF.Link
|
||||
set_posting_time: DF.Check
|
||||
set_warehouse: DF.Link | None
|
||||
shipping_address: DF.SmallText | None
|
||||
shipping_address_name: DF.Link | None
|
||||
shipping_rule: DF.Link | None
|
||||
source: DF.Link | None
|
||||
status: DF.Literal[
|
||||
"",
|
||||
"Draft",
|
||||
"Return",
|
||||
"Credit Note Issued",
|
||||
"Consolidated",
|
||||
"Submitted",
|
||||
"Paid",
|
||||
"Unpaid",
|
||||
"Unpaid and Discounted",
|
||||
"Overdue and Discounted",
|
||||
"Overdue",
|
||||
"Cancelled",
|
||||
]
|
||||
tax_category: DF.Link | None
|
||||
tax_id: DF.Data | None
|
||||
taxes: DF.Table[SalesTaxesandCharges]
|
||||
taxes_and_charges: DF.Link | None
|
||||
tc_name: DF.Link | None
|
||||
terms: DF.TextEditor | None
|
||||
territory: DF.Link | None
|
||||
timesheets: DF.Table[SalesInvoiceTimesheet]
|
||||
title: DF.Data | None
|
||||
to_date: DF.Date | None
|
||||
total: DF.Currency
|
||||
total_advance: DF.Currency
|
||||
total_billing_amount: DF.Currency
|
||||
total_commission: DF.Currency
|
||||
total_net_weight: DF.Float
|
||||
total_qty: DF.Float
|
||||
total_taxes_and_charges: DF.Currency
|
||||
update_billed_amount_in_delivery_note: DF.Check
|
||||
update_billed_amount_in_sales_order: DF.Check
|
||||
update_stock: DF.Check
|
||||
write_off_account: DF.Link | None
|
||||
write_off_amount: DF.Currency
|
||||
write_off_cost_center: DF.Link | None
|
||||
write_off_outstanding_amount_automatically: DF.Check
|
||||
# end: auto-generated types
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(POSInvoice, self).__init__(*args, **kwargs)
|
||||
|
||||
|
@ -7,4 +7,84 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class POSInvoiceItem(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
actual_batch_qty: DF.Float
|
||||
actual_qty: DF.Float
|
||||
allow_zero_valuation_rate: DF.Check
|
||||
amount: DF.Currency
|
||||
asset: DF.Link | None
|
||||
barcode: DF.Data | None
|
||||
base_amount: DF.Currency
|
||||
base_net_amount: DF.Currency
|
||||
base_net_rate: DF.Currency
|
||||
base_price_list_rate: DF.Currency
|
||||
base_rate: DF.Currency
|
||||
base_rate_with_margin: DF.Currency
|
||||
batch_no: DF.Link | None
|
||||
brand: DF.Data | None
|
||||
conversion_factor: DF.Float
|
||||
cost_center: DF.Link
|
||||
customer_item_code: DF.Data | None
|
||||
deferred_revenue_account: DF.Link | None
|
||||
delivered_by_supplier: DF.Check
|
||||
delivered_qty: DF.Float
|
||||
delivery_note: DF.Link | None
|
||||
description: DF.TextEditor
|
||||
discount_amount: DF.Currency
|
||||
discount_percentage: DF.Percent
|
||||
dn_detail: DF.Data | None
|
||||
enable_deferred_revenue: DF.Check
|
||||
expense_account: DF.Link | None
|
||||
finance_book: DF.Link | None
|
||||
grant_commission: DF.Check
|
||||
has_item_scanned: DF.Check
|
||||
image: DF.Attach | None
|
||||
income_account: DF.Link
|
||||
is_fixed_asset: DF.Check
|
||||
is_free_item: DF.Check
|
||||
item_code: DF.Link | None
|
||||
item_group: DF.Link | None
|
||||
item_name: DF.Data
|
||||
item_tax_rate: DF.SmallText | None
|
||||
item_tax_template: DF.Link | None
|
||||
margin_rate_or_amount: DF.Float
|
||||
margin_type: DF.Literal["", "Percentage", "Amount"]
|
||||
net_amount: DF.Currency
|
||||
net_rate: DF.Currency
|
||||
page_break: DF.Check
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
pos_invoice_item: DF.Data | None
|
||||
price_list_rate: DF.Currency
|
||||
pricing_rules: DF.SmallText | None
|
||||
project: DF.Link | None
|
||||
qty: DF.Float
|
||||
quality_inspection: DF.Link | None
|
||||
rate: DF.Currency
|
||||
rate_with_margin: DF.Currency
|
||||
sales_order: DF.Link | None
|
||||
serial_and_batch_bundle: DF.Link | None
|
||||
serial_no: DF.SmallText | None
|
||||
service_end_date: DF.Date | None
|
||||
service_start_date: DF.Date | None
|
||||
service_stop_date: DF.Date | None
|
||||
so_detail: DF.Data | None
|
||||
stock_qty: DF.Float
|
||||
stock_uom: DF.Link | None
|
||||
target_warehouse: DF.Link | None
|
||||
total_weight: DF.Float
|
||||
uom: DF.Link
|
||||
warehouse: DF.Link | None
|
||||
weight_per_unit: DF.Float
|
||||
weight_uom: DF.Link | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -16,6 +16,30 @@ from erpnext.accounts.doctype.pos_profile.pos_profile import required_accounting
|
||||
|
||||
|
||||
class POSInvoiceMergeLog(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.pos_invoice_reference.pos_invoice_reference import (
|
||||
POSInvoiceReference,
|
||||
)
|
||||
|
||||
amended_from: DF.Link | None
|
||||
consolidated_credit_note: DF.Link | None
|
||||
consolidated_invoice: DF.Link | None
|
||||
customer: DF.Link
|
||||
customer_group: DF.Link | None
|
||||
merge_invoices_based_on: DF.Literal["Customer", "Customer Group"]
|
||||
pos_closing_entry: DF.Link | None
|
||||
pos_invoices: DF.Table[POSInvoiceReference]
|
||||
posting_date: DF.Date
|
||||
posting_time: DF.Time
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
self.validate_customer()
|
||||
self.validate_pos_invoice_status()
|
||||
|
@ -7,4 +7,23 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class POSInvoiceReference(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
customer: DF.Link
|
||||
grand_total: DF.Currency
|
||||
is_return: DF.Check
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
pos_invoice: DF.Link
|
||||
posting_date: DF.Date
|
||||
return_against: DF.Link | None
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -6,4 +6,18 @@ from frappe.model.document import Document
|
||||
|
||||
|
||||
class POSItemGroup(Document):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
item_group: DF.Link
|
||||
parent: DF.Data
|
||||
parentfield: DF.Data
|
||||
parenttype: DF.Data
|
||||
# end: auto-generated types
|
||||
|
||||
pass
|
||||
|
@ -10,6 +10,31 @@ from erpnext.controllers.status_updater import StatusUpdater
|
||||
|
||||
|
||||
class POSOpeningEntry(StatusUpdater):
|
||||
# begin: auto-generated types
|
||||
# This code is auto-generated. Do not modify anything in this block.
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
from erpnext.accounts.doctype.pos_opening_entry_detail.pos_opening_entry_detail import (
|
||||
POSOpeningEntryDetail,
|
||||
)
|
||||
|
||||
amended_from: DF.Link | None
|
||||
balance_details: DF.Table[POSOpeningEntryDetail]
|
||||
company: DF.Link
|
||||
period_end_date: DF.Date | None
|
||||
period_start_date: DF.Datetime
|
||||
pos_closing_entry: DF.Data | None
|
||||
pos_profile: DF.Link
|
||||
posting_date: DF.Date
|
||||
set_posting_date: DF.Check
|
||||
status: DF.Literal["Draft", "Open", "Closed", "Cancelled"]
|
||||
user: DF.Link
|
||||
# end: auto-generated types
|
||||
|
||||
def validate(self):
|
||||
self.validate_pos_profile_and_cashier()
|
||||
self.validate_payment_method_account()
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user