Merge branch 'develop' into fix-repayment-schedule

This commit is contained in:
Deepesh Garg 2022-11-10 19:52:59 +05:30 committed by GitHub
commit 9d5c8d9d6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 266 additions and 153 deletions

View File

@ -59,7 +59,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: '3.11'
- name: Check for valid Python & Merge Conflicts
run: |

View File

@ -23,6 +23,7 @@
"fetch_customers",
"column_break_6",
"primary_mandatory",
"show_net_values_in_party_account",
"column_break_17",
"customers",
"preferences",
@ -291,10 +292,16 @@
"fieldname": "include_break",
"fieldtype": "Check",
"label": "Page Break After Each SoA"
},
{
"default": "0",
"fieldname": "show_net_values_in_party_account",
"fieldtype": "Check",
"label": "Show Net Values in Party Account"
}
],
"links": [],
"modified": "2022-10-17 17:47:08.662475",
"modified": "2022-11-10 17:44:17.165991",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Process Statement Of Accounts",

View File

@ -95,6 +95,7 @@ def get_report_pdf(doc, consolidated=True):
"show_opening_entries": 0,
"include_default_book_entries": 0,
"tax_id": tax_id if tax_id else None,
"show_net_values_in_party_account": doc.show_net_values_in_party_account,
}
)
col, res = get_soa(filters)

View File

@ -10,34 +10,37 @@
"document_type": "Setup",
"engine": "InnoDB",
"field_order": [
"basic_info",
"naming_series",
"supplier_name",
"country",
"default_bank_account",
"tax_id",
"tax_category",
"tax_withholding_category",
"image",
"column_break0",
"supplier_group",
"supplier_type",
"allow_purchase_invoice_creation_without_purchase_order",
"allow_purchase_invoice_creation_without_purchase_receipt",
"is_internal_supplier",
"represents_company",
"disabled",
"is_transporter",
"warn_rfqs",
"warn_pos",
"prevent_rfqs",
"prevent_pos",
"allowed_to_transact_section",
"companies",
"section_break_7",
"image",
"defaults_section",
"default_currency",
"default_bank_account",
"column_break_10",
"default_price_list",
"payment_terms",
"internal_supplier_section",
"is_internal_supplier",
"represents_company",
"column_break_16",
"companies",
"column_break2",
"supplier_details",
"column_break_30",
"website",
"language",
"dashboard_tab",
"tax_tab",
"tax_id",
"column_break_27",
"tax_category",
"tax_withholding_category",
"contact_and_address_tab",
"address_contacts",
"address_html",
"column_break1",
@ -49,30 +52,25 @@
"column_break_44",
"supplier_primary_address",
"primary_address",
"default_payable_accounts",
"accounting_tab",
"accounts",
"section_credit_limit",
"payment_terms",
"cb_21",
"settings_tab",
"allow_purchase_invoice_creation_without_purchase_order",
"allow_purchase_invoice_creation_without_purchase_receipt",
"column_break_54",
"is_frozen",
"disabled",
"warn_rfqs",
"warn_pos",
"prevent_rfqs",
"prevent_pos",
"block_supplier_section",
"on_hold",
"hold_type",
"release_date",
"default_tax_withholding_config",
"column_break2",
"website",
"supplier_details",
"column_break_30",
"language",
"is_frozen"
"column_break_59",
"release_date"
],
"fields": [
{
"fieldname": "basic_info",
"fieldtype": "Section Break",
"label": "Name and Type",
"oldfieldtype": "Section Break",
"options": "fa fa-user"
},
{
"fieldname": "naming_series",
"fieldtype": "Select",
@ -192,6 +190,7 @@
"default": "0",
"fieldname": "warn_rfqs",
"fieldtype": "Check",
"hidden": 1,
"label": "Warn RFQs",
"read_only": 1
},
@ -199,6 +198,7 @@
"default": "0",
"fieldname": "warn_pos",
"fieldtype": "Check",
"hidden": 1,
"label": "Warn POs",
"read_only": 1
},
@ -206,6 +206,7 @@
"default": "0",
"fieldname": "prevent_rfqs",
"fieldtype": "Check",
"hidden": 1,
"label": "Prevent RFQs",
"read_only": 1
},
@ -213,15 +214,10 @@
"default": "0",
"fieldname": "prevent_pos",
"fieldtype": "Check",
"hidden": 1,
"label": "Prevent POs",
"read_only": 1
},
{
"depends_on": "represents_company",
"fieldname": "allowed_to_transact_section",
"fieldtype": "Section Break",
"label": "Allowed To Transact With"
},
{
"depends_on": "represents_company",
"fieldname": "companies",
@ -229,12 +225,6 @@
"label": "Allowed To Transact With",
"options": "Allowed To Transact With"
},
{
"collapsible": 1,
"fieldname": "section_break_7",
"fieldtype": "Section Break",
"label": "Currency and Price List"
},
{
"fieldname": "default_currency",
"fieldtype": "Link",
@ -254,22 +244,12 @@
"label": "Price List",
"options": "Price List"
},
{
"collapsible": 1,
"fieldname": "section_credit_limit",
"fieldtype": "Section Break",
"label": "Payment Terms"
},
{
"fieldname": "payment_terms",
"fieldtype": "Link",
"label": "Default Payment Terms Template",
"options": "Payment Terms Template"
},
{
"fieldname": "cb_21",
"fieldtype": "Column Break"
},
{
"default": "0",
"fieldname": "on_hold",
@ -315,13 +295,6 @@
"label": "Contact HTML",
"read_only": 1
},
{
"collapsible": 1,
"collapsible_depends_on": "accounts",
"fieldname": "default_payable_accounts",
"fieldtype": "Section Break",
"label": "Default Payable Accounts"
},
{
"description": "Mention if non-standard payable account",
"fieldname": "accounts",
@ -329,12 +302,6 @@
"label": "Accounts",
"options": "Party Account"
},
{
"collapsible": 1,
"fieldname": "default_tax_withholding_config",
"fieldtype": "Section Break",
"label": "Default Tax Withholding Config"
},
{
"collapsible": 1,
"collapsible_depends_on": "supplier_details",
@ -383,7 +350,7 @@
{
"fieldname": "primary_address_and_contact_detail_section",
"fieldtype": "Section Break",
"label": "Primary Address and Contact Detail"
"label": "Primary Address and Contact"
},
{
"description": "Reselect, if the chosen contact is edited after save",
@ -420,6 +387,64 @@
"fieldtype": "Link",
"label": "Supplier Primary Address",
"options": "Address"
},
{
"fieldname": "dashboard_tab",
"fieldtype": "Tab Break",
"label": "Dashboard",
"show_dashboard": 1
},
{
"fieldname": "settings_tab",
"fieldtype": "Tab Break",
"label": "Settings"
},
{
"fieldname": "contact_and_address_tab",
"fieldtype": "Tab Break",
"label": "Contact & Address"
},
{
"fieldname": "accounting_tab",
"fieldtype": "Tab Break",
"label": "Accounting"
},
{
"fieldname": "defaults_section",
"fieldtype": "Section Break",
"label": "Defaults"
},
{
"fieldname": "tax_tab",
"fieldtype": "Tab Break",
"label": "Tax"
},
{
"collapsible": 1,
"fieldname": "internal_supplier_section",
"fieldtype": "Section Break",
"label": "Internal Supplier"
},
{
"fieldname": "column_break_16",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_27",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_54",
"fieldtype": "Column Break"
},
{
"fieldname": "block_supplier_section",
"fieldtype": "Section Break",
"label": "Block Supplier"
},
{
"fieldname": "column_break_59",
"fieldtype": "Column Break"
}
],
"icon": "fa fa-user",
@ -432,7 +457,7 @@
"link_fieldname": "party"
}
],
"modified": "2022-04-16 18:02:27.838623",
"modified": "2022-11-09 18:02:59.075203",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier",

