Compare commits
11 Commits
rohitwaghc
...
v15.17.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33185e0a3b | ||
|
|
0e4e0b3084 | ||
|
|
a5e6763be5 | ||
|
|
26a1d84935 | ||
|
|
40752c1f5c | ||
|
|
0ad203ab89 | ||
|
|
605132a31c | ||
|
|
f932265218 | ||
|
|
2a40808b05 | ||
|
|
d6e87f3f17 | ||
|
|
91af7c033a |
@@ -3,7 +3,7 @@ import inspect
|
|||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
__version__ = "15.16.2"
|
__version__ = "15.17.0"
|
||||||
|
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
|
|||||||
@@ -410,11 +410,11 @@ class Subscription(Document):
|
|||||||
# Earlier subscription didn't had any company field
|
# Earlier subscription didn't had any company field
|
||||||
company = self.get("company") or get_default_company()
|
company = self.get("company") or get_default_company()
|
||||||
if not company:
|
if not company:
|
||||||
# fmt: off
|
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Company is mandatory was generating invoice. Please set default company in Global Defaults.")
|
_(
|
||||||
|
"Company is mandatory for generating an invoice. Please set a default company in Global Defaults."
|
||||||
|
)
|
||||||
)
|
)
|
||||||
# fmt: on
|
|
||||||
|
|
||||||
invoice = frappe.new_doc(self.invoice_document_type)
|
invoice = frappe.new_doc(self.invoice_document_type)
|
||||||
invoice.company = company
|
invoice.company = company
|
||||||
|
|||||||
@@ -665,7 +665,7 @@ def get_filtered_dimensions(
|
|||||||
searchfields = frappe.get_meta(doctype).get_search_fields()
|
searchfields = frappe.get_meta(doctype).get_search_fields()
|
||||||
|
|
||||||
meta = frappe.get_meta(doctype)
|
meta = frappe.get_meta(doctype)
|
||||||
if meta.is_tree:
|
if meta.is_tree and meta.has_field("is_group"):
|
||||||
query_filters.append(["is_group", "=", 0])
|
query_filters.append(["is_group", "=", 0])
|
||||||
|
|
||||||
if meta.has_field("disabled"):
|
if meta.has_field("disabled"):
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ class JobCard(Document):
|
|||||||
if not self.has_overlap(production_capacity, time_logs):
|
if not self.has_overlap(production_capacity, time_logs):
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
if self.workstation_type and time_logs:
|
if not self.workstation and self.workstation_type and time_logs:
|
||||||
if workstation_time := self.get_workstation_based_on_available_slot(time_logs):
|
if workstation_time := self.get_workstation_based_on_available_slot(time_logs):
|
||||||
self.workstation = workstation_time.get("workstation")
|
self.workstation = workstation_time.get("workstation")
|
||||||
return workstation_time
|
return workstation_time
|
||||||
@@ -420,7 +420,7 @@ class JobCard(Document):
|
|||||||
if not workstation_doc.working_hours or cint(
|
if not workstation_doc.working_hours or cint(
|
||||||
frappe.db.get_single_value("Manufacturing Settings", "allow_overtime")
|
frappe.db.get_single_value("Manufacturing Settings", "allow_overtime")
|
||||||
):
|
):
|
||||||
if get_datetime(row.planned_end_time) < get_datetime(row.planned_start_time):
|
if get_datetime(row.planned_end_time) <= get_datetime(row.planned_start_time):
|
||||||
row.planned_end_time = add_to_date(row.planned_start_time, minutes=row.time_in_mins)
|
row.planned_end_time = add_to_date(row.planned_start_time, minutes=row.time_in_mins)
|
||||||
row.remaining_time_in_mins = 0.0
|
row.remaining_time_in_mins = 0.0
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -52,10 +52,10 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-1">
|
<div class="col-sm-1">
|
||||||
<button style="margin-left: 7px;" class="btn btn-default btn-xs btn-add" data-item-code="{{ escape(row.item_code) }}">Add</button>
|
<button style="margin-left: 7px;" class="btn btn-default btn-xs btn-add" data-item-code="{{ escape(row.item_code) }}">{{ __("Add") }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-1">
|
<div class="col-sm-1">
|
||||||
<button style="margin-left: 7px;" class="btn btn-default btn-xs btn-move" data-item-code="{{ escape(row.item_code) }}">Move</button>
|
<button style="margin-left: 7px;" class="btn btn-default btn-xs btn-move" data-item-code="{{ escape(row.item_code) }}">{{ __("Move") }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% }); %}
|
{% }); %}
|
||||||
@@ -330,6 +330,13 @@ class WorkOrder(Document):
|
|||||||
else:
|
else:
|
||||||
status = "Cancelled"
|
status = "Cancelled"
|
||||||
|
|
||||||
|
if (
|
||||||
|
self.skip_transfer
|
||||||
|
and self.produced_qty
|
||||||
|
and self.qty > (flt(self.produced_qty) + flt(self.process_loss_qty))
|
||||||
|
):
|
||||||
|
status = "In Process"
|
||||||
|
|
||||||
return status
|
return status
|
||||||
|
|
||||||
def update_work_order_qty(self):
|
def update_work_order_qty(self):
|
||||||
@@ -784,7 +791,7 @@ class WorkOrder(Document):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def update_completed_qty_in_material_request(self):
|
def update_completed_qty_in_material_request(self):
|
||||||
if self.material_request:
|
if self.material_request and self.material_request_item:
|
||||||
frappe.get_doc("Material Request", self.material_request).update_completed_qty(
|
frappe.get_doc("Material Request", self.material_request).update_completed_qty(
|
||||||
[self.material_request_item]
|
[self.material_request_item]
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2219,7 +2219,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.frm.doc.items.forEach(item => {
|
this.frm.doc.items.forEach(item => {
|
||||||
if (!item.quality_inspection) {
|
if (this.has_inspection_required(item)) {
|
||||||
let dialog_items = dialog.fields_dict.items;
|
let dialog_items = dialog.fields_dict.items;
|
||||||
dialog_items.df.data.push({
|
dialog_items.df.data.push({
|
||||||
"docname": item.name,
|
"docname": item.name,
|
||||||
@@ -2243,6 +2243,16 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
has_inspection_required(item) {
|
||||||
|
if (this.frm.doc.doctype === "Stock Entry" && this.frm.doc.purpose == "Manufacture" ) {
|
||||||
|
if (item.is_finished_item && !item.quality_inspection) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} else if (!item.quality_inspection) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
get_method_for_payment() {
|
get_method_for_payment() {
|
||||||
var method = "erpnext.accounts.doctype.payment_entry.payment_entry.get_payment_entry";
|
var method = "erpnext.accounts.doctype.payment_entry.payment_entry.get_payment_entry";
|
||||||
if(cur_frm.doc.__onload && cur_frm.doc.__onload.make_payment_via_journal_entry){
|
if(cur_frm.doc.__onload && cur_frm.doc.__onload.make_payment_via_journal_entry){
|
||||||
|
|||||||
@@ -2064,6 +2064,7 @@ class StockEntry(StockController):
|
|||||||
as_dict=1,
|
as_dict=1,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
precision = frappe.get_precision("Stock Entry Detail", "qty")
|
||||||
for key, row in available_materials.items():
|
for key, row in available_materials.items():
|
||||||
remaining_qty_to_produce = flt(wo_data.trans_qty) - flt(wo_data.produced_qty)
|
remaining_qty_to_produce = flt(wo_data.trans_qty) - flt(wo_data.produced_qty)
|
||||||
if remaining_qty_to_produce <= 0 and not self.is_return:
|
if remaining_qty_to_produce <= 0 and not self.is_return:
|
||||||
@@ -2086,7 +2087,8 @@ class StockEntry(StockController):
|
|||||||
serial_nos = row.serial_nos[0 : cint(qty)]
|
serial_nos = row.serial_nos[0 : cint(qty)]
|
||||||
row.serial_nos = serial_nos
|
row.serial_nos = serial_nos
|
||||||
|
|
||||||
self.update_item_in_stock_entry_detail(row, item, qty)
|
if flt(qty, precision) != 0.0:
|
||||||
|
self.update_item_in_stock_entry_detail(row, item, qty)
|
||||||
|
|
||||||
def update_batches_to_be_consume(self, batches, row, qty):
|
def update_batches_to_be_consume(self, batches, row, qty):
|
||||||
qty_to_be_consumed = qty
|
qty_to_be_consumed = qty
|
||||||
|
|||||||
Reference in New Issue
Block a user