chore: Update records

This commit is contained in:
Deepesh Garg
2023-07-30 11:53:09 +05:30
parent 26ee50269a
commit c850f46c0a
3 changed files with 78 additions and 18 deletions

View File

@@ -454,6 +454,7 @@ def install_defaults(args=None): # nosemgrep
set_global_defaults(args)
update_stock_settings()
update_shopping_cart_settings(args)
args.update({"set_default": 1})
create_bank_account(args)
@@ -528,6 +529,20 @@ def create_bank_account(args):
pass
def update_shopping_cart_settings(args): # nosemgrep
shopping_cart = frappe.get_doc("E Commerce Settings")
shopping_cart.update(
{
"enabled": 1,
"company": args.company_name,
"price_list": frappe.db.get_value("Price List", {"selling": 1}),
"default_customer_group": _("Individual"),
"quotation_series": "QTN-",
}
)
shopping_cart.update_single(shopping_cart.get_valid_dict())
def get_fy_details(fy_start_date, fy_end_date):
start_year = getdate(fy_start_date).year
if start_year == getdate(fy_end_date).year: