diff --git a/erpnext/setup/demo_data/payment_entry.json b/erpnext/setup/demo_data/payment_entry.json index 7d8d7d5ca2c..c0767c3114d 100644 --- a/erpnext/setup/demo_data/payment_entry.json +++ b/erpnext/setup/demo_data/payment_entry.json @@ -1,6 +1,7 @@ [ { "doctype": "Payment Entry", + "payment_type": "Receive", "party_type": "Customer", "party": "ABC Enterprises", "paid_amount": 67000, @@ -8,5 +9,49 @@ "reference_no": "#ref0001", "source_exchange_rate": 1, "target_exchange_rate": 1 + }, + { + "doctype": "Payment Entry", + "payment_type": "Receive", + "party_type": "Customer", + "party": "XYZ Corporation", + "paid_amount": 500000, + "received_amount": 500000, + "reference_no": "#ref0001", + "source_exchange_rate": 1, + "target_exchange_rate": 1 + }, + { + "doctype": "Payment Entry", + "payment_type": "Receive", + "party_type": "Customer", + "party": "KJPR Pvt. Ltd.", + "paid_amount": 300000, + "received_amount": 30000, + "reference_no": "#ref0001", + "source_exchange_rate": 1, + "target_exchange_rate": 1 + }, + { + "doctype": "Payment Entry", + "payment_type": "Pay", + "party_type": "Supplier", + "party": "DQ Industries", + "paid_amount": 85000, + "received_amount": 85000, + "reference_no": "#ref0005", + "source_exchange_rate": 1, + "target_exchange_rate": 1 + }, + { + "doctype": "Payment Entry", + "payment_type": "Pay", + "party_type": "Supplier", + "party": "KC Corp.", + "paid_amount": 100000, + "received_amount": 100000, + "reference_no": "#ref0006", + "source_exchange_rate": 1, + "target_exchange_rate": 1 } ] \ No newline at end of file diff --git a/erpnext/setup/demo_data/purchase_invoice.json b/erpnext/setup/demo_data/purchase_invoice.json index eda26b0502d..7d5e97d1726 100644 --- a/erpnext/setup/demo_data/purchase_invoice.json +++ b/erpnext/setup/demo_data/purchase_invoice.json @@ -25,8 +25,8 @@ "doctype": "Purchase Invoice Item", "item_code": "SKU002", "parentfield": "items", - "qty": 100.0, - "rate": 400.0, + "qty": 50.0, + "rate": 300.0, "conversion_factor": 1 } ] @@ -41,8 +41,8 @@ "doctype": "Purchase Invoice Item", "item_code": "SKU003", "parentfield": "items", - "qty": 100.0, - "rate": 400.0, + "qty": 75.0, + "rate": 523.0, "conversion_factor": 1 } ] @@ -57,8 +57,8 @@ "doctype": "Purchase Invoice Item", "item_code": "SKU004", "parentfield": "items", - "qty": 100.0, - "rate": 400.0, + "qty": 60.0, + "rate": 725.0, "conversion_factor": 1 } ] @@ -73,8 +73,8 @@ "doctype": "Purchase Invoice Item", "item_code": "SKU005", "parentfield": "items", - "qty": 100.0, - "rate": 400.0, + "qty": 82.0, + "rate": 222.0, "conversion_factor": 1 } ] @@ -89,8 +89,8 @@ "doctype": "Purchase Invoice Item", "item_code": "SKU006", "parentfield": "items", - "qty": 100.0, - "rate": 400.0, + "qty": 50.0, + "rate": 420.0, "conversion_factor": 1 } ] @@ -105,8 +105,8 @@ "doctype": "Purchase Invoice Item", "item_code": "SKU007", "parentfield": "items", - "qty": 100.0, - "rate": 400.0, + "qty": 90.0, + "rate": 375.0, "conversion_factor": 1 } ] @@ -121,8 +121,8 @@ "doctype": "Purchase Invoice Item", "item_code": "SKU008", "parentfield": "items", - "qty": 100.0, - "rate": 400.0, + "qty": 121.0, + "rate": 333.0, "conversion_factor": 1 } ] @@ -137,8 +137,8 @@ "doctype": "Purchase Invoice Item", "item_code": "SKU009", "parentfield": "items", - "qty": 100.0, - "rate": 400.0, + "qty": 76.0, + "rate": 700.0, "conversion_factor": 1 } ] @@ -153,8 +153,8 @@ "doctype": "Purchase Invoice Item", "item_code": "SKU010", "parentfield": "items", - "qty": 100.0, - "rate": 400.0, + "qty": 78.0, + "rate": 500.0, "conversion_factor": 1 } ] diff --git a/erpnext/setup/setup_wizard/operations/install_fixtures.py b/erpnext/setup/setup_wizard/operations/install_fixtures.py index 2205924e509..ae6881b99e0 100644 --- a/erpnext/setup/setup_wizard/operations/install_fixtures.py +++ b/erpnext/setup/setup_wizard/operations/install_fixtures.py @@ -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: