mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 05:39:12 +00:00
Merge branch 'develop'
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
__version__ = '7.0.7'
|
__version__ = '7.0.8'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
|||||||
@@ -251,8 +251,8 @@ class PaymentEntry(AccountsController):
|
|||||||
self.unallocated_amount = party_amount - self.total_allocated_amount
|
self.unallocated_amount = party_amount - self.total_allocated_amount
|
||||||
|
|
||||||
def set_difference_amount(self):
|
def set_difference_amount(self):
|
||||||
base_unallocated_amount = flt(self.unallocated_amount) * \
|
base_unallocated_amount = flt(self.unallocated_amount) * (flt(self.source_exchange_rate)
|
||||||
(self.source_exchange_rate if self.payment_type=="Receive" else self.target_exchange_rate)
|
if self.payment_type=="Receive" else flt(self.target_exchange_rate))
|
||||||
|
|
||||||
base_party_amount = flt(self.base_total_allocated_amount) + flt(base_unallocated_amount)
|
base_party_amount = flt(self.base_total_allocated_amount) + flt(base_unallocated_amount)
|
||||||
|
|
||||||
@@ -672,7 +672,7 @@ def get_payment_entry(dt, dn, party_amount=None, bank_account=None, bank_amount=
|
|||||||
|
|
||||||
pe.setup_party_account_field()
|
pe.setup_party_account_field()
|
||||||
pe.set_missing_values()
|
pe.set_missing_values()
|
||||||
if bank:
|
if party_account and bank:
|
||||||
pe.set_exchange_rate()
|
pe.set_exchange_rate()
|
||||||
pe.set_amounts()
|
pe.set_amounts()
|
||||||
return pe
|
return pe
|
||||||
@@ -304,3 +304,4 @@ erpnext.patches.v7_0.remove_administrator_role_in_doctypes
|
|||||||
erpnext.patches.v7_0.rename_fee_amount_to_fee_component
|
erpnext.patches.v7_0.rename_fee_amount_to_fee_component
|
||||||
erpnext.patches.v7_0.calculate_total_costing_amount
|
erpnext.patches.v7_0.calculate_total_costing_amount
|
||||||
erpnext.patches.v7_0.fix_nonwarehouse_ledger_gl_entries_for_transactions
|
erpnext.patches.v7_0.fix_nonwarehouse_ledger_gl_entries_for_transactions
|
||||||
|
execute:frappe.db.sql("""update `tabOpportunity` set status='Quotation' where status='Converted'""")
|
||||||
@@ -15,6 +15,8 @@ def execute():
|
|||||||
and (warehouse is null or warehouse = '')""")
|
and (warehouse is null or warehouse = '')""")
|
||||||
if warehouses:
|
if warehouses:
|
||||||
warehouses = set_warehouse_for_stock_account(warehouses)
|
warehouses = set_warehouse_for_stock_account(warehouses)
|
||||||
|
if not warehouses:
|
||||||
|
return
|
||||||
|
|
||||||
stock_vouchers = frappe.db.sql("""select distinct sle.voucher_type, sle.voucher_no
|
stock_vouchers = frappe.db.sql("""select distinct sle.voucher_type, sle.voucher_no
|
||||||
from `tabStock Ledger Entry` sle
|
from `tabStock Ledger Entry` sle
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ $.extend(erpnext, {
|
|||||||
|
|
||||||
setup_serial_no: function() {
|
setup_serial_no: function() {
|
||||||
var grid_row = cur_frm.open_grid_row();
|
var grid_row = cur_frm.open_grid_row();
|
||||||
if(!grid_row || !grid_row.fields_dict.serial_no ||
|
if(!grid_row || !grid_row.grid_form.fields_dict.serial_no ||
|
||||||
grid_row.fields_dict.serial_no.get_status()!=="Write") return;
|
grid_row.grid_form.fields_dict.serial_no.get_status()!=="Write") return;
|
||||||
|
|
||||||
var $btn = $('<button class="btn btn-sm btn-default">'+__("Add Serial No")+'</button>')
|
var $btn = $('<button class="btn btn-sm btn-default">'+__("Add Serial No")+'</button>')
|
||||||
.appendTo($("<div>")
|
.appendTo($("<div>")
|
||||||
.css({"margin-bottom": "10px", "margin-top": "10px"})
|
.css({"margin-bottom": "10px", "margin-top": "10px"})
|
||||||
.appendTo(grid_row.fields_dict.serial_no.$wrapper));
|
.appendTo(grid_row.grid_form.fields_dict.serial_no.$wrapper));
|
||||||
|
|
||||||
$btn.on("click", function() {
|
$btn.on("click", function() {
|
||||||
var d = new frappe.ui.Dialog({
|
var d = new frappe.ui.Dialog({
|
||||||
@@ -69,7 +69,7 @@ $.extend(erpnext, {
|
|||||||
var serial_no = d.get_value("serial_no");
|
var serial_no = d.get_value("serial_no");
|
||||||
if(serial_no) {
|
if(serial_no) {
|
||||||
var val = (grid_row.doc.serial_no || "").split("\n").concat([serial_no]).join("\n");
|
var val = (grid_row.doc.serial_no || "").split("\n").concat([serial_no]).join("\n");
|
||||||
grid_row.fields_dict.serial_no.set_model_value(val.trim());
|
grid_row.grid_form.fields_dict.serial_no.set_model_value(val.trim());
|
||||||
}
|
}
|
||||||
d.hide();
|
d.hide();
|
||||||
return false;
|
return false;
|
||||||
@@ -190,4 +190,4 @@ $(document).on('app_ready', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -394,6 +394,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "0",
|
||||||
"fieldname": "total_amount",
|
"fieldname": "total_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -419,7 +420,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"default": "",
|
"default": "0",
|
||||||
"fieldname": "paid_amount",
|
"fieldname": "paid_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -445,6 +446,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"default": "0",
|
||||||
"fieldname": "outstanding_amount",
|
"fieldname": "outstanding_amount",
|
||||||
"fieldtype": "Currency",
|
"fieldtype": "Currency",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -478,7 +480,7 @@
|
|||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"menu_index": 0,
|
"menu_index": 0,
|
||||||
"modified": "2016-07-25 08:44:33.595812",
|
"modified": "2016-07-27 03:52:28.509757",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Schools",
|
"module": "Schools",
|
||||||
"name": "Fees",
|
"name": "Fees",
|
||||||
|
|||||||
@@ -14,8 +14,9 @@ class Fees(Document):
|
|||||||
def calculate_total(self):
|
def calculate_total(self):
|
||||||
"""Calculates total amount."""
|
"""Calculates total amount."""
|
||||||
self.total_amount = 0
|
self.total_amount = 0
|
||||||
for d in self.amount:
|
for d in self.components:
|
||||||
self.total_amount += d.amount
|
self.total_amount += d.amount
|
||||||
|
self.outstanding_amount = self.total_amount
|
||||||
|
|
||||||
def get_fee_list(doctype, txt, filters, limit_start, limit_page_length=20):
|
def get_fee_list(doctype, txt, filters, limit_start, limit_page_length=20):
|
||||||
user = frappe.session.user
|
user = frappe.session.user
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ class update_entries_after(object):
|
|||||||
|
|
||||||
self.valuation_rate = new_stock_value / new_stock_qty
|
self.valuation_rate = new_stock_value / new_stock_qty
|
||||||
else:
|
else:
|
||||||
self.valuation_rate = self.outgoing_rate
|
self.valuation_rate = sle.outgoing_rate
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if flt(self.qty_after_transaction) >= 0 and sle.outgoing_rate:
|
if flt(self.qty_after_transaction) >= 0 and sle.outgoing_rate:
|
||||||
|
|||||||
Reference in New Issue
Block a user