mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
Merge branch 'develop' into qc-back-update
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
"base_grand_total": 561.8,
|
"base_grand_total": 561.8,
|
||||||
"grand_total": 561.8,
|
"grand_total": 561.8,
|
||||||
"is_pos": 0,
|
"is_pos": 0,
|
||||||
"naming_series": "_T-Sales Invoice-",
|
"naming_series": "T-SINV-",
|
||||||
"base_net_total": 500.0,
|
"base_net_total": 500.0,
|
||||||
"taxes": [
|
"taxes": [
|
||||||
{
|
{
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
"base_grand_total": 630.0,
|
"base_grand_total": 630.0,
|
||||||
"grand_total": 630.0,
|
"grand_total": 630.0,
|
||||||
"is_pos": 0,
|
"is_pos": 0,
|
||||||
"naming_series": "_T-Sales Invoice-",
|
"naming_series": "T-SINV-",
|
||||||
"base_net_total": 500.0,
|
"base_net_total": 500.0,
|
||||||
"taxes": [
|
"taxes": [
|
||||||
{
|
{
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
],
|
],
|
||||||
"grand_total": 0,
|
"grand_total": 0,
|
||||||
"is_pos": 0,
|
"is_pos": 0,
|
||||||
"naming_series": "_T-Sales Invoice-",
|
"naming_series": "T-SINV-",
|
||||||
"taxes": [
|
"taxes": [
|
||||||
{
|
{
|
||||||
"account_head": "_Test Account Shipping Charges - _TC",
|
"account_head": "_Test Account Shipping Charges - _TC",
|
||||||
@@ -301,7 +301,7 @@
|
|||||||
],
|
],
|
||||||
"grand_total": 0,
|
"grand_total": 0,
|
||||||
"is_pos": 0,
|
"is_pos": 0,
|
||||||
"naming_series": "_T-Sales Invoice-",
|
"naming_series": "T-SINV-",
|
||||||
"taxes": [
|
"taxes": [
|
||||||
{
|
{
|
||||||
"account_head": "_Test Account Excise Duty - _TC",
|
"account_head": "_Test Account Excise Duty - _TC",
|
||||||
|
|||||||
@@ -2115,6 +2115,7 @@ def create_sales_invoice(**args):
|
|||||||
si.return_against = args.return_against
|
si.return_against = args.return_against
|
||||||
si.currency=args.currency or "INR"
|
si.currency=args.currency or "INR"
|
||||||
si.conversion_rate = args.conversion_rate or 1
|
si.conversion_rate = args.conversion_rate or 1
|
||||||
|
si.naming_series = args.naming_series or "T-SINV-"
|
||||||
|
|
||||||
si.append("items", {
|
si.append("items", {
|
||||||
"item_code": args.item or args.item_code or "_Test Item",
|
"item_code": args.item or args.item_code or "_Test Item",
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ frappe.ui.form.on('Salary Slip Timesheet', {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var set_totals = function(frm) {
|
var set_totals = function(frm) {
|
||||||
if (frm.doc.docstatus === 0) {
|
if (frm.doc.docstatus === 0 && frm.doc.doctype === "Salary Slip") {
|
||||||
if (frm.doc.earnings || frm.doc.deductions) {
|
if (frm.doc.earnings || frm.doc.deductions) {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "set_totals",
|
method: "set_totals",
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from __future__ import unicode_literals
|
|||||||
|
|
||||||
import frappe, os, json
|
import frappe, os, json
|
||||||
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
|
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
|
||||||
|
from frappe.custom.doctype.property_setter.property_setter import make_property_setter
|
||||||
from frappe.permissions import add_permission, update_permission_property
|
from frappe.permissions import add_permission, update_permission_property
|
||||||
from erpnext.regional.india import states
|
from erpnext.regional.india import states
|
||||||
from erpnext.accounts.utils import get_fiscal_year, FiscalYearError
|
from erpnext.accounts.utils import get_fiscal_year, FiscalYearError
|
||||||
@@ -18,6 +19,7 @@ def setup(company=None, patch=True):
|
|||||||
# TODO: for all countries
|
# TODO: for all countries
|
||||||
def setup_company_independent_fixtures():
|
def setup_company_independent_fixtures():
|
||||||
make_custom_fields()
|
make_custom_fields()
|
||||||
|
make_property_setters()
|
||||||
add_permissions()
|
add_permissions()
|
||||||
add_custom_roles_for_reports()
|
add_custom_roles_for_reports()
|
||||||
frappe.enqueue('erpnext.regional.india.setup.add_hsn_sac_codes', now=frappe.flags.in_test)
|
frappe.enqueue('erpnext.regional.india.setup.add_hsn_sac_codes', now=frappe.flags.in_test)
|
||||||
@@ -110,6 +112,11 @@ def add_print_formats():
|
|||||||
frappe.db.set_value("Print Format", "GST Tax Invoice", "disabled", 0)
|
frappe.db.set_value("Print Format", "GST Tax Invoice", "disabled", 0)
|
||||||
frappe.db.set_value("Print Format", "GST E-Invoice", "disabled", 0)
|
frappe.db.set_value("Print Format", "GST E-Invoice", "disabled", 0)
|
||||||
|
|
||||||
|
def make_property_setters():
|
||||||
|
# GST rules do not allow for an invoice no. bigger than 16 characters
|
||||||
|
make_property_setter('Sales Invoice', 'naming_series', 'options', 'SINV-.YY.-\nSRET-.YY.-', '')
|
||||||
|
make_property_setter('Purchase Invoice', 'naming_series', 'options', 'PINV-.YY.-\nPRET-.YY.-', '')
|
||||||
|
|
||||||
def make_custom_fields(update=True):
|
def make_custom_fields(update=True):
|
||||||
hsn_sac_field = dict(fieldname='gst_hsn_code', label='HSN/SAC',
|
hsn_sac_field = dict(fieldname='gst_hsn_code', label='HSN/SAC',
|
||||||
fieldtype='Data', fetch_from='item_code.gst_hsn_code', insert_after='description',
|
fieldtype='Data', fetch_from='item_code.gst_hsn_code', insert_after='description',
|
||||||
@@ -860,4 +867,4 @@ def create_gratuity_rule():
|
|||||||
})
|
})
|
||||||
|
|
||||||
rule.flags.ignore_mandatory = True
|
rule.flags.ignore_mandatory = True
|
||||||
rule.save()
|
rule.save()
|
||||||
|
|||||||
Reference in New Issue
Block a user