mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-04 18:23:05 +00:00
Compare commits
1 Commits
mariadb_co
...
mergify/bp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78edd20466 |
6
.github/helper/install.sh
vendored
6
.github/helper/install.sh
vendored
@@ -6,7 +6,7 @@ cd ~ || exit
|
||||
|
||||
sudo apt update
|
||||
sudo apt remove mysql-server mysql-client
|
||||
sudo apt install libcups2-dev redis-server mariadb-client libmariadb-dev
|
||||
sudo apt install libcups2-dev redis-server mariadb-client
|
||||
|
||||
pip install frappe-bench
|
||||
|
||||
@@ -17,8 +17,8 @@ frappecommitish=${FRAPPE_BRANCH:-$githubbranch}
|
||||
mkdir frappe
|
||||
pushd frappe
|
||||
git init
|
||||
git remote add origin "https://github.com/ankush/frappe"
|
||||
git fetch origin "perf/mariadb_connector" --depth 1
|
||||
git remote add origin "https://github.com/${frappeuser}/frappe"
|
||||
git fetch origin "${frappecommitish}" --depth 1
|
||||
git checkout FETCH_HEAD
|
||||
popd
|
||||
|
||||
|
||||
1
.github/helper/site_config_mariadb.json
vendored
1
.github/helper/site_config_mariadb.json
vendored
@@ -8,7 +8,6 @@
|
||||
"mail_login": "test@example.com",
|
||||
"mail_password": "test",
|
||||
"admin_password": "admin",
|
||||
"use_native_mariadb_connector": 1,
|
||||
"root_login": "root",
|
||||
"root_password": "root",
|
||||
"host_name": "http://test_site:8000",
|
||||
|
||||
@@ -895,12 +895,8 @@ frappe.ui.form.on("Sales Invoice", {
|
||||
|
||||
project: function (frm) {
|
||||
if (frm.doc.project) {
|
||||
frappe.db.get_value("Projects Settings", {}, "fetch_timesheet_in_sales_invoice", (r) => {
|
||||
if (cint(r.fetch_timesheet_in_sales_invoice)) {
|
||||
frm.events.add_timesheet_data(frm, {
|
||||
project: frm.doc.project,
|
||||
});
|
||||
}
|
||||
frm.events.add_timesheet_data(frm, {
|
||||
project: frm.doc.project,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1096,17 +1096,16 @@ class SalesInvoice(SellingController):
|
||||
timesheet.billing_amount = ts_doc.total_billable_amount
|
||||
|
||||
def update_timesheet_billing_for_project(self):
|
||||
if (
|
||||
not self.timesheets
|
||||
and self.project
|
||||
and frappe.db.get_single_value("Projects Settings", "fetch_timesheet_in_sales_invoice")
|
||||
):
|
||||
self.add_timesheet_data()
|
||||
else:
|
||||
if self.timesheets:
|
||||
self.calculate_billing_amount_for_timesheet()
|
||||
|
||||
@frappe.whitelist()
|
||||
@frappe.whitelist(methods=["PUT"])
|
||||
def add_timesheet_data(self):
|
||||
if not self.timesheets and self.project:
|
||||
self._add_timesheet_data()
|
||||
self.save()
|
||||
|
||||
def _add_timesheet_data(self):
|
||||
self.set("timesheets", [])
|
||||
if self.project:
|
||||
for data in get_projectwise_timesheet_data(self.project):
|
||||
|
||||
@@ -19,10 +19,6 @@ frappe.query_reports["Purchase Order Analysis"] = {
|
||||
width: "80",
|
||||
reqd: 1,
|
||||
default: frappe.datetime.add_months(frappe.datetime.get_today(), -1),
|
||||
on_change: (report) => {
|
||||
report.set_filter_value("name", []);
|
||||
report.refresh();
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldname: "to_date",
|
||||
@@ -31,10 +27,6 @@ frappe.query_reports["Purchase Order Analysis"] = {
|
||||
width: "80",
|
||||
reqd: 1,
|
||||
default: frappe.datetime.get_today(),
|
||||
on_change: (report) => {
|
||||
report.set_filter_value("name", []);
|
||||
report.refresh();
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldname: "project",
|
||||
@@ -46,17 +38,13 @@ frappe.query_reports["Purchase Order Analysis"] = {
|
||||
{
|
||||
fieldname: "name",
|
||||
label: __("Purchase Order"),
|
||||
fieldtype: "MultiSelectList",
|
||||
fieldtype: "Link",
|
||||
width: "80",
|
||||
options: "Purchase Order",
|
||||
get_data: function (txt) {
|
||||
let filters = { docstatus: 1 };
|
||||
|
||||
const from_date = frappe.query_report.get_filter_value("from_date");
|
||||
const to_date = frappe.query_report.get_filter_value("to_date");
|
||||
if (from_date && to_date) filters["transaction_date"] = ["between", [from_date, to_date]];
|
||||
|
||||
return frappe.db.get_link_options("Purchase Order", txt, filters);
|
||||
get_query: () => {
|
||||
return {
|
||||
filters: { docstatus: 1 },
|
||||
};
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -64,16 +52,9 @@ frappe.query_reports["Purchase Order Analysis"] = {
|
||||
label: __("Status"),
|
||||
fieldtype: "MultiSelectList",
|
||||
width: "80",
|
||||
options: ["To Pay", "To Bill", "To Receive", "To Receive and Bill", "Completed", "Closed"],
|
||||
options: ["To Pay", "To Bill", "To Receive", "To Receive and Bill", "Completed"],
|
||||
get_data: function (txt) {
|
||||
let status = [
|
||||
"To Pay",
|
||||
"To Bill",
|
||||
"To Receive",
|
||||
"To Receive and Bill",
|
||||
"Completed",
|
||||
"Closed",
|
||||
];
|
||||
let status = ["To Pay", "To Bill", "To Receive", "To Receive and Bill", "Completed"];
|
||||
let options = [];
|
||||
for (let option of status) {
|
||||
options.push({
|
||||
|
||||
@@ -70,16 +70,14 @@ def get_data(filters):
|
||||
po.company,
|
||||
po_item.name,
|
||||
)
|
||||
.where((po_item.parent == po.name) & (po.status.notin(("Stopped", "On Hold"))) & (po.docstatus == 1))
|
||||
.where((po_item.parent == po.name) & (po.status.notin(("Stopped", "Closed"))) & (po.docstatus == 1))
|
||||
.groupby(po_item.name)
|
||||
.orderby(po.transaction_date)
|
||||
)
|
||||
|
||||
if filters.get("company"):
|
||||
query = query.where(po.company == filters.get("company"))
|
||||
|
||||
if filters.get("name"):
|
||||
query = query.where(po.name.isin(filters.get("name")))
|
||||
for field in ("company", "name"):
|
||||
if filters.get(field):
|
||||
query = query.where(po[field] == filters.get(field))
|
||||
|
||||
if filters.get("from_date") and filters.get("to_date"):
|
||||
query = query.where(po.transaction_date.between(filters.get("from_date"), filters.get("to_date")))
|
||||
|
||||
1204
erpnext/locale/bs.po
1204
erpnext/locale/bs.po
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@ msgstr ""
|
||||
"Project-Id-Version: frappe\n"
|
||||
"Report-Msgid-Bugs-To: info@erpnext.com\n"
|
||||
"POT-Creation-Date: 2025-02-16 09:34+0000\n"
|
||||
"PO-Revision-Date: 2025-02-24 02:42\n"
|
||||
"PO-Revision-Date: 2025-02-16 23:45\n"
|
||||
"Last-Translator: info@erpnext.com\n"
|
||||
"Language-Team: Spanish\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -8962,7 +8962,7 @@ msgstr "Resumen de llamadas"
|
||||
|
||||
#: erpnext/public/js/call_popup/call_popup.js:186
|
||||
msgid "Call Summary Saved"
|
||||
msgstr "Resumen de llamadas guardado"
|
||||
msgstr ""
|
||||
|
||||
#. Label of the call_type (Data) field in DocType 'Telephony Call Type'
|
||||
#: erpnext/telephony/doctype/telephony_call_type/telephony_call_type.json
|
||||
@@ -9991,7 +9991,7 @@ msgstr "Marque esta opción para deshabilitar las fracciones."
|
||||
#. Label of the checked_on (Datetime) field in DocType 'Ledger Health'
|
||||
#: erpnext/accounts/doctype/ledger_health/ledger_health.json
|
||||
msgid "Checked On"
|
||||
msgstr "Comprobado el"
|
||||
msgstr ""
|
||||
|
||||
#. Description of the 'Round Off Tax Amount' (Check) field in DocType 'Tax
|
||||
#. Withholding Category'
|
||||
@@ -10376,7 +10376,7 @@ msgstr ""
|
||||
|
||||
#: erpnext/public/js/bank_reconciliation_tool/number_card.js:24
|
||||
msgid "Closing Balance as per ERP"
|
||||
msgstr "Saldo de cierre según ERP"
|
||||
msgstr ""
|
||||
|
||||
#. Label of the closing_date (Date) field in DocType 'Account Closing Balance'
|
||||
#. Label of the closing_date (Date) field in DocType 'Task'
|
||||
@@ -10404,7 +10404,7 @@ msgstr "Código"
|
||||
#: erpnext/edi/doctype/code_list/code_list.json
|
||||
#: erpnext/edi/doctype/common_code/common_code.json
|
||||
msgid "Code List"
|
||||
msgstr "Lista de códigos"
|
||||
msgstr ""
|
||||
|
||||
#: erpnext/setup/setup_wizard/data/marketing_source.txt:4
|
||||
msgid "Cold Calling"
|
||||
@@ -11268,11 +11268,11 @@ msgstr "Completar"
|
||||
#: erpnext/manufacturing/doctype/job_card/job_card.js:182
|
||||
#: erpnext/manufacturing/doctype/workstation/workstation.js:151
|
||||
msgid "Complete Job"
|
||||
msgstr "Trabajo completo"
|
||||
msgstr ""
|
||||
|
||||
#: erpnext/selling/page/point_of_sale/pos_payment.js:19
|
||||
msgid "Complete Order"
|
||||
msgstr "Pedido completo"
|
||||
msgstr ""
|
||||
|
||||
#. Option for the 'GL Entry Processing Status' (Select) field in DocType
|
||||
#. 'Period Closing Voucher'
|
||||
@@ -11411,7 +11411,7 @@ msgstr "Tareas Completadas"
|
||||
#. Label of the completed_time (Data) field in DocType 'Job Card Operation'
|
||||
#: erpnext/manufacturing/doctype/job_card_operation/job_card_operation.json
|
||||
msgid "Completed Time"
|
||||
msgstr "Tiempo completado"
|
||||
msgstr ""
|
||||
|
||||
#. Name of a report
|
||||
#: erpnext/manufacturing/report/completed_work_orders/completed_work_orders.json
|
||||
@@ -11818,7 +11818,7 @@ msgstr "Desc. de Contacto"
|
||||
|
||||
#: erpnext/selling/page/point_of_sale/pos_item_cart.js:857
|
||||
msgid "Contact Details"
|
||||
msgstr "Contacto"
|
||||
msgstr "Detalles de contacto"
|
||||
|
||||
#. Label of the contact_email (Data) field in DocType 'Dunning'
|
||||
#. Label of the contact_email (Data) field in DocType 'POS Invoice'
|
||||
@@ -11912,7 +11912,7 @@ msgstr "Lista de Contactos"
|
||||
#. Label of the contact_mobile (Data) field in DocType 'Opportunity'
|
||||
#: erpnext/crm/doctype/opportunity/opportunity.json
|
||||
msgid "Contact Mobile"
|
||||
msgstr "Contacto Móvil"
|
||||
msgstr ""
|
||||
|
||||
#. Label of the contact_mobile (Small Text) field in DocType 'Purchase Order'
|
||||
#. Label of the contact_mobile (Small Text) field in DocType 'Subcontracting
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@ msgstr ""
|
||||
"Project-Id-Version: frappe\n"
|
||||
"Report-Msgid-Bugs-To: info@erpnext.com\n"
|
||||
"POT-Creation-Date: 2025-02-16 09:34+0000\n"
|
||||
"PO-Revision-Date: 2025-02-24 02:42\n"
|
||||
"PO-Revision-Date: 2025-02-19 00:43\n"
|
||||
"Last-Translator: info@erpnext.com\n"
|
||||
"Language-Team: Swedish\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -7596,7 +7596,7 @@ msgstr "Bas Totalt Fakturerad Belopp"
|
||||
#. 'Timesheet'
|
||||
#: erpnext/projects/doctype/timesheet/timesheet.json
|
||||
msgid "Base Total Costing Amount"
|
||||
msgstr "Bas Totalt Beräknad Belopp"
|
||||
msgstr "Bas Totalt Kostnad Belopp"
|
||||
|
||||
#. Label of the base_url (Data) field in DocType 'Support Search Source'
|
||||
#: erpnext/support/doctype/support_search_source/support_search_source.json
|
||||
@@ -12574,19 +12574,19 @@ msgstr "Säljaren Betalar Frakt, Försäkring"
|
||||
#: erpnext/manufacturing/doctype/bom_operation/bom_operation.json
|
||||
#: erpnext/projects/doctype/task/task.json
|
||||
msgid "Costing"
|
||||
msgstr "Kostnadsberäkning"
|
||||
msgstr "Kostnad"
|
||||
|
||||
#. Label of the costing_amount (Currency) field in DocType 'Timesheet Detail'
|
||||
#. Label of the base_costing_amount (Currency) field in DocType 'Timesheet
|
||||
#. Detail'
|
||||
#: erpnext/projects/doctype/timesheet_detail/timesheet_detail.json
|
||||
msgid "Costing Amount"
|
||||
msgstr "Kostnadsberäkning Belopp"
|
||||
msgstr "Kostnad Belopp"
|
||||
|
||||
#. Label of the costing_detail (Section Break) field in DocType 'BOM Creator'
|
||||
#: erpnext/manufacturing/doctype/bom_creator/bom_creator.json
|
||||
msgid "Costing Details"
|
||||
msgstr "Kostnadsberäkning Detaljer"
|
||||
msgstr "Kostnad Detaljer"
|
||||
|
||||
#. Label of the costing_rate (Currency) field in DocType 'Activity Cost'
|
||||
#. Label of the costing_rate (Currency) field in DocType 'Timesheet Detail'
|
||||
@@ -12595,12 +12595,12 @@ msgstr "Kostnadsberäkning Detaljer"
|
||||
#: erpnext/projects/doctype/activity_cost/activity_cost.json
|
||||
#: erpnext/projects/doctype/timesheet_detail/timesheet_detail.json
|
||||
msgid "Costing Rate"
|
||||
msgstr "Beräknad Pris"
|
||||
msgstr "Kostnad Pris"
|
||||
|
||||
#. Label of the project_details (Section Break) field in DocType 'Project'
|
||||
#: erpnext/projects/doctype/project/project.json
|
||||
msgid "Costing and Billing"
|
||||
msgstr "Kostnadsberäkning och Fakturering"
|
||||
msgstr "Kostnad och Fakturering"
|
||||
|
||||
#: erpnext/setup/demo.py:55
|
||||
msgid "Could Not Delete Demo Data"
|
||||
@@ -15219,7 +15219,7 @@ msgstr "Standard Kostnad Konto (Inköp)"
|
||||
#. Label of the costing_rate (Currency) field in DocType 'Activity Type'
|
||||
#: erpnext/projects/doctype/activity_type/activity_type.json
|
||||
msgid "Default Costing Rate"
|
||||
msgstr "Standard Beräknad Pris"
|
||||
msgstr "Standard Kostnad Pris"
|
||||
|
||||
#. Label of the default_currency (Link) field in DocType 'Company'
|
||||
#. Label of the default_currency (Link) field in DocType 'Global Defaults'
|
||||
@@ -19117,7 +19117,7 @@ msgstr "Beräknad Ankomst"
|
||||
#: erpnext/buying/report/procurement_tracker/procurement_tracker.py:96
|
||||
#: erpnext/projects/doctype/project/project.json
|
||||
msgid "Estimated Cost"
|
||||
msgstr "Beräknad Kostnad"
|
||||
msgstr "Uppskattad Kostnad"
|
||||
|
||||
#. Label of the estimated_time_and_cost (Section Break) field in DocType 'Work
|
||||
#. Order Operation'
|
||||
@@ -24168,7 +24168,7 @@ msgstr "Inköp Pris"
|
||||
#. Label of the incoming_rate (Currency) field in DocType 'Sales Invoice Item'
|
||||
#: erpnext/accounts/doctype/sales_invoice_item/sales_invoice_item.json
|
||||
msgid "Incoming Rate (Costing)"
|
||||
msgstr "Inköp Pris (Beräknad)"
|
||||
msgstr "Inköp Pris (Kostnad)"
|
||||
|
||||
#: erpnext/public/js/call_popup/call_popup.js:38
|
||||
msgid "Incoming call from {0}"
|
||||
@@ -33122,7 +33122,7 @@ msgstr "Åtgärd Antal"
|
||||
#: erpnext/crm/report/campaign_efficiency/campaign_efficiency.py:25
|
||||
#: erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.py:31
|
||||
msgid "Opp/Lead %"
|
||||
msgstr "Möjlighet/Potentiell Kund %"
|
||||
msgstr "Möjlighet/Möjlig Kund %"
|
||||
|
||||
#. Label of the opportunities_tab (Tab Break) field in DocType 'Prospect'
|
||||
#. Label of the opportunities (Table) field in DocType 'Prospect'
|
||||
@@ -40964,7 +40964,7 @@ msgstr "Kvot Antal"
|
||||
#: erpnext/crm/report/campaign_efficiency/campaign_efficiency.py:26
|
||||
#: erpnext/crm/report/lead_owner_efficiency/lead_owner_efficiency.py:32
|
||||
msgid "Quot/Lead %"
|
||||
msgstr "Offert/Potentiell Kund %"
|
||||
msgstr "Kvot/Potentiell Kund %"
|
||||
|
||||
#. Option for the 'Document Type' (Select) field in DocType 'Contract'
|
||||
#. Label of the quotation_section (Section Break) field in DocType 'CRM
|
||||
@@ -54884,14 +54884,14 @@ msgstr "Totalt Kostnad (Bolag Valuta)"
|
||||
#. Label of the total_costing_amount (Currency) field in DocType 'Timesheet'
|
||||
#: erpnext/projects/doctype/timesheet/timesheet.json
|
||||
msgid "Total Costing Amount"
|
||||
msgstr "Totalt Kostnadsberäknad Belopp"
|
||||
msgstr "Totalt Kostnad Belopp"
|
||||
|
||||
#. Label of the total_costing_amount (Currency) field in DocType 'Project'
|
||||
#. Label of the total_costing_amount (Currency) field in DocType 'Task'
|
||||
#: erpnext/projects/doctype/project/project.json
|
||||
#: erpnext/projects/doctype/task/task.json
|
||||
msgid "Total Costing Amount (via Timesheet)"
|
||||
msgstr "Totalt Kostnadsberäknad Belopp (via Tidrapport)"
|
||||
msgstr "Totalt Kostnad Belopp (via Tidrapport)"
|
||||
|
||||
#. Label of the total_credit (Currency) field in DocType 'Journal Entry'
|
||||
#: erpnext/accounts/doctype/journal_entry/journal_entry.json
|
||||
@@ -59884,7 +59884,7 @@ msgstr "avvikelse"
|
||||
|
||||
#: erpnext/manufacturing/doctype/bom_update_log/bom_updation_utils.py:41
|
||||
msgid "via BOM Update Tool"
|
||||
msgstr "via Stycklista Uppdatering Verktyg"
|
||||
msgstr "via Ersätt Stycklista Verktyg"
|
||||
|
||||
#: erpnext/accounts/doctype/budget/budget.py:276
|
||||
msgid "will be"
|
||||
|
||||
@@ -400,5 +400,4 @@ erpnext.patches.v15_0.migrate_checkbox_to_select_for_reconciliation_effect
|
||||
erpnext.patches.v15_0.sync_auto_reconcile_config
|
||||
execute:frappe.db.set_single_value("Accounts Settings", "exchange_gain_loss_posting_date", "Payment")
|
||||
erpnext.patches.v14_0.disable_add_row_in_gross_profit
|
||||
erpnext.patches.v14_0.update_posting_datetime
|
||||
erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes
|
||||
erpnext.patches.v14_0.update_posting_datetime
|
||||
@@ -13,9 +13,13 @@ def execute():
|
||||
frappe.reload_doc("stock", "doctype", "stock_settings")
|
||||
|
||||
def update_from_return_docs(doctype):
|
||||
<<<<<<< HEAD
|
||||
for return_doc in frappe.get_all(
|
||||
doctype, filters={"is_return": 1, "docstatus": 1, "return_against": ("!=", "")}
|
||||
):
|
||||
=======
|
||||
for return_doc in frappe.get_all(doctype, filters={'is_return' : 1, 'docstatus' : 1, 'return_against': ('!=', '')}):
|
||||
>>>>>>> becf471a3a (fix: fail migration due to None type during v13_0.update_returned_qty_in_pr_dn (#27430))
|
||||
# Update original receipt/delivery document from return
|
||||
return_doc = frappe.get_cached_doc(doctype, return_doc.name)
|
||||
try:
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
"timesheet_sb",
|
||||
"ignore_workstation_time_overlap",
|
||||
"ignore_user_time_overlap",
|
||||
"ignore_employee_time_overlap",
|
||||
"fetch_timesheet_in_sales_invoice"
|
||||
"ignore_employee_time_overlap"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
@@ -34,18 +33,11 @@
|
||||
"fieldname": "ignore_employee_time_overlap",
|
||||
"fieldtype": "Check",
|
||||
"label": "Ignore Employee Time Overlap"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"description": "Enabling the check box will fetch timesheet on select of a Project in Sales Invoice",
|
||||
"fieldname": "fetch_timesheet_in_sales_invoice",
|
||||
"fieldtype": "Check",
|
||||
"label": "Fetch Timesheet in Sales Invoice"
|
||||
}
|
||||
],
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2025-02-13 23:01:27.321902",
|
||||
"modified": "2024-03-27 13:10:21.984404",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Projects",
|
||||
"name": "Projects Settings",
|
||||
|
||||
@@ -14,7 +14,6 @@ class ProjectsSettings(Document):
|
||||
if TYPE_CHECKING:
|
||||
from frappe.types import DF
|
||||
|
||||
fetch_timesheet_in_sales_invoice: DF.Check
|
||||
ignore_employee_time_overlap: DF.Check
|
||||
ignore_user_time_overlap: DF.Check
|
||||
ignore_workstation_time_overlap: DF.Check
|
||||
|
||||
@@ -53,7 +53,6 @@ class TestTimesheet(IntegrationTestCase):
|
||||
self.assertEqual(item.qty, 2.00)
|
||||
self.assertEqual(item.rate, 50.00)
|
||||
|
||||
@IntegrationTestCase.change_settings("Projects Settings", {"fetch_timesheet_in_sales_invoice": 1})
|
||||
def test_timesheet_billing_based_on_project(self):
|
||||
emp = make_employee("test_employee_6@salary.com")
|
||||
project = frappe.get_value("Project", {"project_name": "_Test Project"})
|
||||
@@ -63,7 +62,7 @@ class TestTimesheet(IntegrationTestCase):
|
||||
)
|
||||
sales_invoice = create_sales_invoice(do_not_save=True)
|
||||
sales_invoice.project = project
|
||||
sales_invoice.add_timesheet_data()
|
||||
sales_invoice._add_timesheet_data()
|
||||
sales_invoice.submit()
|
||||
|
||||
ts = frappe.get_doc("Timesheet", timesheet.name)
|
||||
|
||||
@@ -19,10 +19,6 @@ frappe.query_reports["Sales Order Analysis"] = {
|
||||
width: "80",
|
||||
reqd: 1,
|
||||
default: frappe.datetime.add_months(frappe.datetime.get_today(), -1),
|
||||
on_change: (report) => {
|
||||
report.set_filter_value("sales_order", []);
|
||||
report.refresh();
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldname: "to_date",
|
||||
@@ -31,10 +27,6 @@ frappe.query_reports["Sales Order Analysis"] = {
|
||||
width: "80",
|
||||
reqd: 1,
|
||||
default: frappe.datetime.get_today(),
|
||||
on_change: (report) => {
|
||||
report.set_filter_value("sales_order", []);
|
||||
report.refresh();
|
||||
},
|
||||
},
|
||||
{
|
||||
fieldname: "sales_order",
|
||||
@@ -43,13 +35,12 @@ frappe.query_reports["Sales Order Analysis"] = {
|
||||
width: "80",
|
||||
options: "Sales Order",
|
||||
get_data: function (txt) {
|
||||
let filters = { docstatus: 1 };
|
||||
|
||||
const from_date = frappe.query_report.get_filter_value("from_date");
|
||||
const to_date = frappe.query_report.get_filter_value("to_date");
|
||||
if (from_date && to_date) filters["transaction_date"] = ["between", [from_date, to_date]];
|
||||
|
||||
return frappe.db.get_link_options("Sales Order", txt, filters);
|
||||
return frappe.db.get_link_options("Sales Order", txt);
|
||||
},
|
||||
get_query: () => {
|
||||
return {
|
||||
filters: { docstatus: 1 },
|
||||
};
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -62,17 +53,10 @@ frappe.query_reports["Sales Order Analysis"] = {
|
||||
fieldname: "status",
|
||||
label: __("Status"),
|
||||
fieldtype: "MultiSelectList",
|
||||
options: ["To Pay", "To Bill", "To Deliver", "To Deliver and Bill", "Completed", "Closed"],
|
||||
options: ["To Pay", "To Bill", "To Deliver", "To Deliver and Bill", "Completed"],
|
||||
width: "80",
|
||||
get_data: function (txt) {
|
||||
let status = [
|
||||
"To Pay",
|
||||
"To Bill",
|
||||
"To Deliver",
|
||||
"To Deliver and Bill",
|
||||
"Completed",
|
||||
"Closed",
|
||||
];
|
||||
let status = ["To Pay", "To Bill", "To Deliver", "To Deliver and Bill", "Completed"];
|
||||
let options = [];
|
||||
for (let option of status) {
|
||||
options.push({
|
||||
|
||||
@@ -86,7 +86,7 @@ def get_data(conditions, filters):
|
||||
ON sii.so_detail = soi.name and sii.docstatus = 1
|
||||
WHERE
|
||||
soi.parent = so.name
|
||||
and so.status not in ('Stopped', 'On Hold')
|
||||
and so.status not in ('Stopped', 'Closed', 'On Hold')
|
||||
and so.docstatus = 1
|
||||
{conditions}
|
||||
GROUP BY soi.name
|
||||
|
||||
@@ -365,8 +365,6 @@ class DeprecatedBatchNoValuation:
|
||||
if self.sle.voucher_detail_no:
|
||||
query = query.where(sabb.voucher_detail_no != self.sle.voucher_detail_no)
|
||||
|
||||
query = query.where(sabb.voucher_type != "Pick List")
|
||||
|
||||
data = query.run(as_dict=True)
|
||||
if not data:
|
||||
return {}
|
||||
|
||||
@@ -247,7 +247,7 @@ def update_qty(bin_name, args):
|
||||
& (sle.warehouse == args.get("warehouse"))
|
||||
& (sle.is_cancelled == 0)
|
||||
)
|
||||
.orderby(sle.posting_datetime, order=Order.desc)
|
||||
.orderby(CombineDatetime(sle.posting_date, sle.posting_time), order=Order.desc)
|
||||
.orderby(sle.creation, order=Order.desc)
|
||||
.limit(1)
|
||||
.run()
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
from erpnext.stock.doctype.stock_ledger_entry.stock_ledger_entry import (
|
||||
on_doctype_update as create_sle_indexes,
|
||||
)
|
||||
|
||||
|
||||
def execute():
|
||||
"""Ensure SLE Indexes"""
|
||||
|
||||
create_sle_indexes()
|
||||
Reference in New Issue
Block a user