commit
9f1ddeb4e4
@ -36,16 +36,16 @@
|
||||
}
|
||||
},
|
||||
"Fixed Assets": {
|
||||
"Capital Equipments": {
|
||||
"Capital Equipment": {
|
||||
"account_type": "Fixed Asset"
|
||||
},
|
||||
"Electronic Equipments": {
|
||||
"Electronic Equipment": {
|
||||
"account_type": "Fixed Asset"
|
||||
},
|
||||
"Furnitures and Fixtures": {
|
||||
"Furniture and Fixtures": {
|
||||
"account_type": "Fixed Asset"
|
||||
},
|
||||
"Office Equipments": {
|
||||
"Office Equipment": {
|
||||
"account_type": "Fixed Asset"
|
||||
},
|
||||
"Plants and Machineries": {
|
||||
|
@ -23,13 +23,13 @@ def get():
|
||||
_("Tax Assets"): {"is_group": 1},
|
||||
},
|
||||
_("Fixed Assets"): {
|
||||
_("Capital Equipments"): {"account_type": "Fixed Asset"},
|
||||
_("Electronic Equipments"): {"account_type": "Fixed Asset"},
|
||||
_("Furnitures and Fixtures"): {"account_type": "Fixed Asset"},
|
||||
_("Office Equipments"): {"account_type": "Fixed Asset"},
|
||||
_("Capital Equipment"): {"account_type": "Fixed Asset"},
|
||||
_("Electronic Equipment"): {"account_type": "Fixed Asset"},
|
||||
_("Furniture and Fixtures"): {"account_type": "Fixed Asset"},
|
||||
_("Office Equipment"): {"account_type": "Fixed Asset"},
|
||||
_("Plants and Machineries"): {"account_type": "Fixed Asset"},
|
||||
_("Buildings"): {"account_type": "Fixed Asset"},
|
||||
_("Softwares"): {"account_type": "Fixed Asset"},
|
||||
_("Software"): {"account_type": "Fixed Asset"},
|
||||
_("Accumulated Depreciation"): {"account_type": "Accumulated Depreciation"},
|
||||
_("CWIP Account"): {
|
||||
"account_type": "Capital Work in Progress",
|
||||
|
@ -36,13 +36,13 @@ def get():
|
||||
"account_number": "1100-1600",
|
||||
},
|
||||
_("Fixed Assets"): {
|
||||
_("Capital Equipments"): {"account_type": "Fixed Asset", "account_number": "1710"},
|
||||
_("Electronic Equipments"): {"account_type": "Fixed Asset", "account_number": "1720"},
|
||||
_("Furnitures and Fixtures"): {"account_type": "Fixed Asset", "account_number": "1730"},
|
||||
_("Office Equipments"): {"account_type": "Fixed Asset", "account_number": "1740"},
|
||||
_("Capital Equipment"): {"account_type": "Fixed Asset", "account_number": "1710"},
|
||||
_("Electronic Equipment"): {"account_type": "Fixed Asset", "account_number": "1720"},
|
||||
_("Furniture and Fixtures"): {"account_type": "Fixed Asset", "account_number": "1730"},
|
||||
_("Office Equipment"): {"account_type": "Fixed Asset", "account_number": "1740"},
|
||||
_("Plants and Machineries"): {"account_type": "Fixed Asset", "account_number": "1750"},
|
||||
_("Buildings"): {"account_type": "Fixed Asset", "account_number": "1760"},
|
||||
_("Softwares"): {"account_type": "Fixed Asset", "account_number": "1770"},
|
||||
_("Software"): {"account_type": "Fixed Asset", "account_number": "1770"},
|
||||
_("Accumulated Depreciation"): {
|
||||
"account_type": "Accumulated Depreciation",
|
||||
"account_number": "1780",
|
||||
|
@ -119,7 +119,7 @@ class TestAccount(unittest.TestCase):
|
||||
InvalidAccountMergeError,
|
||||
merge_account,
|
||||
"Capital Stock - _TC",
|
||||
"Softwares - _TC",
|
||||
"Software - _TC",
|
||||
)
|
||||
|
||||
# Raise error as currency doesn't match
|
||||
|
@ -55,7 +55,7 @@ class BankAccount(Document):
|
||||
|
||||
def validate_company(self):
|
||||
if self.is_company_account and not self.company:
|
||||
frappe.throw(_("Company is manadatory for company account"))
|
||||
frappe.throw(_("Company is mandatory for company account"))
|
||||
|
||||
def validate_iban(self):
|
||||
"""
|
||||
|
@ -48,11 +48,11 @@ class BankGuarantee(Document):
|
||||
|
||||
def on_submit(self):
|
||||
if not self.bank_guarantee_number:
|
||||
frappe.throw(_("Enter the Bank Guarantee Number before submittting."))
|
||||
frappe.throw(_("Enter the Bank Guarantee Number before submitting."))
|
||||
if not self.name_of_beneficiary:
|
||||
frappe.throw(_("Enter the name of the Beneficiary before submittting."))
|
||||
frappe.throw(_("Enter the name of the Beneficiary before submitting."))
|
||||
if not self.bank:
|
||||
frappe.throw(_("Enter the name of the bank or lending institution before submittting."))
|
||||
frappe.throw(_("Enter the name of the bank or lending institution before submitting."))
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
|
@ -80,7 +80,7 @@
|
||||
{
|
||||
"fieldname": "valid_upto",
|
||||
"fieldtype": "Date",
|
||||
"label": "Valid Upto"
|
||||
"label": "Valid Up To"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval: doc.coupon_type == \"Promotional\"",
|
||||
@ -115,7 +115,7 @@
|
||||
"read_only": 1
|
||||
}
|
||||
],
|
||||
"modified": "2019-10-19 14:48:14.602481",
|
||||
"modified": "2024-01-24 02:20:26.145996",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Coupon Code",
|
||||
|
@ -154,7 +154,7 @@ frappe.ui.form.on('Invoice Discounting', {
|
||||
}
|
||||
});
|
||||
},
|
||||
primary_action_label: __('Get Invocies')
|
||||
primary_action_label: __('Get Invoices')
|
||||
});
|
||||
d.show();
|
||||
},
|
||||
|
@ -270,7 +270,7 @@ def start_import(invoices):
|
||||
errors, "<a href='/app/List/Error Log' class='variant-click'>Error Log</a>"
|
||||
),
|
||||
indicator="red",
|
||||
title=_("Error Occured"),
|
||||
title=_("Error Occurred"),
|
||||
)
|
||||
return names
|
||||
|
||||
|
@ -371,7 +371,7 @@ class POSInvoice(SalesInvoice):
|
||||
if d.get("qty") > 0:
|
||||
frappe.throw(
|
||||
_(
|
||||
"Row #{}: You cannot add postive quantities in a return invoice. Please remove item {} to complete the return."
|
||||
"Row #{}: You cannot add positive quantities in a return invoice. Please remove item {} to complete the return."
|
||||
).format(d.idx, frappe.bold(d.item_code)),
|
||||
title=_("Invalid Item"),
|
||||
)
|
||||
@ -793,7 +793,7 @@ def make_merge_log(invoices):
|
||||
invoices = json.loads(invoices)
|
||||
|
||||
if len(invoices) == 0:
|
||||
frappe.throw(_("Atleast one invoice has to be selected."))
|
||||
frappe.throw(_("At least one invoice has to be selected."))
|
||||
|
||||
merge_log = frappe.new_doc("POS Invoice Merge Log")
|
||||
merge_log.posting_date = getdate(nowdate())
|
||||
|
@ -132,7 +132,7 @@ class POSProfile(Document):
|
||||
|
||||
if len(customer_groups) != len(set(customer_groups)):
|
||||
frappe.throw(
|
||||
_("Duplicate customer group found in the cutomer group table"),
|
||||
_("Duplicate customer group found in the customer group table"),
|
||||
title=_("Duplicate Customer Group"),
|
||||
)
|
||||
|
||||
|
@ -339,7 +339,7 @@
|
||||
{
|
||||
"fieldname": "valid_upto",
|
||||
"fieldtype": "Date",
|
||||
"label": "Valid Upto"
|
||||
"label": "Valid Up To"
|
||||
},
|
||||
{
|
||||
"fieldname": "col_break1",
|
||||
@ -608,7 +608,7 @@
|
||||
"icon": "fa fa-gift",
|
||||
"idx": 1,
|
||||
"links": [],
|
||||
"modified": "2023-02-14 04:53:34.887358",
|
||||
"modified": "2024-01-24 02:20:26.145996",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Pricing Rule",
|
||||
|
@ -193,7 +193,7 @@ class PricingRule(Document):
|
||||
|
||||
def validate_applicable_for_selling_or_buying(self):
|
||||
if not self.selling and not self.buying:
|
||||
throw(_("Atleast one of the Selling or Buying must be selected"))
|
||||
throw(_("At least one of the Selling or Buying must be selected"))
|
||||
|
||||
if not self.selling and self.applicable_for in [
|
||||
"Customer",
|
||||
|
@ -232,7 +232,7 @@
|
||||
{
|
||||
"fieldname": "valid_upto",
|
||||
"fieldtype": "Date",
|
||||
"label": "Valid Upto"
|
||||
"label": "Valid Up To"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_26",
|
||||
@ -278,7 +278,7 @@
|
||||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2021-05-06 16:20:22.039078",
|
||||
"modified": "2024-01-24 02:20:26.145996",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Promotional Scheme",
|
||||
|
@ -51,7 +51,7 @@
|
||||
"fieldtype": "Select",
|
||||
"label": "Status",
|
||||
"no_copy": 1,
|
||||
"options": "\nTrialling\nActive\nPast Due Date\nCancelled\nUnpaid\nCompleted",
|
||||
"options": "\nTrialing\nActive\nPast Due Date\nCancelled\nUnpaid\nCompleted",
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
@ -267,7 +267,7 @@
|
||||
"link_fieldname": "subscription"
|
||||
}
|
||||
],
|
||||
"modified": "2023-12-28 17:20:42.687789",
|
||||
"modified": "2024-01-24 02:20:26.145996",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Subscription",
|
||||
|
@ -78,9 +78,7 @@ class Subscription(Document):
|
||||
purchase_tax_template: DF.Link | None
|
||||
sales_tax_template: DF.Link | None
|
||||
start_date: DF.Date | None
|
||||
status: DF.Literal[
|
||||
"", "Trialling", "Active", "Past Due Date", "Cancelled", "Unpaid", "Completed"
|
||||
]
|
||||
status: DF.Literal["", "Trialing", "Active", "Past Due Date", "Cancelled", "Unpaid", "Completed"]
|
||||
submit_invoice: DF.Check
|
||||
trial_period_end: DF.Date | None
|
||||
trial_period_start: DF.Date | None
|
||||
@ -233,7 +231,7 @@ class Subscription(Document):
|
||||
Sets the status of the `Subscription`
|
||||
"""
|
||||
if self.is_trialling():
|
||||
self.status = "Trialling"
|
||||
self.status = "Trialing"
|
||||
elif (
|
||||
self.status == "Active" and self.end_date and getdate(posting_date) > getdate(self.end_date)
|
||||
):
|
||||
|
@ -1,7 +1,7 @@
|
||||
frappe.listview_settings['Subscription'] = {
|
||||
get_indicator: function(doc) {
|
||||
if(doc.status === 'Trialling') {
|
||||
return [__("Trialling"), "green"];
|
||||
if(doc.status === 'Trialing') {
|
||||
return [__("Trialing"), "green"];
|
||||
} else if(doc.status === 'Active') {
|
||||
return [__("Active"), "green"];
|
||||
} else if(doc.status === 'Completed') {
|
||||
|
@ -46,7 +46,7 @@ class TestSubscription(FrappeTestCase):
|
||||
get_date_str(subscription.current_invoice_end),
|
||||
)
|
||||
self.assertEqual(subscription.invoices, [])
|
||||
self.assertEqual(subscription.status, "Trialling")
|
||||
self.assertEqual(subscription.status, "Trialing")
|
||||
|
||||
def test_create_subscription_without_trial_with_correct_period(self):
|
||||
subscription = create_subscription()
|
||||
|
@ -4,7 +4,7 @@
|
||||
"doctype": "Form Tour",
|
||||
"idx": 0,
|
||||
"is_standard": 1,
|
||||
"modified": "2021-06-29 17:00:26.145996",
|
||||
"modified": "2024-01-24 02:20:26.145996",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Accounts Settings",
|
||||
@ -82,7 +82,7 @@
|
||||
"label": "Accounts Frozen Till Date",
|
||||
"parent_field": "",
|
||||
"position": "Right",
|
||||
"title": "Accounts Frozen Upto"
|
||||
"title": "Accounts Frozen Up To"
|
||||
},
|
||||
{
|
||||
"description": "Users with this Role are allowed to set frozen accounts and create/modify accounting entries against frozen accounts.",
|
||||
|
@ -39,7 +39,7 @@ frappe.query_reports["Account Balance"] = {
|
||||
{ "value": "Asset Received But Not Billed", "label": __("Asset Received But Not Billed") },
|
||||
{ "value": "Bank", "label": __("Bank") },
|
||||
{ "value": "Cash", "label": __("Cash") },
|
||||
{ "value": "Chargeble", "label": __("Chargeble") },
|
||||
{ "value": "Chargeable", "label": __("Chargeable") },
|
||||
{ "value": "Capital Work in Progress", "label": __("Capital Work in Progress") },
|
||||
{ "value": "Cost of Goods Sold", "label": __("Cost of Goods Sold") },
|
||||
{ "value": "Depreciation", "label": __("Depreciation") },
|
||||
|
@ -1011,7 +1011,7 @@ def make_asset_movement(assets, purpose=None):
|
||||
assets = json.loads(assets)
|
||||
|
||||
if len(assets) == 0:
|
||||
frappe.throw(_("Atleast one asset has to be selected."))
|
||||
frappe.throw(_("At least one asset has to be selected."))
|
||||
|
||||
asset_movement = frappe.new_doc("Asset Movement")
|
||||
asset_movement.quantity = len(assets)
|
||||
|
@ -40,7 +40,7 @@ class AssetMaintenance(Document):
|
||||
if getdate(task.next_due_date) < getdate(nowdate()):
|
||||
task.maintenance_status = "Overdue"
|
||||
if not task.assign_to and self.docstatus == 0:
|
||||
throw(_("Row #{}: Please asign task to a member.").format(task.idx))
|
||||
throw(_("Row #{}: Please assign task to a member.").format(task.idx))
|
||||
|
||||
def on_update(self):
|
||||
for task in self.get("asset_maintenance_tasks"):
|
||||
|
@ -2,14 +2,14 @@
|
||||
"action": "Show Form Tour",
|
||||
"action_label": "Let's review existing Asset Category",
|
||||
"creation": "2021-08-13 14:26:18.656303",
|
||||
"description": "# Asset Category\n\nAn Asset Category classifies different assets of a Company.\n\nYou can create an Asset Category based on the type of assets. For example, all your desktops and laptops can be part of an Asset Category named \"Electronic Equipments\". Create a separate category for furniture. Also, you can update default properties for each category, like:\n - Depreciation type and duration\n - Fixed asset account\n - Depreciation account\n",
|
||||
"description": "# Asset Category\n\nAn Asset Category classifies different assets of a Company.\n\nYou can create an Asset Category based on the type of assets. For example, all your desktops and laptops can be part of an Asset Category named \"Electronic Equipment\". Create a separate category for furniture. Also, you can update default properties for each category, like:\n - Depreciation type and duration\n - Fixed asset account\n - Depreciation account\n",
|
||||
"docstatus": 0,
|
||||
"doctype": "Onboarding Step",
|
||||
"idx": 0,
|
||||
"is_complete": 0,
|
||||
"is_single": 0,
|
||||
"is_skipped": 0,
|
||||
"modified": "2021-11-23 10:02:03.242127",
|
||||
"modified": "2024-01-24 02:20:26.145996",
|
||||
"modified_by": "Administrator",
|
||||
"name": "Asset Category",
|
||||
"owner": "Administrator",
|
||||
|
@ -202,7 +202,7 @@ def prepare_chart_data(data, filters):
|
||||
"values": [flt(d.get("asset_value"), 2) for d in labels_values_map.values()],
|
||||
},
|
||||
{
|
||||
"name": _("Depreciatied Amount"),
|
||||
"name": _("Depreciated Amount"),
|
||||
"values": [flt(d.get("depreciated_amount"), 2) for d in labels_values_map.values()],
|
||||
},
|
||||
],
|
||||
|
@ -141,7 +141,7 @@ def validate_returned_items(doc):
|
||||
items_returned = True
|
||||
|
||||
if not items_returned:
|
||||
frappe.throw(_("Atleast one item should be entered with negative quantity in return document"))
|
||||
frappe.throw(_("At least one item should be entered with negative quantity in return document"))
|
||||
|
||||
|
||||
def validate_quantity(doc, args, ref, valid_items, already_returned_items):
|
||||
|
@ -155,7 +155,7 @@ class TallyMigration(Document):
|
||||
except RecursionError:
|
||||
self.log(
|
||||
_(
|
||||
"Error occured while parsing Chart of Accounts: Please make sure that no two accounts have the same name"
|
||||
"Error occurred while parsing Chart of Accounts: Please make sure that no two accounts have the same name"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -222,7 +222,7 @@ class MaintenanceSchedule(TransactionBase):
|
||||
|
||||
def validate_maintenance_detail(self):
|
||||
if not self.get("items"):
|
||||
throw(_("Please enter Maintaince Details first"))
|
||||
throw(_("Please enter Maintenance Details first"))
|
||||
|
||||
for d in self.get("items"):
|
||||
if not d.item_code:
|
||||
|
@ -1520,7 +1520,7 @@ def validate_operation_data(row):
|
||||
|
||||
if row.get("qty") > row.get("pending_qty"):
|
||||
frappe.throw(
|
||||
_("For operation {0}: Quantity ({1}) can not be greter than pending quantity({2})").format(
|
||||
_("For operation {0}: Quantity ({1}) can not be greater than pending quantity({2})").format(
|
||||
frappe.bold(row.get("operation")),
|
||||
frappe.bold(row.get("qty")),
|
||||
frappe.bold(row.get("pending_qty")),
|
||||
|
@ -188,4 +188,4 @@ def execute():
|
||||
raise err
|
||||
else:
|
||||
break
|
||||
print(f"{processed} records have been sucessfully migrated")
|
||||
print(f"{processed} records have been successfully migrated")
|
||||
|
@ -64,7 +64,7 @@
|
||||
{
|
||||
"fieldname": "valid_upto",
|
||||
"fieldtype": "Date",
|
||||
"label": "Valid Upto",
|
||||
"label": "Valid Up To",
|
||||
"reqd": 1
|
||||
},
|
||||
{
|
||||
@ -135,7 +135,7 @@
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2023-04-18 08:25:35.302081",
|
||||
"modified": "2024-01-24 02:20:26.145996",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Regional",
|
||||
"name": "Lower Deduction Certificate",
|
||||
|
@ -37,7 +37,7 @@ class LowerDeductionCertificate(Document):
|
||||
|
||||
def validate_dates(self):
|
||||
if getdate(self.valid_upto) < getdate(self.valid_from):
|
||||
frappe.throw(_("Valid Upto date cannot be before Valid From date"))
|
||||
frappe.throw(_("Valid Up To date cannot be before Valid From date"))
|
||||
|
||||
fiscal_year = get_fiscal_year(fiscal_year=self.fiscal_year, as_dict=True)
|
||||
|
||||
@ -45,7 +45,7 @@ class LowerDeductionCertificate(Document):
|
||||
frappe.throw(_("Valid From date not in Fiscal Year {0}").format(frappe.bold(self.fiscal_year)))
|
||||
|
||||
if not (fiscal_year.year_start_date <= getdate(self.valid_upto) <= fiscal_year.year_end_date):
|
||||
frappe.throw(_("Valid Upto date not in Fiscal Year {0}").format(frappe.bold(self.fiscal_year)))
|
||||
frappe.throw(_("Valid Up To date not in Fiscal Year {0}").format(frappe.bold(self.fiscal_year)))
|
||||
|
||||
def validate_supplier_against_tax_category(self):
|
||||
duplicate_certificate = frappe.db.get_value(
|
||||
|
@ -427,11 +427,11 @@ def create_internal_customer(
|
||||
if not allowed_to_interact_with:
|
||||
allowed_to_interact_with = represents_company
|
||||
|
||||
exisiting_representative = frappe.db.get_value(
|
||||
existing_representative = frappe.db.get_value(
|
||||
"Customer", {"represents_company": represents_company}
|
||||
)
|
||||
if exisiting_representative:
|
||||
return exisiting_representative
|
||||
if existing_representative:
|
||||
return existing_representative
|
||||
|
||||
if not frappe.db.exists("Customer", customer_name):
|
||||
customer = frappe.get_doc(
|
||||
|
@ -643,7 +643,7 @@ class SalesOrder(SellingController):
|
||||
if not frappe.get_cached_value("Item", item.item_code, "has_serial_no"):
|
||||
frappe.throw(
|
||||
_(
|
||||
"Item {0} has no Serial No. Only serilialized items can have delivery based on Serial No"
|
||||
"Item {0} has no Serial No. Only serialized items can have delivery based on Serial No"
|
||||
).format(item.item_code)
|
||||
)
|
||||
if not frappe.db.exists("BOM", {"item": item.item_code, "is_active": 1}):
|
||||
|
@ -360,7 +360,7 @@ erpnext.PointOfSale.Controller = class {
|
||||
this.order_summary.load_summary_of(this.frm.doc, true);
|
||||
frappe.show_alert({
|
||||
indicator: 'green',
|
||||
message: __('POS invoice {0} created succesfully', [r.doc.name])
|
||||
message: __('POS invoice {0} created successfully', [r.doc.name])
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ class AuthorizationControl(TransactionBase):
|
||||
if not has_common(appr_roles, frappe.get_roles()) and not has_common(
|
||||
appr_users, [session["user"]]
|
||||
):
|
||||
frappe.msgprint(_("Not authroized since {0} exceeds limits").format(_(based_on)))
|
||||
frappe.msgprint(_("Not authorized since {0} exceeds limits").format(_(based_on)))
|
||||
frappe.throw(_("Can be approved by {0}").format(comma_or(appr_roles + appr_users)))
|
||||
|
||||
def validate_auth_rule(self, doctype_name, total, based_on, cond, company, master_name=""):
|
||||
|
@ -441,13 +441,13 @@
|
||||
{
|
||||
"fieldname": "prefered_contact_email",
|
||||
"fieldtype": "Select",
|
||||
"label": "Prefered Contact Email",
|
||||
"label": "Preferred Contact Email",
|
||||
"options": "\nCompany Email\nPersonal Email\nUser ID"
|
||||
},
|
||||
{
|
||||
"fieldname": "prefered_email",
|
||||
"fieldtype": "Data",
|
||||
"label": "Prefered Email",
|
||||
"label": "Preferred Email",
|
||||
"options": "Email",
|
||||
"read_only": 1
|
||||
},
|
||||
@ -524,7 +524,7 @@
|
||||
{
|
||||
"fieldname": "valid_upto",
|
||||
"fieldtype": "Date",
|
||||
"label": "Valid Upto"
|
||||
"label": "Valid Up To"
|
||||
},
|
||||
{
|
||||
"fieldname": "place_of_issue",
|
||||
@ -824,7 +824,7 @@
|
||||
"image_field": "image",
|
||||
"is_tree": 1,
|
||||
"links": [],
|
||||
"modified": "2024-01-03 17:36:20.984421",
|
||||
"modified": "2024-01-24 02:20:26.145996",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Setup",
|
||||
"name": "Employee",
|
||||
|
@ -796,36 +796,36 @@ def update_billed_amount_based_on_so(so_detail, update_modified=True):
|
||||
|
||||
updated_dn = []
|
||||
for dnd in dn_details:
|
||||
billed_amt_agianst_dn = 0
|
||||
billed_amt_against_dn = 0
|
||||
|
||||
# If delivered against Sales Invoice
|
||||
if dnd.si_detail:
|
||||
billed_amt_agianst_dn = flt(dnd.amount)
|
||||
billed_against_so -= billed_amt_agianst_dn
|
||||
billed_amt_against_dn = flt(dnd.amount)
|
||||
billed_against_so -= billed_amt_against_dn
|
||||
else:
|
||||
# Get billed amount directly against Delivery Note
|
||||
billed_amt_agianst_dn = frappe.db.sql(
|
||||
billed_amt_against_dn = frappe.db.sql(
|
||||
"""select sum(amount) from `tabSales Invoice Item`
|
||||
where dn_detail=%s and docstatus=1""",
|
||||
dnd.name,
|
||||
)
|
||||
billed_amt_agianst_dn = billed_amt_agianst_dn and billed_amt_agianst_dn[0][0] or 0
|
||||
billed_amt_against_dn = billed_amt_against_dn and billed_amt_against_dn[0][0] or 0
|
||||
|
||||
# Distribute billed amount directly against SO between DNs based on FIFO
|
||||
if billed_against_so and billed_amt_agianst_dn < dnd.amount:
|
||||
pending_to_bill = flt(dnd.amount) - billed_amt_agianst_dn
|
||||
if billed_against_so and billed_amt_against_dn < dnd.amount:
|
||||
pending_to_bill = flt(dnd.amount) - billed_amt_against_dn
|
||||
if pending_to_bill <= billed_against_so:
|
||||
billed_amt_agianst_dn += pending_to_bill
|
||||
billed_amt_against_dn += pending_to_bill
|
||||
billed_against_so -= pending_to_bill
|
||||
else:
|
||||
billed_amt_agianst_dn += billed_against_so
|
||||
billed_amt_against_dn += billed_against_so
|
||||
billed_against_so = 0
|
||||
|
||||
frappe.db.set_value(
|
||||
"Delivery Note Item",
|
||||
dnd.name,
|
||||
"billed_amt",
|
||||
billed_amt_agianst_dn,
|
||||
billed_amt_against_dn,
|
||||
update_modified=update_modified,
|
||||
)
|
||||
|
||||
|
@ -191,7 +191,7 @@
|
||||
{
|
||||
"fieldname": "valid_upto",
|
||||
"fieldtype": "Date",
|
||||
"label": "Valid Upto"
|
||||
"label": "Valid Up To"
|
||||
},
|
||||
{
|
||||
"fieldname": "section_break_24",
|
||||
@ -220,7 +220,7 @@
|
||||
"idx": 1,
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2022-11-15 08:26:04.041861",
|
||||
"modified": "2024-01-24 02:20:26.145996",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Item Price",
|
||||
|
@ -59,7 +59,7 @@ class ItemPrice(Document):
|
||||
def validate_dates(self):
|
||||
if self.valid_from and self.valid_upto:
|
||||
if getdate(self.valid_from) > getdate(self.valid_upto):
|
||||
frappe.throw(_("Valid From Date must be lesser than Valid Upto Date."))
|
||||
frappe.throw(_("Valid From Date must be lesser than Valid Up To Date."))
|
||||
|
||||
def update_price_list_details(self):
|
||||
if self.price_list:
|
||||
|
@ -64,7 +64,7 @@ class TestItemPrice(FrappeTestCase):
|
||||
# Enter invalid dates valid_from >= valid_upto
|
||||
doc.valid_from = "2017-04-20"
|
||||
doc.valid_upto = "2017-04-17"
|
||||
# Valid Upto Date can not be less/equal than Valid From Date
|
||||
# Valid Up To Date can not be less/equal than Valid From Date
|
||||
self.assertRaises(frappe.ValidationError, doc.save)
|
||||
|
||||
def test_price_in_a_qty(self):
|
||||
|
@ -776,7 +776,7 @@ def raise_work_orders(material_request):
|
||||
)
|
||||
else:
|
||||
msgprint(
|
||||
_("The {0} {1} created sucessfully").format(frappe.bold(_("Work Order")), work_orders_list[0])
|
||||
_("The {0} {1} created successfully").format(frappe.bold(_("Work Order")), work_orders_list[0])
|
||||
)
|
||||
|
||||
if errors:
|
||||
|
@ -24,7 +24,7 @@ frappe.listview_settings['Material Request'] = {
|
||||
} else if (doc.material_request_type == "Purchase") {
|
||||
return [__("Ordered"), "green", "per_ordered,=,100"];
|
||||
} else if (doc.material_request_type == "Material Transfer") {
|
||||
return [__("Transfered"), "green", "per_ordered,=,100"];
|
||||
return [__("Transferred"), "green", "per_ordered,=,100"];
|
||||
} else if (doc.material_request_type == "Material Issue") {
|
||||
return [__("Issued"), "green", "per_ordered,=,100"];
|
||||
} else if (doc.material_request_type == "Customer Provided") {
|
||||
|
@ -951,32 +951,32 @@ def update_billed_amount_based_on_po(po_details, update_modified=True, pr_doc=No
|
||||
billed_against_po = flt(po_billed_amt_details.get(pr_item.purchase_order_item))
|
||||
|
||||
# Get billed amount directly against Purchase Receipt
|
||||
billed_amt_agianst_pr = flt(pr_items_billed_amount.get(pr_item.name, 0))
|
||||
billed_amt_against_pr = flt(pr_items_billed_amount.get(pr_item.name, 0))
|
||||
|
||||
# Distribute billed amount directly against PO between PRs based on FIFO
|
||||
if billed_against_po and billed_amt_agianst_pr < pr_item.amount:
|
||||
pending_to_bill = flt(pr_item.amount) - billed_amt_agianst_pr
|
||||
if billed_against_po and billed_amt_against_pr < pr_item.amount:
|
||||
pending_to_bill = flt(pr_item.amount) - billed_amt_against_pr
|
||||
if pending_to_bill <= billed_against_po:
|
||||
billed_amt_agianst_pr += pending_to_bill
|
||||
billed_amt_against_pr += pending_to_bill
|
||||
billed_against_po -= pending_to_bill
|
||||
else:
|
||||
billed_amt_agianst_pr += billed_against_po
|
||||
billed_amt_against_pr += billed_against_po
|
||||
billed_against_po = 0
|
||||
|
||||
po_billed_amt_details[pr_item.purchase_order_item] = billed_against_po
|
||||
|
||||
if pr_item.billed_amt != billed_amt_agianst_pr:
|
||||
if pr_item.billed_amt != billed_amt_against_pr:
|
||||
# update existing doc if possible
|
||||
if pr_doc and pr_item.parent == pr_doc.name:
|
||||
pr_item = next((item for item in pr_doc.items if item.name == pr_item.name), None)
|
||||
pr_item.db_set("billed_amt", billed_amt_agianst_pr, update_modified=update_modified)
|
||||
pr_item.db_set("billed_amt", billed_amt_against_pr, update_modified=update_modified)
|
||||
|
||||
else:
|
||||
frappe.db.set_value(
|
||||
"Purchase Receipt Item",
|
||||
pr_item.name,
|
||||
"billed_amt",
|
||||
billed_amt_agianst_pr,
|
||||
billed_amt_against_pr,
|
||||
update_modified=update_modified,
|
||||
)
|
||||
|
||||
|
@ -640,7 +640,7 @@ class StockEntry(StockController):
|
||||
frappe.throw(_("Source and target warehouse cannot be same for row {0}").format(d.idx))
|
||||
|
||||
if not (d.s_warehouse or d.t_warehouse):
|
||||
frappe.throw(_("Atleast one warehouse is mandatory"))
|
||||
frappe.throw(_("At least one warehouse is mandatory"))
|
||||
|
||||
def validate_work_order(self):
|
||||
if self.purpose in (
|
||||
|
@ -176,7 +176,7 @@
|
||||
"description": "No stock transactions can be created or modified before this date.",
|
||||
"fieldname": "stock_frozen_upto",
|
||||
"fieldtype": "Date",
|
||||
"label": "Stock Frozen Upto"
|
||||
"label": "Stock Frozen Up To"
|
||||
},
|
||||
{
|
||||
"description": "Stock transactions that are older than the mentioned days cannot be modified.",
|
||||
@ -427,7 +427,7 @@
|
||||
"index_web_pages_for_search": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2023-10-18 12:35:30.068799",
|
||||
"modified": "2024-01-24 02:20:26.145996",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Stock Settings",
|
||||
|
@ -246,7 +246,7 @@ def notify_errors(exceptions_list):
|
||||
_("Dear System Manager,")
|
||||
+ "<br>"
|
||||
+ _(
|
||||
"An error occured for certain Items while creating Material Requests based on Re-order level. Please rectify these issues :"
|
||||
"An error occurred for certain Items while creating Material Requests based on Re-order level. Please rectify these issues :"
|
||||
)
|
||||
+ "<br>"
|
||||
)
|
||||
|
@ -124,7 +124,7 @@ def get_help_messages():
|
||||
doctype="Timesheet",
|
||||
title=_("Add Timesheets"),
|
||||
description=_(
|
||||
"Timesheets help keep track of time, cost and billing for activites done by your team"
|
||||
"Timesheets help keep track of time, cost and billing for activities done by your team"
|
||||
),
|
||||
action=_("Create Timesheet"),
|
||||
route="List/Timesheet",
|
||||
|
Loading…
x
Reference in New Issue
Block a user