View File

@ -54,6 +54,9 @@ class JobCard(Document):
self.set_onload("job_card_excess_transfer", excess_transfer)
self.set_onload("work_order_closed", self.is_work_order_closed())
def before_validate(self):
self.set_wip_warehouse()
def validate(self):
self.validate_time_logs()
self.set_status()
@ -639,6 +642,12 @@ class JobCard(Document):
if update_status:
self.db_set("status", self.status)
def set_wip_warehouse(self):
if not self.wip_warehouse:
self.wip_warehouse = frappe.db.get_single_value(
"Manufacturing Settings", "default_wip_warehouse"
)
def validate_operation_id(self):
if (
self.get("operation_id")

View File

@ -146,7 +146,7 @@ class WorkOrder(Document):
frappe.throw(_("Sales Order {0} is {1}").format(self.sales_order, status))
def set_default_warehouse(self):
if not self.wip_warehouse:
if not self.wip_warehouse and not self.skip_transfer:
self.wip_warehouse = frappe.db.get_single_value(
"Manufacturing Settings", "default_wip_warehouse"
)

View File

@ -49,7 +49,7 @@ def make_custom_fields(update=True):
dict(
fieldname="exempt_from_sales_tax",
fieldtype="Check",
insert_after="represents_company",
insert_after="dn_required",
label="Is customer exempted from sales tax?",
)
],

View File

@ -14,30 +14,35 @@
"naming_series",
"salutation",
"customer_name",
"customer_type",
"customer_group",
"column_break0",
"territory",
"gender",
"default_bank_account",
"tax_id",
"tax_category",
"tax_withholding_category",
"lead_name",
"opportunity_name",
"image",
"column_break0",
"customer_group",
"customer_type",
"territory",
"account_manager",
"so_required",
"dn_required",
"image",
"defaults_tab",
"default_price_list",
"default_bank_account",
"column_break_14",
"default_currency",
"internal_customer_section",
"is_internal_customer",
"represents_company",
"disabled",
"allowed_to_transact_section",
"column_break_70",
"companies",
"currency_and_price_list",
"default_currency",
"column_break_14",
"default_price_list",
"more_info",
"market_segment",
"industry",
"customer_pos_id",
"website",
"language",
"column_break_45",
"customer_details",
"dashboard_tab",
"contact_and_address_tab",
"address_contacts",
"address_html",
"column_break1",
@ -49,34 +54,39 @@
"column_break_26",
"customer_primary_address",
"primary_address",
"default_receivable_accounts",
"accounts",
"tax_tab",
"taxation_section",
"tax_id",
"column_break_21",
"tax_category",
"tax_withholding_category",
"accounting_tab",
"credit_limit_section",
"payment_terms",
"credit_limits",
"more_info",
"customer_details",
"column_break_45",
"market_segment",
"industry",
"website",
"language",
"is_frozen",
"column_break_38",
"default_receivable_accounts",
"accounts",
"loyalty_points_tab",
"loyalty_program",
"column_break_54",
"loyalty_program_tier",
"sales_team_section_break",
"default_sales_partner",
"default_commission_rate",
"sales_team_section",
"sales_team_tab",
"sales_team",
"customer_pos_id"
"sales_team_section",
"default_sales_partner",
"column_break_66",
"default_commission_rate",
"settings_tab",
"so_required",
"dn_required",
"column_break_53",
"is_frozen",
"disabled"
],
"fields": [
{
"fieldname": "basic_info",
"fieldtype": "Section Break",
"label": "Name and Type",
"oldfieldtype": "Section Break",
"options": "fa fa-user"
},
@ -215,12 +225,6 @@
"options": "Company",
"unique": 1
},
{
"depends_on": "represents_company",
"fieldname": "allowed_to_transact_section",
"fieldtype": "Section Break",
"label": "Allowed To Transact With"
},
{
"depends_on": "represents_company",
"fieldname": "companies",
@ -228,12 +232,6 @@
"label": "Allowed To Transact With",
"options": "Allowed To Transact With"
},
{
"collapsible": 1,
"fieldname": "currency_and_price_list",
"fieldtype": "Section Break",
"label": "Currency and Price List"
},
{
"fieldname": "default_currency",
"fieldtype": "Link",
@ -295,7 +293,7 @@
"description": "Select, to make the customer searchable with these fields",
"fieldname": "primary_address_and_contact_detail",
"fieldtype": "Section Break",
"label": "Primary Address and Contact Detail"
"label": "Primary Address and Contact"
},
{
"description": "Reselect, if the chosen contact is edited after save",
@ -334,20 +332,18 @@
"read_only": 1
},
{
"collapsible": 1,
"fieldname": "default_receivable_accounts",
"fieldtype": "Section Break",
"label": "Default Receivable Accounts"
},
{
"description": "Mention if non-standard receivable account",
"description": "Mention if a non-standard receivable account",
"fieldname": "accounts",
"fieldtype": "Table",
"label": "Accounts",
"label": "Receivable Accounts",
"options": "Party Account"
},
{
"collapsible": 1,
"fieldname": "credit_limit_section",
"fieldtype": "Section Break",
"label": "Credit Limit and Payment Terms"
@ -397,12 +393,6 @@
"fieldtype": "Check",
"label": "Is Frozen"
},
{
"collapsible": 1,
"fieldname": "column_break_38",
"fieldtype": "Section Break",
"label": "Loyalty Points"
},
{
"fieldname": "loyalty_program",
"fieldtype": "Link",
@ -417,15 +407,6 @@
"no_copy": 1,
"read_only": 1
},
{
"collapsible": 1,
"collapsible_depends_on": "default_sales_partner",
"fieldname": "sales_team_section_break",
"fieldtype": "Section Break",
"label": "Sales Partner and Commission",
"oldfieldtype": "Section Break",
"options": "fa fa-group"
},
{
"fieldname": "default_sales_partner",
"fieldtype": "Link",
@ -446,13 +427,12 @@
"collapsible": 1,
"collapsible_depends_on": "sales_team",
"fieldname": "sales_team_section",
"fieldtype": "Section Break",
"label": "Sales Team"
"fieldtype": "Section Break"
},
{
"fieldname": "sales_team",
"fieldtype": "Table",
"label": "Sales Team Details",
"label": "Sales Team",
"oldfieldname": "sales_team",
"oldfieldtype": "Table",
"options": "Sales Team"
@ -498,6 +478,83 @@
"no_copy": 1,
"options": "Opportunity",
"print_hide": 1
},
{
"fieldname": "contact_and_address_tab",
"fieldtype": "Tab Break",
"label": "Contact & Address"
},
{
"fieldname": "defaults_tab",
"fieldtype": "Section Break",
"label": "Defaults"
},
{
"fieldname": "settings_tab",
"fieldtype": "Tab Break",
"label": "Settings"
},
{
"collapsible": 1,
"collapsible_depends_on": "default_sales_partner",
"fieldname": "sales_team_tab",
"fieldtype": "Tab Break",
"label": "Sales Team",
"oldfieldtype": "Section Break",
"options": "fa fa-group"
},
{
"fieldname": "column_break_66",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_21",
"fieldtype": "Column Break"
},
{
"fieldname": "dashboard_tab",
"fieldtype": "Tab Break",
"label": "Dashboard",
"show_dashboard": 1
},
{
"fieldname": "column_break_53",
"fieldtype": "Column Break"
},
{
"collapsible": 1,
"fieldname": "loyalty_points_tab",
"fieldtype": "Section Break",
"label": "Loyalty Points"
},
{
"fieldname": "taxation_section",
"fieldtype": "Section Break"
},
{
"fieldname": "accounting_tab",
"fieldtype": "Tab Break",
"label": "Accounting"
},
{
"fieldname": "tax_tab",
"fieldtype": "Tab Break",
"label": "Tax"
},
{
"collapsible": 1,
"collapsible_depends_on": "is_internal_customer",
"fieldname": "internal_customer_section",
"fieldtype": "Section Break",
"label": "Internal Customer"
},
{
"fieldname": "column_break_70",
"fieldtype": "Column Break"
},
{
"fieldname": "column_break_54",
"fieldtype": "Column Break"
}
],
"icon": "fa fa-user",
@ -511,7 +568,7 @@
"link_fieldname": "party"
}
],
"modified": "2022-04-16 20:32:34.000304",
"modified": "2022-11-08 15:52:34.462657",
"modified_by": "Administrator",
"module": "Selling",
"name": "Customer",

View File

@ -12,7 +12,7 @@
],
"fields": [
{
"columns": 4,
"columns": 3,
"fieldname": "credit_limit",
"fieldtype": "Currency",
"in_list_view": 1,
@ -31,6 +31,7 @@
"options": "Company"
},
{
"columns": 3,
"default": "0",
"fieldname": "bypass_credit_limit_check",
"fieldtype": "Check",
@ -40,7 +41,7 @@
],
"istable": 1,
"links": [],
"modified": "2019-12-31 15:43:05.822328",
"modified": "2022-11-08 15:19:13.927194",
"modified_by": "Administrator",
"module": "Selling",
"name": "Customer Credit Limit",
@ -48,5 +49,6 @@
"permissions": [],
"quick_entry": 1,
"sort_field": "modified",
"sort_order": "DESC"
"sort_order": "DESC",
"states": []
}

View File

@ -247,7 +247,7 @@ def _make_sales_order(source_name, target_doc=None, ignore_permissions=False):
"Quotation": {"doctype": "Sales Order", "validation": {"docstatus": ["=", 1]}},
"Quotation Item": {
"doctype": "Sales Order Item",
"field_map": {"parent": "prevdoc_docname"},
"field_map": {"parent": "prevdoc_docname", "name": "quotation_item"},
"postprocess": update_item,
"condition": lambda doc: doc.qty > 0,
},

View File

@ -193,6 +193,9 @@ class SalesOrder(SellingController):
{"Quotation": {"ref_dn_field": "prevdoc_docname", "compare_fields": [["company", "="]]}}
)
if cint(frappe.db.get_single_value("Selling Settings", "maintain_same_sales_rate")):
self.validate_rate_with_reference_doc([["Quotation", "prev_docname", "quotation_item"]])
def update_enquiry_status(self, prevdoc, flag):
enq = frappe.db.sql(
"select t2.prevdoc_docname from `tabQuotation` t1, `tabQuotation Item` t2 where t2.parent = t1.name and t1.name=%s",

View File

@ -70,6 +70,7 @@
"warehouse",
"target_warehouse",
"prevdoc_docname",
"quotation_item",
"col_break4",
"against_blanket_order",
"blanket_order",
@ -838,12 +839,20 @@
"label": "Purchase Order Item",
"print_hide": 1,
"read_only": 1
},
{
"fieldname": "quotation_item",
"fieldtype": "Data",
"hidden": 1,
"label": "quotation_item",
"no_copy": 1,
"read_only": 1
}
],
"idx": 1,
"istable": 1,
"links": [],
"modified": "2022-10-26 16:05:02.712705",
"modified": "2022-11-10 18:20:30.137455",
"modified_by": "Administrator",
"module": "Selling",
"name": "Sales Order Item",