Compare commits
206 Commits
v11.0.3-be
...
v11.0.3-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96a2f00c07 | ||
|
|
675636cd03 | ||
|
|
0c42f99b6f | ||
|
|
56bf39bfea | ||
|
|
65797bca64 | ||
|
|
1a41929c6b | ||
|
|
a97a520aa8 | ||
|
|
b5ba867b3f | ||
|
|
9eafe8c23e | ||
|
|
614b042ed3 | ||
|
|
0fb943181e | ||
|
|
d6b664f7ee | ||
|
|
1b2ceadc93 | ||
|
|
0d08da50c6 | ||
|
|
3e6663d47e | ||
|
|
a22e16dbe3 | ||
|
|
4a6768791b | ||
|
|
5ed0257ce2 | ||
|
|
4a75d58d89 | ||
|
|
eeb66dfc8e | ||
|
|
59f16bc942 | ||
|
|
6a206225cb | ||
|
|
d14e46ef02 | ||
|
|
e77f38e7e2 | ||
|
|
598d34445f | ||
|
|
68dbf7f99c | ||
|
|
c1d255e7bc | ||
|
|
16d45c8e2e | ||
|
|
768513f2f9 | ||
|
|
dcb71a61ad | ||
|
|
a89bce0b6e | ||
|
|
ab9852d31a | ||
|
|
9f931780a2 | ||
|
|
92a4ff4e81 | ||
|
|
46e618bc6e | ||
|
|
9f20f777b2 | ||
|
|
961849beb4 | ||
|
|
3f32218bc0 | ||
|
|
b4bff7e298 | ||
|
|
78b273af43 | ||
|
|
41c5fda196 | ||
|
|
305c82bd8d | ||
|
|
cd11bdfdbb | ||
|
|
0c0e49a421 | ||
|
|
3f398d24f3 | ||
|
|
e3a7c68d4f | ||
|
|
f01bf9048d | ||
|
|
71ede099ea | ||
|
|
d45fef5423 | ||
|
|
6178b79555 | ||
|
|
d9a82738d0 | ||
|
|
1f7a5dcd07 | ||
|
|
452619c668 | ||
|
|
dca4b294bd | ||
|
|
152a0c86b0 | ||
|
|
85a9b52dfa | ||
|
|
69bbe1995c | ||
|
|
9d0dba5569 | ||
|
|
7b91f9fa0c | ||
|
|
3df1327b94 | ||
|
|
81cdd967d7 | ||
|
|
4d47c63db1 | ||
|
|
9750d5c184 | ||
|
|
6adcfa6032 | ||
|
|
3643e7b1b4 | ||
|
|
38eaaade89 | ||
|
|
2a98e59bd4 | ||
|
|
03348364e9 | ||
|
|
881bb4646b | ||
|
|
4293d17602 | ||
|
|
ca66c7ba14 | ||
|
|
83fd31973f | ||
|
|
ac64b39562 | ||
|
|
c73c576536 | ||
|
|
669c5d0298 | ||
|
|
d3e3c1ba72 | ||
|
|
55416e08f1 | ||
|
|
1b105e2575 | ||
|
|
60d8a0da1e | ||
|
|
9db75ecde2 | ||
|
|
635d4dbebe | ||
|
|
cf076f4692 | ||
|
|
034429b34d | ||
|
|
a0e533ede5 | ||
|
|
874866e9f9 | ||
|
|
c365ce8f21 | ||
|
|
3a11f34355 | ||
|
|
91eac5a7cf | ||
|
|
aef7a6ec44 | ||
|
|
ac6e3a69f9 | ||
|
|
473437931c | ||
|
|
4215b85e46 | ||
|
|
7e97230c92 | ||
|
|
bbfdc13ab7 | ||
|
|
6192d24235 | ||
|
|
24fe7286fc | ||
|
|
5d1171678e | ||
|
|
991c121b57 | ||
|
|
23ec18e3e4 | ||
|
|
b4cf72c770 | ||
|
|
3c9155e406 | ||
|
|
25edac451d | ||
|
|
25e9db5e81 | ||
|
|
500ddc94c7 | ||
|
|
7a7615ed66 | ||
|
|
007fbfbfb7 | ||
|
|
e2afbb7abe | ||
|
|
961b7dee9d | ||
|
|
a7a32d7400 | ||
|
|
77b60928bf | ||
|
|
bbd8b04012 | ||
|
|
bb1b6b42e2 | ||
|
|
4fdbff7456 | ||
|
|
0cbb9b54fa | ||
|
|
8e71074e1c | ||
|
|
e45868a3c6 | ||
|
|
ff0deedca9 | ||
|
|
22731e39ba | ||
|
|
bfb88f7839 | ||
|
|
82660913a5 | ||
|
|
8aca56836b | ||
|
|
19be730b9c | ||
|
|
a5a926967b | ||
|
|
666e6e665b | ||
|
|
4bb90add1d | ||
|
|
44ec05f79b | ||
|
|
615571dd21 | ||
|
|
7844b79274 | ||
|
|
7c443264a4 | ||
|
|
10dfd4a48f | ||
|
|
3185b37360 | ||
|
|
8d0195246d | ||
|
|
4fa58359c8 | ||
|
|
102eb998ac | ||
|
|
3c29967d27 | ||
|
|
ea75295bb3 | ||
|
|
d2c643eb0b | ||
|
|
94fcb0e9f9 | ||
|
|
2a966f26af | ||
|
|
741bd29b74 | ||
|
|
0d2a4c6a59 | ||
|
|
42510a411f | ||
|
|
3362d6b948 | ||
|
|
8c62ab4af0 | ||
|
|
314c97cbf1 | ||
|
|
a16f0f4423 | ||
|
|
64b6421fce | ||
|
|
6c743bebf2 | ||
|
|
50447b195d | ||
|
|
e9890a3ec8 | ||
|
|
4833b4c274 | ||
|
|
a398d6bf4f | ||
|
|
dc279ded15 | ||
|
|
d791af8331 | ||
|
|
b1241caf48 | ||
|
|
b6a735e021 | ||
|
|
785f1aa96d | ||
|
|
2291323c65 | ||
|
|
1cb1074f6b | ||
|
|
d92f3ac480 | ||
|
|
dd87e0f1e2 | ||
|
|
4cfff7829b | ||
|
|
3855156b7d | ||
|
|
14c6ab0ee9 | ||
|
|
6a8957b430 | ||
|
|
62592d3c44 | ||
|
|
fd9c451909 | ||
|
|
d1fbaf8f32 | ||
|
|
275ef826a4 | ||
|
|
8b1133cb24 | ||
|
|
d080a17961 | ||
|
|
e64dcfc2f9 | ||
|
|
e895845ae1 | ||
|
|
523f77e82b | ||
|
|
dcf7401104 | ||
|
|
143d4da901 | ||
|
|
c24d2fdf6c | ||
|
|
a259466643 | ||
|
|
0309bbee30 | ||
|
|
796bffbee1 | ||
|
|
4c07970545 | ||
|
|
fa7c8a9f8b | ||
|
|
99c064305f | ||
|
|
75c1682e61 | ||
|
|
2dc8972794 | ||
|
|
f786eccdf9 | ||
|
|
a1036ad50b | ||
|
|
8a4bcefec4 | ||
|
|
5b34d00bc0 | ||
|
|
d2c5b50842 | ||
|
|
cf91f34ffa | ||
|
|
563b1d153b | ||
|
|
ecba14e6cf | ||
|
|
ee3b788024 | ||
|
|
b509b06edf | ||
|
|
87441bf62e | ||
|
|
5fcccda883 | ||
|
|
4fb9230d16 | ||
|
|
95d93913ce | ||
|
|
37d3686372 | ||
|
|
8cafb5fbbb | ||
|
|
0bd254b02b | ||
|
|
5e466bace4 | ||
|
|
c2857fd2cc | ||
|
|
063cf9c582 | ||
|
|
423549e084 |
@@ -5,7 +5,7 @@ import frappe
|
||||
from erpnext.hooks import regional_overrides
|
||||
from frappe.utils import getdate
|
||||
|
||||
__version__ = '10.1.56'
|
||||
__version__ = '10.1.68'
|
||||
|
||||
def get_default_company(user=None):
|
||||
'''Get default company for user'''
|
||||
|
||||
@@ -16,10 +16,11 @@ import copy
|
||||
class BankStatementTransactionEntry(Document):
|
||||
def autoname(self):
|
||||
self.name = self.bank_account + "-" + self.from_date + "-" + self.to_date
|
||||
mapper_name = self.bank + "-Statement-Settings"
|
||||
if not frappe.db.exists("Bank Statement Settings", mapper_name):
|
||||
self.create_settings(self.bank)
|
||||
self.bank_settings = mapper_name
|
||||
if self.bank:
|
||||
mapper_name = self.bank + "-Statement-Settings"
|
||||
if not frappe.db.exists("Bank Statement Settings", mapper_name):
|
||||
self.create_settings(self.bank)
|
||||
self.bank_settings = mapper_name
|
||||
|
||||
def create_settings(self, bank):
|
||||
mapper = frappe.new_doc("Bank Statement Settings")
|
||||
|
||||
@@ -807,15 +807,25 @@ frappe.ui.form.on('Payment Entry', {
|
||||
var write_off_row = $.map(frm.doc["deductions"] || [], function(t) {
|
||||
return t.account==r.message[account] ? t : null; });
|
||||
|
||||
if (!write_off_row.length) {
|
||||
var row = frm.add_child("deductions");
|
||||
var row = [];
|
||||
|
||||
var difference_amount = flt(frm.doc.difference_amount,
|
||||
precision("difference_amount"));
|
||||
|
||||
if (!write_off_row.length && difference_amount) {
|
||||
row = frm.add_child("deductions");
|
||||
row.account = r.message[account];
|
||||
row.cost_center = r.message["cost_center"];
|
||||
} else {
|
||||
var row = write_off_row[0];
|
||||
row = write_off_row[0];
|
||||
}
|
||||
|
||||
if (row) {
|
||||
row.amount = flt(row.amount) + difference_amount;
|
||||
} else {
|
||||
frappe.msgprint(__("No gain or loss in the exchange rate"))
|
||||
}
|
||||
|
||||
row.amount = flt(row.amount) + flt(frm.doc.difference_amount);
|
||||
refresh_field("deductions");
|
||||
|
||||
frm.events.set_unallocated_amount(frm);
|
||||
|
||||
@@ -123,7 +123,7 @@ class PaymentRequest(Document):
|
||||
"reference_doctype": "Payment Request",
|
||||
"reference_docname": self.name,
|
||||
"payer_email": self.email_to or frappe.session.user,
|
||||
"payer_name": data.customer_name,
|
||||
"payer_name": frappe.safe_encode(data.customer_name),
|
||||
"order_id": self.name,
|
||||
"currency": self.currency
|
||||
})
|
||||
|
||||
@@ -61,11 +61,11 @@ class PurchaseInvoice(BuyingController):
|
||||
|
||||
self.validate_posting_time()
|
||||
|
||||
super(PurchaseInvoice, self).validate()
|
||||
|
||||
# apply tax withholding only if checked and applicable
|
||||
self.set_tax_withholding()
|
||||
|
||||
super(PurchaseInvoice, self).validate()
|
||||
|
||||
if not self.is_return:
|
||||
self.po_required()
|
||||
self.pr_required()
|
||||
@@ -123,6 +123,7 @@ class PurchaseInvoice(BuyingController):
|
||||
def set_missing_values(self, for_validate=False):
|
||||
if not self.credit_to:
|
||||
self.credit_to = get_party_account("Supplier", self.supplier, self.company)
|
||||
self.party_account_currency = frappe.db.get_value("Account", self.credit_to, "account_currency", cache=True)
|
||||
if not self.due_date:
|
||||
self.due_date = get_due_date(self.posting_date, "Supplier", self.supplier, self.company, self.bill_date)
|
||||
|
||||
@@ -208,7 +209,8 @@ class PurchaseInvoice(BuyingController):
|
||||
if self.update_stock:
|
||||
self.validate_item_code()
|
||||
self.validate_warehouse()
|
||||
warehouse_account = get_warehouse_account_map()
|
||||
if auto_accounting_for_stock:
|
||||
warehouse_account = get_warehouse_account_map()
|
||||
|
||||
for item in self.get("items"):
|
||||
# in case of auto inventory accounting,
|
||||
@@ -377,7 +379,10 @@ class PurchaseInvoice(BuyingController):
|
||||
return gl_entries
|
||||
|
||||
def make_supplier_gl_entry(self, gl_entries):
|
||||
grand_total = self.rounded_total or self.grand_total
|
||||
# Checked both rounding_adjustment and rounded_total
|
||||
# because rounded_total had value even before introcution of posting GLE based on rounded total
|
||||
grand_total = self.rounded_total if (self.rounding_adjustment and self.rounded_total) else self.grand_total
|
||||
|
||||
if grand_total:
|
||||
# Didnot use base_grand_total to book rounding loss gle
|
||||
grand_total_in_company_currency = flt(grand_total * self.conversion_rate,
|
||||
@@ -401,7 +406,8 @@ class PurchaseInvoice(BuyingController):
|
||||
# item gl entries
|
||||
stock_items = self.get_stock_items()
|
||||
expenses_included_in_valuation = self.get_company_default("expenses_included_in_valuation")
|
||||
warehouse_account = get_warehouse_account_map()
|
||||
if self.update_stock and self.auto_accounting_for_stock:
|
||||
warehouse_account = get_warehouse_account_map()
|
||||
|
||||
voucher_wise_stock_value = {}
|
||||
if self.update_stock:
|
||||
@@ -833,6 +839,9 @@ class PurchaseInvoice(BuyingController):
|
||||
if not accounts or tax_withholding_details.get("account_head") not in accounts:
|
||||
self.append("taxes", tax_withholding_details)
|
||||
|
||||
# calculate totals again after applying TDS
|
||||
self.calculate_taxes_and_totals()
|
||||
|
||||
@frappe.whitelist()
|
||||
def make_debit_note(source_name, target_doc=None):
|
||||
from erpnext.controllers.sales_and_purchase_return import make_return_doc
|
||||
|
||||
@@ -310,6 +310,7 @@ class SalesInvoice(SellingController):
|
||||
|
||||
if not self.debit_to:
|
||||
self.debit_to = get_party_account("Customer", self.customer, self.company)
|
||||
self.party_account_currency = frappe.db.get_value("Account", self.debit_to, "account_currency", cache=True)
|
||||
if not self.due_date and self.customer:
|
||||
self.due_date = get_due_date(self.posting_date, "Customer", self.customer, self.company)
|
||||
|
||||
@@ -715,7 +716,9 @@ class SalesInvoice(SellingController):
|
||||
return gl_entries
|
||||
|
||||
def make_customer_gl_entry(self, gl_entries):
|
||||
grand_total = self.rounded_total or self.grand_total
|
||||
# Checked both rounding_adjustment and rounded_total
|
||||
# because rounded_total had value even before introcution of posting GLE based on rounded total
|
||||
grand_total = self.rounded_total if (self.rounding_adjustment and self.rounded_total) else self.grand_total
|
||||
if grand_total:
|
||||
# Didnot use base_grand_total to book rounding loss gle
|
||||
grand_total_in_company_currency = flt(grand_total * self.conversion_rate,
|
||||
@@ -744,9 +747,11 @@ class SalesInvoice(SellingController):
|
||||
self.get_gl_dict({
|
||||
"account": tax.account_head,
|
||||
"against": self.customer,
|
||||
"credit": flt(tax.base_tax_amount_after_discount_amount),
|
||||
"credit_in_account_currency": flt(tax.base_tax_amount_after_discount_amount) \
|
||||
if account_currency==self.company_currency else flt(tax.tax_amount_after_discount_amount),
|
||||
"credit": flt(tax.base_tax_amount_after_discount_amount,
|
||||
tax.precision("tax_amount_after_discount_amount")),
|
||||
"credit_in_account_currency": (flt(tax.base_tax_amount_after_discount_amount,
|
||||
tax.precision("base_tax_amount_after_discount_amount")) if account_currency==self.company_currency else
|
||||
flt(tax.tax_amount_after_discount_amount, tax.precision("tax_amount_after_discount_amount"))),
|
||||
"cost_center": tax.cost_center
|
||||
}, account_currency)
|
||||
)
|
||||
@@ -754,7 +759,7 @@ class SalesInvoice(SellingController):
|
||||
def make_item_gl_entries(self, gl_entries):
|
||||
# income account gl entries
|
||||
for item in self.get("items"):
|
||||
if flt(item.base_net_amount):
|
||||
if flt(item.base_net_amount, item.precision("base_net_amount")):
|
||||
if item.is_fixed_asset:
|
||||
asset = frappe.get_doc("Asset", item.asset)
|
||||
|
||||
@@ -771,9 +776,10 @@ class SalesInvoice(SellingController):
|
||||
self.get_gl_dict({
|
||||
"account": item.income_account if not item.enable_deferred_revenue else item.deferred_revenue_account,
|
||||
"against": self.customer,
|
||||
"credit": item.base_net_amount,
|
||||
"credit_in_account_currency": item.base_net_amount \
|
||||
if account_currency==self.company_currency else item.net_amount,
|
||||
"credit": flt(item.base_net_amount, item.precision("base_net_amount")),
|
||||
"credit_in_account_currency": (flt(item.base_net_amount, item.precision("base_net_amount"))
|
||||
if account_currency==self.company_currency
|
||||
else flt(item.net_amount, item.precision("net_amount"))),
|
||||
"cost_center": item.cost_center
|
||||
}, account_currency)
|
||||
)
|
||||
@@ -872,7 +878,7 @@ class SalesInvoice(SellingController):
|
||||
|
||||
def make_write_off_gl_entry(self, gl_entries):
|
||||
# write off entries, applicable if only pos
|
||||
if self.write_off_account and self.write_off_amount:
|
||||
if self.write_off_account and flt(self.write_off_amount, self.precision("write_off_amount")):
|
||||
write_off_account_currency = get_account_currency(self.write_off_account)
|
||||
default_cost_center = frappe.get_cached_value('Company', self.company, 'cost_center')
|
||||
|
||||
@@ -882,10 +888,11 @@ class SalesInvoice(SellingController):
|
||||
"party_type": "Customer",
|
||||
"party": self.customer,
|
||||
"against": self.write_off_account,
|
||||
"credit": self.base_write_off_amount,
|
||||
"credit_in_account_currency": self.base_write_off_amount \
|
||||
if self.party_account_currency==self.company_currency else self.write_off_amount,
|
||||
"against_voucher": self.return_against if cint(self.is_return) and self.return_against else self.name,
|
||||
"credit": flt(self.base_write_off_amount, self.precision("base_write_off_amount")),
|
||||
"credit_in_account_currency": (flt(self.base_write_off_amount,
|
||||
self.precision("base_write_off_amount")) if self.party_account_currency==self.company_currency
|
||||
else flt(self.write_off_amount, self.precision("write_off_amount"))),
|
||||
"against_voucher": self.return_against if cint(self.is_return) else self.name,
|
||||
"against_voucher_type": self.doctype,
|
||||
"cost_center": self.cost_center
|
||||
}, self.party_account_currency)
|
||||
@@ -894,15 +901,16 @@ class SalesInvoice(SellingController):
|
||||
self.get_gl_dict({
|
||||
"account": self.write_off_account,
|
||||
"against": self.customer,
|
||||
"debit": self.base_write_off_amount,
|
||||
"debit_in_account_currency": self.base_write_off_amount \
|
||||
if write_off_account_currency==self.company_currency else self.write_off_amount,
|
||||
"debit": flt(self.base_write_off_amount, self.precision("base_write_off_amount")),
|
||||
"debit_in_account_currency": (flt(self.base_write_off_amount,
|
||||
self.precision("base_write_off_amount")) if write_off_account_currency==self.company_currency
|
||||
else flt(self.write_off_amount, self.precision("write_off_amount"))),
|
||||
"cost_center": self.cost_center or self.write_off_cost_center or default_cost_center
|
||||
}, write_off_account_currency)
|
||||
)
|
||||
|
||||
def make_gle_for_rounding_adjustment(self, gl_entries):
|
||||
if self.rounding_adjustment:
|
||||
if flt(self.rounding_adjustment, self.precision("rounding_adjustment")):
|
||||
round_off_account, round_off_cost_center = \
|
||||
get_round_off_account_and_cost_center(self.company)
|
||||
|
||||
@@ -910,8 +918,10 @@ class SalesInvoice(SellingController):
|
||||
self.get_gl_dict({
|
||||
"account": round_off_account,
|
||||
"against": self.customer,
|
||||
"credit_in_account_currency": self.base_rounding_adjustment,
|
||||
"credit": self.base_rounding_adjustment,
|
||||
"credit_in_account_currency": flt(self.rounding_adjustment,
|
||||
self.precision("rounding_adjustment")),
|
||||
"credit": flt(self.base_rounding_adjustment,
|
||||
self.precision("base_rounding_adjustment")),
|
||||
"cost_center": self.cost_center or round_off_cost_center,
|
||||
}
|
||||
))
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
|
||||
// For license information, please see license.txt
|
||||
@@ -1,129 +0,0 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"autoname": "field:subscriber_name",
|
||||
"beta": 0,
|
||||
"creation": "2018-02-24 11:17:46.809140",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "customer",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Customer",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Customer",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fetch_from": "customer.customer_name",
|
||||
"fieldname": "subscriber_name",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Subscriber Name",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 1
|
||||
}
|
||||
],
|
||||
"has_web_view": 0,
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-07-11 15:13:30.056470",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Subscriber",
|
||||
"name_case": "",
|
||||
"owner": "Administrator",
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "System Manager",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
from frappe.model.document import Document
|
||||
|
||||
class Subscriber(Document):
|
||||
pass
|
||||
@@ -1,14 +0,0 @@
|
||||
from frappe import _
|
||||
|
||||
def get_data():
|
||||
return {
|
||||
'heatmap': True,
|
||||
'heatmap_message': _('This is based on transactions against this Subscriber. See timeline below for details'),
|
||||
'fieldname': 'subscriber',
|
||||
'transactions': [
|
||||
{
|
||||
'label': _('Subscriptions'),
|
||||
'items': ['Subscription']
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -20,7 +21,7 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "subscriber",
|
||||
"fieldname": "customer",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
@@ -29,10 +30,10 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Subscriber",
|
||||
"label": "Customer",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Subscriber",
|
||||
"options": "Customer",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
@@ -437,6 +438,38 @@
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "generate_invoice_at_period_start",
|
||||
"fieldtype": "Check",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Generate Invoice At Beginning Of Period",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
@@ -814,7 +847,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-08-21 16:15:44.533482",
|
||||
"modified": "2018-10-14 10:38:55.545540",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Subscription",
|
||||
@@ -890,4 +923,4 @@
|
||||
"track_changes": 1,
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ class Subscription(Document):
|
||||
invoice = frappe.new_doc('Sales Invoice')
|
||||
invoice.set_posting_time = 1
|
||||
invoice.posting_date = self.current_invoice_start
|
||||
invoice.customer = self.get_customer(self.subscriber)
|
||||
invoice.customer = self.customer
|
||||
|
||||
# Subscription is better suited for service items. I won't update `update_stock`
|
||||
# for that reason
|
||||
@@ -282,13 +282,6 @@ class Subscription(Document):
|
||||
|
||||
return invoice
|
||||
|
||||
@staticmethod
|
||||
def get_customer(subscriber_name):
|
||||
"""
|
||||
Returns the `Customer` linked to the `Subscriber`
|
||||
"""
|
||||
return frappe.db.get_value('Subscriber', subscriber_name, 'customer')
|
||||
|
||||
def get_items_from_plans(self, plans, prorate=0):
|
||||
"""
|
||||
Returns the `Item`s linked to `Subscription Plan`
|
||||
@@ -297,7 +290,7 @@ class Subscription(Document):
|
||||
prorate_factor = get_prorata_factor(self.current_invoice_end, self.current_invoice_start)
|
||||
|
||||
items = []
|
||||
customer = self.get_customer(self.subscriber)
|
||||
customer = self.customer
|
||||
for plan in plans:
|
||||
item_code = frappe.db.get_value("Subscription Plan", plan.plan, "item")
|
||||
if not prorate:
|
||||
@@ -321,6 +314,23 @@ class Subscription(Document):
|
||||
|
||||
self.save()
|
||||
|
||||
@property
|
||||
def is_postpaid_to_invoice(self):
|
||||
return getdate(nowdate()) > getdate(self.current_invoice_end) or \
|
||||
(getdate(nowdate()) >= getdate(self.current_invoice_end) and getdate(self.current_invoice_end) == getdate(self.current_invoice_start)) and \
|
||||
not self.has_outstanding_invoice()
|
||||
|
||||
@property
|
||||
def is_prepaid_to_invoice(self):
|
||||
if not self.generate_invoice_at_period_start:
|
||||
return False
|
||||
|
||||
if self.is_new_subscription():
|
||||
return True
|
||||
|
||||
# Check invoice dates and make sure it doesn't have outstanding invoices
|
||||
return getdate(nowdate()) >= getdate(self.current_invoice_start) and not self.has_outstanding_invoice()
|
||||
|
||||
def process_for_active(self):
|
||||
"""
|
||||
Called by `process` if the status of the `Subscription` is 'Active'.
|
||||
@@ -330,7 +340,7 @@ class Subscription(Document):
|
||||
2. Change the `Subscription` status to 'Past Due Date'
|
||||
3. Change the `Subscription` status to 'Cancelled'
|
||||
"""
|
||||
if getdate(nowdate()) > getdate(self.current_invoice_end) or (getdate(nowdate()) >= getdate(self.current_invoice_end) and getdate(self.current_invoice_end) == getdate(self.current_invoice_start)) and not self.has_outstanding_invoice():
|
||||
if self.is_postpaid_to_invoice or self.is_prepaid_to_invoice:
|
||||
self.generate_invoice()
|
||||
if self.current_invoice_is_past_due():
|
||||
self.status = 'Past Due Date'
|
||||
@@ -338,7 +348,7 @@ class Subscription(Document):
|
||||
if self.current_invoice_is_past_due() and getdate(nowdate()) > getdate(self.current_invoice_end):
|
||||
self.status = 'Past Due Date'
|
||||
|
||||
if self.cancel_at_period_end and getdate(nowdate()) > self.current_invoice_end:
|
||||
if self.cancel_at_period_end and getdate(nowdate()) > getdate(self.current_invoice_end):
|
||||
self.cancel_subscription_at_period_end()
|
||||
|
||||
def cancel_subscription_at_period_end(self):
|
||||
|
||||
@@ -41,24 +41,14 @@ def create_plan():
|
||||
plan.billing_interval_count = 14
|
||||
plan.insert()
|
||||
|
||||
|
||||
def create_subscriber():
|
||||
if not frappe.db.exists('Subscriber', '_Test Customer'):
|
||||
subscriber = frappe.new_doc('Subscriber')
|
||||
subscriber.subscriber_name = '_Test Customer'
|
||||
subscriber.customer = '_Test Customer'
|
||||
subscriber.insert()
|
||||
|
||||
|
||||
class TestSubscription(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
create_plan()
|
||||
create_subscriber()
|
||||
|
||||
def test_create_subscription_with_trial_with_correct_period(self):
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.trial_period_start = nowdate()
|
||||
subscription.trial_period_end = add_days(nowdate(), 30)
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
@@ -75,7 +65,7 @@ class TestSubscription(unittest.TestCase):
|
||||
|
||||
def test_create_subscription_without_trial_with_correct_period(self):
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.save()
|
||||
|
||||
@@ -91,7 +81,7 @@ class TestSubscription(unittest.TestCase):
|
||||
|
||||
def test_create_subscription_trial_with_wrong_dates(self):
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.trial_period_end = nowdate()
|
||||
subscription.trial_period_start = add_days(nowdate(), 30)
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
@@ -101,7 +91,7 @@ class TestSubscription(unittest.TestCase):
|
||||
|
||||
def test_create_subscription_multi_with_different_billing_fails(self):
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.trial_period_end = nowdate()
|
||||
subscription.trial_period_start = add_days(nowdate(), 30)
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
@@ -112,7 +102,7 @@ class TestSubscription(unittest.TestCase):
|
||||
|
||||
def test_invoice_is_generated_at_end_of_billing_period(self):
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.start = '2018-01-01'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.insert()
|
||||
@@ -129,7 +119,7 @@ class TestSubscription(unittest.TestCase):
|
||||
|
||||
def test_status_goes_back_to_active_after_invoice_is_paid(self):
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.start = '2018-01-01'
|
||||
subscription.insert()
|
||||
@@ -159,7 +149,7 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.save()
|
||||
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.start = '2018-01-01'
|
||||
subscription.insert()
|
||||
@@ -182,7 +172,7 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.save()
|
||||
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.start = '2018-01-01'
|
||||
subscription.insert()
|
||||
@@ -200,7 +190,7 @@ class TestSubscription(unittest.TestCase):
|
||||
|
||||
def test_subscription_invoice_days_until_due(self):
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.days_until_due = 10
|
||||
subscription.start = add_months(nowdate(), -1)
|
||||
@@ -218,7 +208,7 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.save()
|
||||
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.start = '2018-01-01'
|
||||
subscription.insert()
|
||||
@@ -242,7 +232,7 @@ class TestSubscription(unittest.TestCase):
|
||||
|
||||
def test_subscription_remains_active_during_invoice_period(self):
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.save()
|
||||
subscription.process() # no changes expected
|
||||
@@ -268,7 +258,7 @@ class TestSubscription(unittest.TestCase):
|
||||
|
||||
def test_subscription_cancelation(self):
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.save()
|
||||
subscription.cancel_subscription()
|
||||
@@ -284,7 +274,7 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.save()
|
||||
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.save()
|
||||
|
||||
@@ -319,7 +309,7 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.save()
|
||||
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.save()
|
||||
subscription.cancel_subscription()
|
||||
@@ -339,7 +329,7 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.save()
|
||||
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.save()
|
||||
subscription.cancel_subscription()
|
||||
@@ -363,7 +353,7 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.save()
|
||||
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.start = '2018-01-01'
|
||||
subscription.insert()
|
||||
@@ -397,7 +387,7 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.save()
|
||||
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.start = '2018-01-01'
|
||||
subscription.insert()
|
||||
@@ -434,7 +424,7 @@ class TestSubscription(unittest.TestCase):
|
||||
settings.save()
|
||||
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.start = '2018-01-01'
|
||||
subscription.insert()
|
||||
@@ -463,7 +453,7 @@ class TestSubscription(unittest.TestCase):
|
||||
|
||||
def test_restart_active_subscription(self):
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.save()
|
||||
|
||||
@@ -473,7 +463,7 @@ class TestSubscription(unittest.TestCase):
|
||||
|
||||
def test_subscription_invoice_discount_percentage(self):
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.additional_discount_percentage = 10
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.save()
|
||||
@@ -488,7 +478,7 @@ class TestSubscription(unittest.TestCase):
|
||||
|
||||
def test_subscription_invoice_discount_amount(self):
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.subscriber = '_Test Customer'
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.additional_discount_amount = 11
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.save()
|
||||
@@ -500,3 +490,51 @@ class TestSubscription(unittest.TestCase):
|
||||
self.assertEqual(invoice.apply_discount_on, 'Grand Total')
|
||||
|
||||
subscription.delete()
|
||||
|
||||
def test_prepaid_subscriptions(self):
|
||||
# Create a non pre-billed subscription, processing should not create
|
||||
# invoices.
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.save()
|
||||
subscription.process()
|
||||
|
||||
self.assertEqual(len(subscription.invoices), 0)
|
||||
|
||||
# Change the subscription type to prebilled and process it.
|
||||
# Prepaid invoice should be generated
|
||||
subscription.generate_invoice_at_period_start = True
|
||||
subscription.save()
|
||||
subscription.process()
|
||||
|
||||
self.assertEqual(len(subscription.invoices), 1)
|
||||
|
||||
def test_prepaid_subscriptions_with_prorate_true(self):
|
||||
settings = frappe.get_single('Subscription Settings')
|
||||
to_prorate = settings.prorate
|
||||
settings.prorate = 1
|
||||
settings.save()
|
||||
|
||||
subscription = frappe.new_doc('Subscription')
|
||||
subscription.customer = '_Test Customer'
|
||||
subscription.generate_invoice_at_period_start = True
|
||||
subscription.append('plans', {'plan': '_Test Plan Name', 'qty': 1})
|
||||
subscription.save()
|
||||
subscription.cancel_subscription()
|
||||
|
||||
self.assertEqual(len(subscription.invoices), 1)
|
||||
|
||||
current_inv = subscription.get_current_invoice()
|
||||
self.assertEqual(current_inv.status, "Unpaid")
|
||||
|
||||
diff = flt(date_diff(nowdate(), subscription.current_invoice_start) + 1)
|
||||
plan_days = flt(date_diff(subscription.current_invoice_end, subscription.current_invoice_start) + 1)
|
||||
prorate_factor = flt(diff / plan_days)
|
||||
|
||||
self.assertEqual(flt(current_inv.grand_total, 2), flt(prorate_factor * 900, 2))
|
||||
|
||||
settings.prorate = to_prorate
|
||||
settings.save()
|
||||
|
||||
subscription.delete()
|
||||
|
||||
@@ -1573,15 +1573,16 @@ erpnext.pos.PointOfSale = erpnext.taxes_and_totals.extend({
|
||||
style="margin-right: 5px;">${__('Print')}</a>
|
||||
<a class="btn btn-default new_doc">${__('New')}</a>`);
|
||||
|
||||
$('.print_doc').click(function () {
|
||||
var html = frappe.render(me.print_template_data, me.frm.doc)
|
||||
me.print_document(html)
|
||||
this.msgprint.msg_area.find('.print_doc').on('click', function() {
|
||||
var html = frappe.render(me.print_template_data, me.frm.doc);
|
||||
me.print_document(html);
|
||||
})
|
||||
|
||||
$('.new_doc').click(function () {
|
||||
me.msgprint.hide()
|
||||
me.make_new_cart()
|
||||
this.msgprint.msg_area.find('.new_doc').on('click', function() {
|
||||
me.msgprint.hide();
|
||||
me.make_new_cart();
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
print_document: function (html) {
|
||||
|
||||
@@ -22,14 +22,14 @@ class DuplicatePartyAccountError(frappe.ValidationError): pass
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_party_details(party=None, account=None, party_type="Customer", company=None, posting_date=None,
|
||||
bill_date=None, price_list=None, currency=None, doctype=None, ignore_permissions=False, fetch_payment_terms_template=True, party_address=None):
|
||||
bill_date=None, price_list=None, currency=None, doctype=None, ignore_permissions=False, fetch_payment_terms_template=True, party_address=None, shipping_address=None):
|
||||
|
||||
if not party:
|
||||
return {}
|
||||
if not frappe.db.exists(party_type, party):
|
||||
frappe.throw(_("{0}: {1} does not exists").format(party_type, party))
|
||||
return _get_party_details(party, account, party_type,
|
||||
company, posting_date, bill_date, price_list, currency, doctype, ignore_permissions, fetch_payment_terms_template, party_address)
|
||||
company, posting_date, bill_date, price_list, currency, doctype, ignore_permissions, fetch_payment_terms_template, party_address, shipping_address)
|
||||
|
||||
def _get_party_details(party=None, account=None, party_type="Customer", company=None, posting_date=None,
|
||||
bill_date=None, price_list=None, currency=None, doctype=None, ignore_permissions=False,
|
||||
@@ -96,7 +96,8 @@ def set_address_details(out, party, party_type, doctype=None, company=None, part
|
||||
elif doctype and doctype == "Purchase Invoice":
|
||||
out.update(get_company_address(company))
|
||||
if out.company_address:
|
||||
out["shipping_address"] = out["company_address"]
|
||||
out["shipping_address"] = shipping_address or out["company_address"]
|
||||
out.shipping_address_display = get_address_display(out["shipping_address"])
|
||||
out.update(get_fetch_values(doctype, 'shipping_address', out.shipping_address))
|
||||
get_regional_address_details(out, doctype, company)
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<td class="text-right">{%= format_currency(balance_row[range3]) %}</td>
|
||||
<td class="text-right">{%= format_currency(balance_row[range4]) %}</td>
|
||||
<td class="text-right">
|
||||
{%= format_currency(flt(balance_row[__("Outstanding Amount")]), data[data.length-1]["currency"]) %}
|
||||
{%= format_currency(flt(balance_row[("outstanding_amount")]), data[data.length-1]["currency"]) %}
|
||||
</td>
|
||||
</tr>
|
||||
<td>{%= __("PDC/LC") %}</td>
|
||||
@@ -84,7 +84,7 @@
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="text-right">
|
||||
{%= format_currency(flt(balance_row[__("PDC/LC Amount")]), data[data.length-1]["currency"]) %}
|
||||
{%= format_currency(flt(balance_row[("pdc/lc_amount")]), data[data.length-1]["currency"]) %}
|
||||
</td>
|
||||
<tr class="cvs-footer">
|
||||
<th class="text-left">{%= __("Cheques Required") %}</th>
|
||||
@@ -93,7 +93,7 @@
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th class="text-right">
|
||||
{%= format_currency(flt(balance_row[__("Outstanding Amount")]-balance_row[__("PDC/LC Amount")]), data[data.length-1]["currency"]) %}</th>
|
||||
{%= format_currency(flt(balance_row[("outstanding_amount")]-balance_row[("pdc/lc_amount")]), data[data.length-1]["currency"]) %}</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -161,26 +161,26 @@
|
||||
</td>
|
||||
{% } %}
|
||||
<td style="text-align: right">
|
||||
{%= format_currency(data[i]["Invoiced Amount"], data[i]["currency"]) %}</td>
|
||||
{%= format_currency(data[i]["invoiced_amount"], data[i]["currency"]) %}</td>
|
||||
|
||||
{% if(!filters.show_pdc_in_print) { %}
|
||||
<td style="text-align: right">
|
||||
{%= format_currency(data[i]["Paid Amount"], data[i]["currency"]) %}</td>
|
||||
{%= format_currency(data[i]["paid_amount"], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">
|
||||
{%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["Credit Note"], data[i]["currency"]) : format_currency(data[i]["Debit Note"], data[i]["currency"]) %}</td>
|
||||
{%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["credit_note"], data[i]["currency"]) : format_currency(data[i]["debit_note"], data[i]["currency"]) %}</td>
|
||||
{% } %}
|
||||
<td style="text-align: right">
|
||||
{%= format_currency(data[i]["Outstanding Amount"], data[i]["currency"]) %}</td>
|
||||
{%= format_currency(data[i]["outstanding_amount"], data[i]["currency"]) %}</td>
|
||||
|
||||
{% if(filters.show_pdc_in_print) { %}
|
||||
{% if(report.report_name === "Accounts Receivable") { %}
|
||||
<td style="text-align: right">
|
||||
{%= data[i][__("Customer LPO")] %}</td>
|
||||
{%= data[i]["po_no"] %}</td>
|
||||
{% } %}
|
||||
<td style="text-align: right">{%= frappe.datetime.str_to_user(data[i][__("PDC/LC Date")]) %}</td>
|
||||
<td style="text-align: right">{%= data[i][__("PDC/LC Ref")] %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("PDC/LC Amount")], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Remaining Balance")], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">{%= frappe.datetime.str_to_user(data[i][("pdc/lc_date")]) %}</td>
|
||||
<td style="text-align: right">{%= data[i][("pdc/lc_ref")] %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][("pdc/lc_amount")], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][("remaining_balance")], data[i]["currency"]) %}</td>
|
||||
{% } %}
|
||||
{% } else { %}
|
||||
<td></td>
|
||||
@@ -189,15 +189,15 @@
|
||||
{% } %}
|
||||
<td><b>{%= __("Total") %}</b></td>
|
||||
<td style="text-align: right">
|
||||
{%= format_currency(data[i]["Invoiced Amount"], data[i]["currency"] ) %}</td>
|
||||
{%= format_currency(data[i]["invoiced_amount"], data[i]["currency"] ) %}</td>
|
||||
|
||||
{% if(!filters.show_pdc_in_print) { %}
|
||||
<td style="text-align: right">
|
||||
{%= format_currency(data[i]["Paid Amount"], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">{%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["Credit Note"], data[i]["currency"]) : format_currency(data[i]["Debit Note"], data[i]["currency"]) %} </td>
|
||||
{%= format_currency(data[i]["paid_amount"], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">{%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["credit_note"], data[i]["currency"]) : format_currency(data[i]["Debit Note"], data[i]["currency"]) %} </td>
|
||||
{% } %}
|
||||
<td style="text-align: right">
|
||||
{%= format_currency(data[i]["Outstanding Amount"], data[i]["currency"]) %}</td>
|
||||
{%= format_currency(data[i]["outstanding_amount"], data[i]["currency"]) %}</td>
|
||||
|
||||
{% if(filters.show_pdc_in_print) { %}
|
||||
{% if(report.report_name === "Accounts Receivable") { %}
|
||||
@@ -205,9 +205,9 @@
|
||||
{%= data[i][__("Customer LPO")] %}</td>
|
||||
{% } %}
|
||||
<td style="text-align: right">{%= frappe.datetime.str_to_user(data[i][__("PDC/LC Date")]) %}</td>
|
||||
<td style="text-align: right">{%= data[i][__("PDC/LC Ref")] %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("PDC/LC Amount")], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Remaining Balance")], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">{%= data[i][("pdc/lc_ref")] %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][("pdc/lc_amount")], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][("remaining_balance")], data[i]["currency"]) %}</td>
|
||||
{% } %}
|
||||
{% } %}
|
||||
{% } else { %}
|
||||
@@ -228,14 +228,14 @@
|
||||
{% } else { %}
|
||||
<td><b>{%= __("Total") %}</b></td>
|
||||
{% } %}
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Total Invoiced Amt")], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Total Paid Amt")], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][("total_invoiced_amt")], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][("total_paid_amt")], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">{%= report.report_name === "Accounts Receivable Summary" ? format_currency(data[i][__("Credit Note Amt")], data[i]["currency"]) : format_currency(data[i][__("Debit Note Amt")], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][__("Total Outstanding Amt")], data[i]["currency"]) %}</td>
|
||||
<td style="text-align: right">{%= format_currency(data[i][("total_outstanding_amt")], data[i]["currency"]) %}</td>
|
||||
{% } %}
|
||||
{% } %}
|
||||
</tr>
|
||||
{% } %}
|
||||
</tbody>
|
||||
</table>
|
||||
<p class="text-right text-muted">{{ __("Printed On ") }}{%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}</p>
|
||||
<p class="text-right text-muted">{{ __("Printed On ") }}{%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}</p>
|
||||
|
||||
@@ -83,30 +83,55 @@ class ReceivablePayableReport(object):
|
||||
"{range3}-{above}".format(range3=cint(self.filters["range3"])+ 1, above=_("Above"))):
|
||||
columns.append({
|
||||
"label": label,
|
||||
"fieldname":label,
|
||||
"fieldtype": "Currency",
|
||||
"options": "currency",
|
||||
"width": 120
|
||||
})
|
||||
|
||||
columns.append({
|
||||
columns += [
|
||||
{
|
||||
"fieldname": "currency",
|
||||
"label": _("Currency"),
|
||||
"fieldtype": "Link",
|
||||
"options": "Currency",
|
||||
"width": 100
|
||||
})
|
||||
|
||||
columns += [
|
||||
_("PDC/LC Date") + ":Date:110",
|
||||
_("PDC/LC Ref") + ":Data:110",
|
||||
_("PDC/LC Amount") + ":Currency/currency:130",
|
||||
_("Remaining Balance") + ":Currency/currency:130"
|
||||
]
|
||||
},
|
||||
{
|
||||
"fieldname": "pdc/lc_date",
|
||||
"label": _("PDC/LC Date"),
|
||||
"fieldtype": "Date",
|
||||
"width": 110
|
||||
},
|
||||
{
|
||||
"fieldname": "pdc/lc_ref",
|
||||
"label": _("PDC/LC Ref"),
|
||||
"fieldtype": "Data",
|
||||
"width": 110
|
||||
},
|
||||
{
|
||||
"fieldname": "pdc/lc_amount",
|
||||
"label": _("PDC/LC Amount"),
|
||||
"fieldtype": "Currency",
|
||||
"options": "Currency",
|
||||
"width": 130
|
||||
},
|
||||
{
|
||||
"fieldname": "remaining_balance",
|
||||
"label": _("Remaining Balance"),
|
||||
"fieldtype": "Currency",
|
||||
"options": "Currency",
|
||||
"width": 130
|
||||
}]
|
||||
|
||||
if args.get('party_type') == 'Customer':
|
||||
columns += [_("Customer LPO") + ":Data:100"]
|
||||
columns.append({
|
||||
"label": _("Customer LPO"),
|
||||
"fieldtype": "Data",
|
||||
"fieldname": "po_no",
|
||||
"width": 100,
|
||||
})
|
||||
columns += [_("Delivery Note") + ":Data:100"]
|
||||
|
||||
if args.get("party_type") == "Customer":
|
||||
columns += [
|
||||
_("Territory") + ":Link/Territory:80",
|
||||
@@ -135,7 +160,6 @@ class ReceivablePayableReport(object):
|
||||
|
||||
data = []
|
||||
pdc_details = get_pdc_details(args.get("party_type"), self.filters.report_date)
|
||||
|
||||
gl_entries_data = self.get_entries_till(self.filters.report_date, args.get("party_type"))
|
||||
|
||||
if gl_entries_data:
|
||||
@@ -448,18 +472,17 @@ def get_pdc_details(party_type, report_date):
|
||||
for pdc in frappe.db.sql("""
|
||||
select
|
||||
pref.reference_name as invoice_no, pent.party, pent.party_type,
|
||||
max(pent.reference_date) as pdc_date, sum(ifnull(pref.allocated_amount,0)) as pdc_amount,
|
||||
max(pent.posting_date) as pdc_date, sum(ifnull(pref.allocated_amount,0)) as pdc_amount,
|
||||
GROUP_CONCAT(pent.reference_no SEPARATOR ', ') as pdc_ref
|
||||
from
|
||||
`tabPayment Entry` as pent inner join `tabPayment Entry Reference` as pref
|
||||
on
|
||||
(pref.parent = pent.name)
|
||||
where
|
||||
pent.docstatus < 2 and pent.reference_date >= %s
|
||||
pent.docstatus < 2 and pent.posting_date > %s
|
||||
and pent.party_type = %s
|
||||
group by pent.party, pref.reference_name""", (report_date, party_type), as_dict=1):
|
||||
pdc_details.setdefault((pdc.invoice_no, pdc.party), pdc)
|
||||
|
||||
if scrub(party_type):
|
||||
amount_field = ("jea.debit_in_account_currency"
|
||||
if party_type == 'Supplier' else "jea.credit_in_account_currency")
|
||||
@@ -469,18 +492,23 @@ def get_pdc_details(party_type, report_date):
|
||||
for pdc in frappe.db.sql("""
|
||||
select
|
||||
jea.reference_name as invoice_no, jea.party, jea.party_type,
|
||||
max(je.cheque_date) as pdc_date, sum(ifnull({0},0)) as pdc_amount,
|
||||
max(je.posting_date) as pdc_date, sum(ifnull({0},0)) as pdc_amount,
|
||||
GROUP_CONCAT(je.cheque_no SEPARATOR ', ') as pdc_ref
|
||||
from
|
||||
`tabJournal Entry` as je inner join `tabJournal Entry Account` as jea
|
||||
on
|
||||
(jea.parent = je.name)
|
||||
where
|
||||
je.docstatus < 2 and je.cheque_date >= %s
|
||||
je.docstatus < 2 and je.posting_date > %s
|
||||
and jea.party_type = %s
|
||||
group by jea.party, jea.reference_name""".format(amount_field), (report_date, party_type), as_dict=1):
|
||||
if (pdc.invoice_no, pdc.party) in pdc_details:
|
||||
pdc_details[(pdc.invoice_no, pdc.party)]["pdc_amount"] += pdc.pdc_amount
|
||||
key = (pdc.invoice_no, pdc.party)
|
||||
pdc_details[key]["pdc_amount"] += pdc.pdc_amount
|
||||
if pdc.pdc_ref:
|
||||
pdc_details[key]["pdc_ref"] += ", " + pdc.pdc_ref
|
||||
if pdc.pdc_date:
|
||||
pdc_details[key]["pdc_date"] = max(pdc_details[key]["pdc_date"], pdc.pdc_date)
|
||||
else:
|
||||
pdc_details.setdefault((pdc.invoice_no, pdc.party), pdc)
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import re
|
||||
from past.builtins import cmp
|
||||
@@ -339,19 +341,20 @@ def set_gl_entries_by_account(
|
||||
|
||||
additional_conditions = get_additional_conditions(from_date, ignore_closing_entries, filters)
|
||||
|
||||
accounts = frappe.db.sql_list("""select name from `tabAccount`
|
||||
where lft >= %s and rgt <= %s""", (root_lft, root_rgt))
|
||||
additional_conditions += " and account in ('{}')"\
|
||||
.format("', '".join([frappe.db.escape(d) for d in accounts]))
|
||||
|
||||
gl_entries = frappe.db.sql("""select posting_date, account, debit, credit, is_opening, fiscal_year, debit_in_account_currency, credit_in_account_currency, account_currency from `tabGL Entry`
|
||||
where company=%(company)s
|
||||
{additional_conditions}
|
||||
and posting_date <= %(to_date)s
|
||||
and account in (select name from `tabAccount`
|
||||
where lft >= %(lft)s and rgt <= %(rgt)s)
|
||||
order by account, posting_date""".format(additional_conditions=additional_conditions),
|
||||
{
|
||||
"company": company,
|
||||
"from_date": from_date,
|
||||
"to_date": to_date,
|
||||
"lft": root_lft,
|
||||
"rgt": root_rgt,
|
||||
"cost_center": filters.cost_center,
|
||||
"project": filters.project
|
||||
},
|
||||
@@ -378,8 +381,8 @@ def get_additional_conditions(from_date, ignore_closing_entries, filters):
|
||||
if filters:
|
||||
if filters.get("project"):
|
||||
if not isinstance(filters.get("project"), list):
|
||||
projects = str(filters.get("project")).strip()
|
||||
filters.project = [d.strip() for d in projects.split(',') if d]
|
||||
projects = frappe.safe_encode(filters.get("project"))
|
||||
filters.project = [d.strip() for d in projects.strip().split(',') if d]
|
||||
additional_conditions.append("project in %(project)s")
|
||||
|
||||
if filters.get("cost_center"):
|
||||
@@ -399,7 +402,7 @@ def get_additional_conditions(from_date, ignore_closing_entries, filters):
|
||||
|
||||
def get_cost_centers_with_children(cost_centers):
|
||||
if not isinstance(cost_centers, list):
|
||||
cost_centers = [d.strip() for d in str(cost_centers).strip().split(',') if d]
|
||||
cost_centers = [d.strip() for d in cost_centers.strip().split(',') if d]
|
||||
|
||||
all_cost_centers = []
|
||||
for d in cost_centers:
|
||||
|
||||
@@ -55,7 +55,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
|
||||
]
|
||||
|
||||
row += [(d.base_net_rate * d.qty)/d.stock_qty, d.base_net_amount] \
|
||||
if d.stock_uom != d.uom else [d.base_net_rate, d.base_net_amount]
|
||||
if d.stock_uom != d.uom and d.stock_qty != 0 else [d.base_net_rate, d.base_net_amount]
|
||||
|
||||
total_tax = 0
|
||||
for tax in tax_columns:
|
||||
|
||||
@@ -8,6 +8,7 @@ frappe.query_reports["TDS Payable Monthly"] = {
|
||||
"fieldname":"company",
|
||||
"label": __("Company"),
|
||||
"fieldtype": "Link",
|
||||
"options": "Company",
|
||||
"default": frappe.defaults.get_default('company')
|
||||
},
|
||||
{
|
||||
|
||||
@@ -64,13 +64,16 @@ def get_result(filters):
|
||||
total_amount_credited += k.credit
|
||||
|
||||
rate = [i.tax_withholding_rate for i in tds_doc.rates
|
||||
if i.fiscal_year == gle_map[d][0].fiscal_year][0]
|
||||
if i.fiscal_year == gle_map[d][0].fiscal_year]
|
||||
|
||||
if getdate(filters.from_date) <= gle_map[d][0].posting_date \
|
||||
and getdate(filters.to_date) >= gle_map[d][0].posting_date:
|
||||
out.append([supplier.pan, supplier.name, tds_doc.name,
|
||||
supplier.supplier_type, rate, total_amount_credited, tds_deducted,
|
||||
gle_map[d][0].posting_date, "Purchase Invoice", d])
|
||||
if rate and len(rate) > 0:
|
||||
rate = rate[0]
|
||||
|
||||
if getdate(filters.from_date) <= gle_map[d][0].posting_date \
|
||||
and getdate(filters.to_date) >= gle_map[d][0].posting_date:
|
||||
out.append([supplier.pan, supplier.name, tds_doc.name,
|
||||
supplier.supplier_type, rate, total_amount_credited, tds_deducted,
|
||||
gle_map[d][0].posting_date, "Purchase Invoice", d])
|
||||
|
||||
return out
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -15,6 +16,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,10 +43,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
"translatable": 0,
|
||||
"unique": 1
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -71,10 +75,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -102,6 +108,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -115,7 +122,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-25 22:26:28.797375",
|
||||
"modified": "2018-11-04 03:27:36.678832",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Agriculture Analysis Criteria",
|
||||
@@ -124,7 +131,6 @@
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
@@ -144,7 +150,6 @@
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"delete": 0,
|
||||
@@ -166,10 +171,12 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"title_field": "",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
}
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -191,7 +192,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-08-21 16:15:48.528845",
|
||||
"modified": "2018-11-04 03:28:08.679157",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Agriculture Task",
|
||||
@@ -201,6 +202,7 @@
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -15,6 +16,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,10 +43,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
"translatable": 0,
|
||||
"unique": 1
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -70,10 +74,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -100,10 +106,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -129,10 +137,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -159,10 +169,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -190,10 +202,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -221,10 +235,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -252,10 +268,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -281,10 +299,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -311,10 +331,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -342,10 +364,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -371,10 +395,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -401,10 +427,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -432,10 +460,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -461,10 +491,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -492,10 +524,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -521,10 +555,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -551,10 +587,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -580,10 +618,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -611,10 +651,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -640,10 +682,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -671,10 +715,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -701,10 +747,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -730,10 +778,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -761,10 +811,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -790,10 +842,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -820,10 +874,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -851,10 +907,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -881,10 +939,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -912,10 +972,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -942,10 +1004,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -973,6 +1037,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -986,7 +1051,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-06 11:00:06.333894",
|
||||
"modified": "2018-11-04 03:27:10.651075",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Crop",
|
||||
@@ -995,7 +1060,6 @@
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
@@ -1015,7 +1079,6 @@
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"delete": 0,
|
||||
@@ -1037,9 +1100,11 @@
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -844,7 +845,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-06-20 04:41:36.148829",
|
||||
"modified": "2018-11-04 03:31:47.602312",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Crop Cycle",
|
||||
@@ -893,9 +894,11 @@
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -121,7 +122,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-06-06 02:24:52.131482",
|
||||
"modified": "2018-11-04 03:27:47.463994",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Detected Disease",
|
||||
@@ -131,9 +132,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -15,6 +16,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,10 +43,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
"translatable": 0,
|
||||
"unique": 1
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -71,10 +75,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -100,10 +106,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -131,10 +139,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -161,10 +171,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -191,10 +203,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -221,6 +235,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -234,7 +249,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-07 16:24:22.923154",
|
||||
"modified": "2018-11-04 03:27:25.076490",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Disease",
|
||||
@@ -243,7 +258,6 @@
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
@@ -263,7 +277,6 @@
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"delete": 0,
|
||||
@@ -285,9 +298,11 @@
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -15,6 +16,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,10 +43,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
"translatable": 0,
|
||||
"unique": 1
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -72,10 +76,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -101,10 +107,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -131,10 +139,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -160,10 +170,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -190,10 +202,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -220,6 +234,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -233,7 +248,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-05 19:13:42.471667",
|
||||
"modified": "2018-11-04 03:26:29.211792",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Fertilizer",
|
||||
@@ -242,7 +257,6 @@
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
@@ -262,7 +276,6 @@
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"delete": 0,
|
||||
@@ -284,9 +297,11 @@
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -56,7 +57,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-06-20 04:35:51.675244",
|
||||
"modified": "2018-11-04 03:27:58.120962",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Linked Location",
|
||||
@@ -66,9 +67,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -14,6 +15,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,6 +43,7 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -54,7 +57,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-04 13:25:30.437597",
|
||||
"modified": "2018-11-04 03:25:15.359130",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Linked Plant Analysis",
|
||||
@@ -64,9 +67,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -14,6 +15,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,6 +43,7 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -54,7 +57,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-04 13:26:18.682109",
|
||||
"modified": "2018-11-04 03:25:27.670079",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Linked Soil Analysis",
|
||||
@@ -64,9 +67,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -14,6 +15,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,6 +43,7 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -54,7 +57,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-04 13:26:07.773314",
|
||||
"modified": "2018-11-04 03:26:17.877616",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Linked Soil Texture",
|
||||
@@ -64,9 +67,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -312,7 +313,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-08-21 16:15:40.027967",
|
||||
"modified": "2018-11-04 03:28:48.087828",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Plant Analysis",
|
||||
@@ -361,6 +362,7 @@
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -14,6 +15,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,10 +43,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -71,10 +75,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -101,10 +107,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -131,6 +139,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -144,7 +153,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-05 19:37:02.289320",
|
||||
"modified": "2018-11-04 03:25:43.714882",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Plant Analysis Criteria",
|
||||
@@ -154,9 +163,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -533,7 +534,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-08-21 16:15:56.754373",
|
||||
"modified": "2018-11-04 03:28:58.403760",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Soil Analysis",
|
||||
@@ -582,6 +583,7 @@
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -14,6 +15,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,10 +43,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -71,10 +75,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -101,10 +107,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -131,6 +139,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -144,7 +153,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-05 23:35:34.569482",
|
||||
"modified": "2018-11-04 03:25:54.359008",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Soil Analysis Criteria",
|
||||
@@ -154,9 +163,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -473,7 +474,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-08-21 16:15:41.823722",
|
||||
"modified": "2018-11-04 03:29:18.221173",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Soil Texture",
|
||||
@@ -522,6 +523,7 @@
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -14,6 +15,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,10 +43,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -71,10 +75,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -101,10 +107,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -131,6 +139,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -144,7 +153,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-05 23:45:17.419610",
|
||||
"modified": "2018-11-04 03:26:46.178377",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Soil Texture Criteria",
|
||||
@@ -154,9 +163,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -534,7 +535,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-08-21 16:15:52.416815",
|
||||
"modified": "2018-11-04 03:29:08.325644",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Water Analysis",
|
||||
@@ -583,6 +584,7 @@
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -14,6 +15,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,10 +43,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -71,10 +75,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -101,10 +107,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -131,6 +139,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -144,7 +153,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-05 23:36:45.836858",
|
||||
"modified": "2018-11-04 03:26:07.026834",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Water Analysis Criteria",
|
||||
@@ -154,9 +163,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"autoname": "field:date",
|
||||
"autoname": "format:WEA-{date}-{location}",
|
||||
"beta": 0,
|
||||
"creation": "2017-10-17 19:01:05.095598",
|
||||
"custom": 0,
|
||||
@@ -15,12 +16,13 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "source",
|
||||
"fieldtype": "Data",
|
||||
"fieldname": "location",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
@@ -28,9 +30,10 @@
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Source",
|
||||
"label": "Location",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Location",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
@@ -41,10 +44,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -70,10 +75,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -100,10 +107,44 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "source",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Source",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -129,10 +170,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -159,10 +202,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -189,6 +234,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -202,7 +248,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-06 11:04:36.977755",
|
||||
"modified": "2018-11-04 03:31:36.839743",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Weather",
|
||||
@@ -211,7 +257,6 @@
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
@@ -231,7 +276,6 @@
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"delete": 0,
|
||||
@@ -253,9 +297,11 @@
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -14,6 +15,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,10 +43,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -71,10 +75,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -101,10 +107,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -131,6 +139,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -144,7 +153,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-06 00:26:48.887975",
|
||||
"modified": "2018-11-04 03:26:58.794373",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Agriculture",
|
||||
"name": "Weather Parameter",
|
||||
@@ -154,9 +163,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Agriculture",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -85,8 +85,17 @@ class Asset(AccountsController):
|
||||
elif not self.finance_books:
|
||||
frappe.throw(_("Enter depreciation details"))
|
||||
|
||||
if self.available_for_use_date and getdate(self.available_for_use_date) < getdate(nowdate()):
|
||||
frappe.throw(_("Available-for-use Date is entered as past date"))
|
||||
if self.is_existing_asset:
|
||||
return
|
||||
|
||||
date = nowdate()
|
||||
docname = self.purchase_receipt or self.purchase_invoice
|
||||
if docname:
|
||||
doctype = 'Purchase Receipt' if self.purchase_receipt else 'Purchase Invoice'
|
||||
date = frappe.db.get_value(doctype, docname, 'posting_date')
|
||||
|
||||
if self.available_for_use_date and getdate(self.available_for_use_date) < getdate(date):
|
||||
frappe.throw(_("Available-for-use Date should be after purchase date"))
|
||||
|
||||
def make_depreciation_schedule(self):
|
||||
if self.depreciation_method != 'Manual':
|
||||
|
||||
@@ -128,7 +128,7 @@ frappe.ui.form.on("Request for Quotation",{
|
||||
doctype: "Supplier",
|
||||
order_by: "name",
|
||||
fields: ["name"],
|
||||
filters: [["Supplier", "supplier_group_name", "=", args.supplier_group]]
|
||||
filters: [["Supplier", "supplier_group", "=", args.supplier_group]]
|
||||
|
||||
},
|
||||
callback: load_suppliers
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -60,7 +60,12 @@ class SupplierQuotation(BuyingController):
|
||||
for rfq in rfq_list:
|
||||
doc = frappe.get_doc('Request for Quotation', rfq)
|
||||
doc_sup = frappe.get_all('Request for Quotation Supplier', filters=
|
||||
{'parent': doc.name, 'supplier': self.supplier}, fields=['name', 'quote_status'])[0]
|
||||
{'parent': doc.name, 'supplier': self.supplier}, fields=['name', 'quote_status'])
|
||||
|
||||
doc_sup = doc_sup[0] if doc_sup else None
|
||||
if not doc_sup:
|
||||
frappe.throw(_("Supplier {0} not found in {1}").format(self.supplier,
|
||||
"<a href='desk#Form/Request for Quotation/{0}'> Request for Quotation {0} </a>".format(doc.name)))
|
||||
|
||||
quote_status = _('Received')
|
||||
for item in doc.items:
|
||||
@@ -152,4 +157,4 @@ def make_quotation(source_name, target_doc=None):
|
||||
}
|
||||
}, target_doc)
|
||||
|
||||
return doclist
|
||||
return doclist
|
||||
|
||||
@@ -293,6 +293,16 @@ def get_data():
|
||||
"label": _("Patient"),
|
||||
"hidden": 1
|
||||
},
|
||||
{
|
||||
"module_name": "Healthcare Practitioner",
|
||||
"color": "#2ecc71",
|
||||
"icon": "fa fa-user-md",
|
||||
"doctype": "Healthcare Practitioner",
|
||||
"type": "link",
|
||||
"link": "List/Healthcare Practitioner",
|
||||
"label": _("Healthcare Practitioner"),
|
||||
"hidden": 1
|
||||
},
|
||||
{
|
||||
"module_name": "Patient Appointment",
|
||||
"color": "#934F92",
|
||||
@@ -322,6 +332,36 @@ def get_data():
|
||||
"link": "List/Lab Test",
|
||||
"label": _("Lab Test"),
|
||||
"hidden": 1
|
||||
},
|
||||
{
|
||||
"module_name": "Vital Signs",
|
||||
"color": "#2ecc71",
|
||||
"icon": "fa fa-thermometer-empty",
|
||||
"doctype": "Vital Signs",
|
||||
"type": "list",
|
||||
"link": "List/Vital Signs",
|
||||
"label": _("Vital Signs"),
|
||||
"hidden": 1
|
||||
},
|
||||
{
|
||||
"module_name": "Clinical Procedure",
|
||||
"color": "#FF888B",
|
||||
"icon": "fa fa-medkit",
|
||||
"doctype": "Clinical Procedure",
|
||||
"type": "list",
|
||||
"link": "List/Clinical Procedure",
|
||||
"label": _("Clinical Procedure"),
|
||||
"hidden": 1
|
||||
},
|
||||
{
|
||||
"module_name": "Inpatient Record",
|
||||
"color": "#7578f6",
|
||||
"icon": "fa fa-list-alt",
|
||||
"doctype": "Inpatient Record",
|
||||
"type": "list",
|
||||
"link": "List/Inpatient Record",
|
||||
"label": _("Inpatient Record"),
|
||||
"hidden": 1
|
||||
},
|
||||
{
|
||||
"module_name": "Hub",
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
source_link = "https://github.com/frappe/erpnext"
|
||||
source_link = "https://github.com/erpnext/foundation"
|
||||
|
||||
@@ -708,22 +708,24 @@ class AccountsController(TransactionBase):
|
||||
def group_similar_items(self):
|
||||
group_item_qty = {}
|
||||
group_item_amount = {}
|
||||
# to update serial number in print
|
||||
count = 0
|
||||
|
||||
for item in self.items:
|
||||
group_item_qty[item.item_code] = group_item_qty.get(item.item_code, 0) + item.qty
|
||||
group_item_amount[item.item_code] = group_item_amount.get(item.item_code, 0) + item.amount
|
||||
|
||||
duplicate_list = []
|
||||
|
||||
for item in self.items:
|
||||
if item.item_code in group_item_qty:
|
||||
count += 1
|
||||
item.qty = group_item_qty[item.item_code]
|
||||
item.amount = group_item_amount[item.item_code]
|
||||
item.rate = flt(flt(item.amount) / flt(item.qty), item.precision("rate"))
|
||||
item.idx = count
|
||||
del group_item_qty[item.item_code]
|
||||
else:
|
||||
duplicate_list.append(item)
|
||||
|
||||
for item in duplicate_list:
|
||||
self.remove(item)
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ class BuyingController(StockController):
|
||||
# set contact and address details for supplier, if they are not mentioned
|
||||
if getattr(self, "supplier", None):
|
||||
self.update_if_missing(get_party_details(self.supplier, party_type="Supplier", ignore_permissions=self.flags.ignore_permissions,
|
||||
doctype=self.doctype, company=self.company, party_address=self.supplier_address))
|
||||
doctype=self.doctype, company=self.company, party_address=self.supplier_address, shipping_address=self.get('shipping_address')))
|
||||
|
||||
self.set_missing_item_details(for_validate)
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class SellingController(StockController):
|
||||
ignore_permissions=self.flags.ignore_permissions,
|
||||
doctype=self.doctype, company=self.company,
|
||||
fetch_payment_terms_template=fetch_payment_terms_template,
|
||||
party_address=self.customer_address, shipping_address=self.shipping_address)
|
||||
party_address=self.customer_address, shipping_address=self.shipping_address_name)
|
||||
if not self.meta.get_field("sales_team"):
|
||||
party_details.pop("sales_team")
|
||||
self.update_if_missing(party_details)
|
||||
|
||||
@@ -70,6 +70,7 @@ class calculate_taxes_and_totals(object):
|
||||
if item.rate_with_margin > 0 else item.rate
|
||||
|
||||
item.net_rate = item.rate
|
||||
item.discount_amount = item.price_list_rate - item.rate
|
||||
item.amount = flt(item.rate * item.qty, item.precision("amount"))
|
||||
item.net_amount = item.amount
|
||||
|
||||
|
||||
@@ -287,6 +287,7 @@
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"depends_on": "eval:!doc.organization_lead",
|
||||
"fieldname": "gender",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
@@ -1521,4 +1522,4 @@
|
||||
"track_changes": 0,
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,72 +1,92 @@
|
||||
[
|
||||
{
|
||||
"date_of_birth": "1982-01-03",
|
||||
"date_of_joining": "2001-10-10",
|
||||
"employee_name": "Dikman Shervashidze Shervashidze",
|
||||
"gender": "Female",
|
||||
"user_id": "DikmanShervashidze@example.com"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1959-02-03",
|
||||
"date_of_joining": "1976-09-16",
|
||||
"employee_name": "Zukutakitoteka",
|
||||
"gender": "Female",
|
||||
"user_id": "Zukutakitoteka@example.com"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1982-03-03",
|
||||
"date_of_joining": "2000-06-16",
|
||||
"employee_name": "Hatsue Kashiwagi",
|
||||
"gender": "Female",
|
||||
"user_id": "HatsueKashiwagi@example.com"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1945-04-04",
|
||||
"date_of_joining": "1969-07-01",
|
||||
"employee_name": "Nuran Verkleij",
|
||||
"gender": "Female",
|
||||
"user_id": "NuranVerkleij@example.com"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1978-05-03",
|
||||
"date_of_joining": "1999-12-24",
|
||||
"employee_name": "\u0414\u043c\u0438\u0442\u0440\u0438\u0439 \u041f\u0438\u0440\u043e\u0433\u043e\u0432",
|
||||
"gender": "Male",
|
||||
"user_id": "aromn@example.com"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1964-06-03",
|
||||
"date_of_joining": "1981-08-05",
|
||||
"employee_name": "Tilde Lindqvist",
|
||||
"gender": "Female",
|
||||
"user_id": "TildeLindqvist@example.com"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1982-07-03",
|
||||
"date_of_joining": "2006-06-10",
|
||||
"employee_name": "Micha\u0142 Sobczak",
|
||||
"gender": "Male",
|
||||
"user_id": "MichalSobczak@example.com"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1969-08-03",
|
||||
"date_of_joining": "1993-10-21",
|
||||
"employee_name": "Gabrielle Loftus",
|
||||
"gender": "Female",
|
||||
"user_id": "GabrielleLoftus@example.com"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1982-09-03",
|
||||
"date_of_joining": "2005-09-06",
|
||||
"employee_name": "Vakhita Ryzaev",
|
||||
"gender": "Male",
|
||||
"user_id": "VakhitaRyzaev@example.com"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1985-10-03",
|
||||
"date_of_joining": "2007-12-25",
|
||||
"employee_name": "Charmaine Gaudreau",
|
||||
"gender": "Female",
|
||||
"user_id": "CharmaineGaudreau@example.com"
|
||||
}
|
||||
{
|
||||
"date_of_birth": "1982-01-03",
|
||||
"date_of_joining": "2001-10-10",
|
||||
"employee_name": "Diana Prince",
|
||||
"first_name": "Diana",
|
||||
"last_name": "Prince",
|
||||
"gender": "Female",
|
||||
"user_id": "DianaPrince@example.com"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1959-02-03",
|
||||
"date_of_joining": "1976-09-16",
|
||||
"employee_name": "Zatanna Zatara",
|
||||
"gender": "Female",
|
||||
"user_id": "ZatannaZatara@example.com",
|
||||
"first_name": "Zatanna",
|
||||
"last_name": "Zatara"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1982-03-03",
|
||||
"date_of_joining": "2000-06-16",
|
||||
"employee_name": "Holly Granger",
|
||||
"gender": "Female",
|
||||
"user_id": "HollyGranger@example.com",
|
||||
"first_name": "Holly",
|
||||
"last_name": "Granger"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1945-04-04",
|
||||
"date_of_joining": "1969-07-01",
|
||||
"employee_name": "Neptunia Aquaria",
|
||||
"gender": "Female",
|
||||
"user_id": "NeptuniaAquaria@example.com",
|
||||
"first_name": "Neptunia",
|
||||
"last_name": "Aquaria"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1978-05-03",
|
||||
"date_of_joining": "1999-12-24",
|
||||
"employee_name": "Arthur Curry",
|
||||
"gender": "Male",
|
||||
"user_id": "ArthurCurry@example.com",
|
||||
"first_name": "Arthur",
|
||||
"last_name": "Curry"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1964-06-03",
|
||||
"date_of_joining": "1981-08-05",
|
||||
"employee_name": "Thalia Al Ghul",
|
||||
"gender": "Female",
|
||||
"user_id": "ThaliaAlGhul@example.com",
|
||||
"first_name": "Thalia",
|
||||
"last_name": "Al Ghul"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1982-07-03",
|
||||
"date_of_joining": "2006-06-10",
|
||||
"employee_name": "Maxwell Lord",
|
||||
"gender": "Male",
|
||||
"user_id": "MaxwellLord@example.com",
|
||||
"first_name": "Maxwell",
|
||||
"last_name": "Lord"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1969-08-03",
|
||||
"date_of_joining": "1993-10-21",
|
||||
"employee_name": "Grace Choi",
|
||||
"gender": "Female",
|
||||
"user_id": "GraceChoi@example.com",
|
||||
"first_name": "Grace",
|
||||
"last_name": "Choi"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1982-09-03",
|
||||
"date_of_joining": "2005-09-06",
|
||||
"employee_name": "Vandal Savage",
|
||||
"gender": "Male",
|
||||
"user_id": "VandalSavage@example.com",
|
||||
"first_name": "Vandal",
|
||||
"last_name": "Savage"
|
||||
},
|
||||
{
|
||||
"date_of_birth": "1985-10-03",
|
||||
"date_of_joining": "2007-12-25",
|
||||
"employee_name": "Caitlin Snow",
|
||||
"gender": "Female",
|
||||
"user_id": "CaitlinSnow@example.com",
|
||||
"first_name": "Caitlin",
|
||||
"last_name": "Snow"
|
||||
}
|
||||
]
|
||||
@@ -1,337 +1,493 @@
|
||||
[
|
||||
{
|
||||
"default_supplier": "Asiatic Solutions",
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "For Upper Bearing",
|
||||
"image": "/assets/erpnext_demo/images/disc.png",
|
||||
"item_code": "Disc Collars",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Disc Collars"
|
||||
},
|
||||
{
|
||||
"default_supplier": "Nan Duskin",
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "CAST IRON, MCMASTER PART NO. 3710T13",
|
||||
"image": "/assets/erpnext_demo/images/bearing.jpg",
|
||||
"item_code": "Bearing Block",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Bearing Block"
|
||||
},
|
||||
{
|
||||
"default_supplier": null,
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Finished Goods"
|
||||
}],
|
||||
"description": "Wind Mill C Series for Commercial Use 18ft",
|
||||
"image": "/assets/erpnext_demo/images/wind-turbine-2.png",
|
||||
"item_code": "Wind MIll C Series",
|
||||
"item_group": "Products",
|
||||
"item_name": "Wind MIll C Series"
|
||||
},
|
||||
{
|
||||
"default_supplier": null,
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Finished Goods"
|
||||
}],
|
||||
"description": "Wind Mill A Series for Home Use 9ft",
|
||||
"image": "/assets/erpnext_demo/images/wind-turbine.png",
|
||||
"item_code": "Wind Mill A Series",
|
||||
"item_group": "Products",
|
||||
"item_name": "Wind Mill A Series"
|
||||
},
|
||||
{
|
||||
"default_supplier": null,
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Finished Goods"
|
||||
}],
|
||||
"description": "Small Wind Turbine for Home Use\n\n\n<!-- html -->",
|
||||
"image": "/assets/erpnext_demo/images/wind-turbine-1.jpg",
|
||||
"item_code": "Wind Turbine",
|
||||
"item_group": "Products",
|
||||
"item_name": "Wind Turbine",
|
||||
"has_variants": 1,
|
||||
"has_serial_no": 1,
|
||||
"attributes":[
|
||||
{ "attribute": "Size" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"default_supplier": "HomeBase",
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "1.5 in. Diameter x 36 in. Mild Steel Tubing",
|
||||
"image": null,
|
||||
"item_code": "Bearing Pipe",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Bearing Pipe"
|
||||
},
|
||||
{
|
||||
"default_supplier": "New World Realty",
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "1/32 in. x 24 in. x 47 in. HDPE Opaque Sheet",
|
||||
"image": null,
|
||||
"item_code": "Wing Sheet",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Wing Sheet"
|
||||
},
|
||||
{
|
||||
"default_supplier": "Eagle Hardware",
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "3/16 in. x 6 in. x 6 in. Low Carbon Steel Plate",
|
||||
"image": null,
|
||||
"item_code": "Upper Bearing Plate",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Upper Bearing Plate"
|
||||
},
|
||||
{
|
||||
"default_supplier": "Asiatic Solutions",
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "Bearing Assembly",
|
||||
"image": null,
|
||||
"item_code": "Bearing Assembly",
|
||||
"item_group": "Sub Assemblies",
|
||||
"item_name": "Bearing Assembly"
|
||||
},
|
||||
{
|
||||
"default_supplier": "HomeBase",
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "3/4 in. x 2 ft. x 4 ft. Pine Plywood",
|
||||
"image": null,
|
||||
"item_code": "Base Plate",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Base Plate",
|
||||
"is_sub_contracted_item": 1
|
||||
},
|
||||
{
|
||||
"default_supplier": "Scott Ties",
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "N/A",
|
||||
"image": null,
|
||||
"item_code": "Stand",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Stand"
|
||||
},
|
||||
{
|
||||
"default_supplier": "Eagle Hardware",
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "1 in. x 3 in. x 1 ft. Multipurpose Al Alloy Bar",
|
||||
"image": null,
|
||||
"item_code": "Bearing Collar",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Bearing Collar"
|
||||
},
|
||||
{
|
||||
"default_supplier": "Eagle Hardware",
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "1/4 in. x 6 in. x 6 in. Mild Steel Plate",
|
||||
"image": null,
|
||||
"item_code": "Base Bearing Plate",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Base Bearing Plate"
|
||||
},
|
||||
{
|
||||
"default_supplier": "HomeBase",
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "15/32 in. x 4 ft. x 8 ft. 3-Ply Rtd Sheathing",
|
||||
"image": null,
|
||||
"item_code": "External Disc",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "External Disc"
|
||||
},
|
||||
{
|
||||
"default_supplier": "Eagle Hardware",
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "1.25 in. Diameter x 6 ft. Mild Steel Tubing",
|
||||
"image": null,
|
||||
"item_code": "Shaft",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Shaft"
|
||||
},
|
||||
{
|
||||
"default_supplier": "Ks Merchandise",
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "1/2 in. x 2 ft. x 4 ft. Pine Plywood",
|
||||
"image": null,
|
||||
"item_code": "Blade Rib",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Blade Rib"
|
||||
},
|
||||
{
|
||||
"default_supplier": "HomeBase",
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "For Bearing Collar",
|
||||
"image": null,
|
||||
"item_code": "Internal Disc",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Internal Disc"
|
||||
},
|
||||
{
|
||||
"default_supplier": null,
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Finished Goods"
|
||||
}],
|
||||
"description": "Small Wind Turbine for Home Use\n\n\n<!-- html -->\n<p>Size: Small</p>",
|
||||
"image": "/assets/erpnext_demo/images/wind-turbine-1.jpg",
|
||||
"item_code": "Wind Turbine-S",
|
||||
"item_group": "Products",
|
||||
"item_name": "Wind Turbine-S",
|
||||
"variant_of": "Wind Turbine",
|
||||
"valuation_rate": 300,
|
||||
"attributes":[
|
||||
{
|
||||
"attribute": "Size",
|
||||
"attribute_value": "Small"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"default_supplier": null,
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Finished Goods"
|
||||
}],
|
||||
"description": "Small Wind Turbine for Home Use\n\n\n<!-- html -->\n<p>Size: Medium</p>",
|
||||
"image": "/assets/erpnext_demo/images/wind-turbine-1.jpg",
|
||||
"item_code": "Wind Turbine-M",
|
||||
"item_group": "Products",
|
||||
"item_name": "Wind Turbine-M",
|
||||
"variant_of": "Wind Turbine",
|
||||
"valuation_rate": 300,
|
||||
"attributes":[
|
||||
{
|
||||
"attribute": "Size",
|
||||
"attribute_value": "Medium"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"default_supplier": null,
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Finished Goods"
|
||||
}],
|
||||
"description": "Small Wind Turbine for Home Use\n\n\n<!-- html -->\n<p>Size: Large</p>",
|
||||
"image": "/assets/erpnext_demo/images/wind-turbine-1.jpg",
|
||||
"item_code": "Wind Turbine-L",
|
||||
"item_group": "Products",
|
||||
"item_name": "Wind Turbine-L",
|
||||
"variant_of": "Wind Turbine",
|
||||
"valuation_rate": 300,
|
||||
"attributes":[
|
||||
{
|
||||
"attribute": "Size",
|
||||
"attribute_value": "Large"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"is_stock_item": 0,
|
||||
"description": "Wind Mill A Series with Spare Bearing",
|
||||
"item_code": "Wind Mill A Series with Spare Bearing",
|
||||
"item_group": "Products",
|
||||
"item_name": "Wind Mill A Series with Spare Bearing"
|
||||
},
|
||||
{
|
||||
"default_supplier": "HomeBase",
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "3/4 in. x 2 ft. x 4 ft. Pine Plywood",
|
||||
"image": null,
|
||||
"item_code": "Base Plate Un Painted",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Base Plate Un Painted"
|
||||
},
|
||||
{
|
||||
"is_fixed_asset": 1,
|
||||
"asset_category": "Furnitures",
|
||||
"is_stock_item": 0,
|
||||
"description": "Table",
|
||||
"item_code": "Table",
|
||||
"item_name": "Table",
|
||||
"item_group": "Products"
|
||||
},
|
||||
{
|
||||
"is_fixed_asset": 1,
|
||||
"asset_category": "Furnitures",
|
||||
"is_stock_item": 0,
|
||||
"description": "Chair",
|
||||
"item_code": "Chair",
|
||||
"item_name": "Chair",
|
||||
"item_group": "Products"
|
||||
},
|
||||
{
|
||||
"is_fixed_asset": 1,
|
||||
"asset_category": "Electronic Equipments",
|
||||
"is_stock_item": 0,
|
||||
"description": "Computer",
|
||||
"item_code": "Computer",
|
||||
"item_name": "Computer",
|
||||
"item_group": "Products"
|
||||
},
|
||||
{
|
||||
"is_fixed_asset": 1,
|
||||
"asset_category": "Electronic Equipments",
|
||||
"is_stock_item": 0,
|
||||
"description": "Mobile",
|
||||
"item_code": "Mobile",
|
||||
"item_name": "Mobile",
|
||||
"item_group": "Products"
|
||||
},
|
||||
{
|
||||
"is_fixed_asset": 1,
|
||||
"asset_category": "Softwares",
|
||||
"is_stock_item": 0,
|
||||
"description": "ERP",
|
||||
"item_code": "ERP",
|
||||
"item_name": "ERP",
|
||||
"item_group": "All Item Groups"
|
||||
},
|
||||
{
|
||||
"is_fixed_asset": 1,
|
||||
"asset_category": "Softwares",
|
||||
"is_stock_item": 0,
|
||||
"description": "Autocad",
|
||||
"item_code": "Autocad",
|
||||
"item_name": "Autocad",
|
||||
"item_group": "All Item Groups"
|
||||
},
|
||||
{
|
||||
"is_stock_item": 1,
|
||||
"has_batch_no": 1,
|
||||
"create_new_batch": 1,
|
||||
"valuation_rate": 200,
|
||||
"item_defaults": [{
|
||||
"default_warehouse": "Stores"
|
||||
}],
|
||||
"description": "Corrugated Box",
|
||||
"item_code": "Corrugated Box",
|
||||
"item_name": "Corrugated Box",
|
||||
"item_group": "All Item Groups"
|
||||
}
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": "Asiatic Solutions",
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "For Upper Bearing",
|
||||
"image": "/assets/erpnext_demo/images/disc.png",
|
||||
"item_code": "Disc Collars",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Disc Collars"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": "Nan Duskin",
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "CAST IRON, MCMASTER PART NO. 3710T13",
|
||||
"image": "/assets/erpnext_demo/images/bearing.jpg",
|
||||
"item_code": "Bearing Block",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Bearing Block"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": null,
|
||||
"default_warehouse": "Finished Goods"
|
||||
}
|
||||
],
|
||||
"description": "Wind Mill C Series for Commercial Use 18ft",
|
||||
"image": "/assets/erpnext_demo/images/wind-turbine-2.png",
|
||||
"item_code": "Wind MIll C Series",
|
||||
"item_group": "Products",
|
||||
"item_name": "Wind MIll C Series"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": null,
|
||||
"default_warehouse": "Finished Goods"
|
||||
}
|
||||
],
|
||||
"description": "Wind Mill A Series for Home Use 9ft",
|
||||
"image": "/assets/erpnext_demo/images/wind-turbine.png",
|
||||
"item_code": "Wind Mill A Series",
|
||||
"item_group": "Products",
|
||||
"item_name": "Wind Mill A Series"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": null,
|
||||
"default_warehouse": "Finished Goods"
|
||||
}
|
||||
],
|
||||
"description": "Small Wind Turbine for Home Use\n\n\n<!-- html -->",
|
||||
"image": "/assets/erpnext_demo/images/wind-turbine-1.jpg",
|
||||
"item_code": "Wind Turbine",
|
||||
"item_group": "Products",
|
||||
"item_name": "Wind Turbine",
|
||||
"has_variants": 1,
|
||||
"has_serial_no": 1,
|
||||
"attributes": [
|
||||
{
|
||||
"attribute": "Size"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": "HomeBase",
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "1.5 in. Diameter x 36 in. Mild Steel Tubing",
|
||||
"image": null,
|
||||
"item_code": "Bearing Pipe",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Bearing Pipe"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": "New World Realty",
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "1/32 in. x 24 in. x 47 in. HDPE Opaque Sheet",
|
||||
"image": null,
|
||||
"item_code": "Wing Sheet",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Wing Sheet"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": "Eagle Hardware",
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "3/16 in. x 6 in. x 6 in. Low Carbon Steel Plate",
|
||||
"image": null,
|
||||
"item_code": "Upper Bearing Plate",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Upper Bearing Plate"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": "Asiatic Solutions",
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "Bearing Assembly",
|
||||
"image": null,
|
||||
"item_code": "Bearing Assembly",
|
||||
"item_group": "Sub Assemblies",
|
||||
"item_name": "Bearing Assembly"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": "HomeBase",
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "3/4 in. x 2 ft. x 4 ft. Pine Plywood",
|
||||
"image": null,
|
||||
"item_code": "Base Plate",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Base Plate",
|
||||
"is_sub_contracted_item": 1
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": "Scott Ties",
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "N/A",
|
||||
"image": null,
|
||||
"item_code": "Stand",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Stand"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": "Eagle Hardware",
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "1 in. x 3 in. x 1 ft. Multipurpose Al Alloy Bar",
|
||||
"image": null,
|
||||
"item_code": "Bearing Collar",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Bearing Collar"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": "Eagle Hardware",
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "1/4 in. x 6 in. x 6 in. Mild Steel Plate",
|
||||
"image": null,
|
||||
"item_code": "Base Bearing Plate",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Base Bearing Plate"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": "HomeBase",
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "15/32 in. x 4 ft. x 8 ft. 3-Ply Rtd Sheathing",
|
||||
"image": null,
|
||||
"item_code": "External Disc",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "External Disc"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": "Eagle Hardware",
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "1.25 in. Diameter x 6 ft. Mild Steel Tubing",
|
||||
"image": null,
|
||||
"item_code": "Shaft",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Shaft"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": "Ks Merchandise",
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "1/2 in. x 2 ft. x 4 ft. Pine Plywood",
|
||||
"image": null,
|
||||
"item_code": "Blade Rib",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Blade Rib"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": "HomeBase",
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "For Bearing Collar",
|
||||
"image": null,
|
||||
"item_code": "Internal Disc",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Internal Disc"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": null,
|
||||
"default_warehouse": "Finished Goods"
|
||||
}
|
||||
],
|
||||
"description": "Small Wind Turbine for Home Use\n\n\n<!-- html -->\n<p>Size: Small</p>",
|
||||
"image": "/assets/erpnext_demo/images/wind-turbine-1.jpg",
|
||||
"item_code": "Wind Turbine-S",
|
||||
"item_group": "Products",
|
||||
"item_name": "Wind Turbine-S",
|
||||
"variant_of": "Wind Turbine",
|
||||
"valuation_rate": 300,
|
||||
"attributes": [
|
||||
{
|
||||
"attribute": "Size",
|
||||
"attribute_value": "Small"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": null,
|
||||
"default_warehouse": "Finished Goods"
|
||||
}
|
||||
],
|
||||
"description": "Small Wind Turbine for Home Use\n\n\n<!-- html -->\n<p>Size: Medium</p>",
|
||||
"image": "/assets/erpnext_demo/images/wind-turbine-1.jpg",
|
||||
"item_code": "Wind Turbine-M",
|
||||
"item_group": "Products",
|
||||
"item_name": "Wind Turbine-M",
|
||||
"variant_of": "Wind Turbine",
|
||||
"valuation_rate": 300,
|
||||
"attributes": [
|
||||
{
|
||||
"attribute": "Size",
|
||||
"attribute_value": "Medium"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": null,
|
||||
"default_warehouse": "Finished Goods"
|
||||
}
|
||||
],
|
||||
"description": "Small Wind Turbine for Home Use\n\n\n<!-- html -->\n<p>Size: Large</p>",
|
||||
"image": "/assets/erpnext_demo/images/wind-turbine-1.jpg",
|
||||
"item_code": "Wind Turbine-L",
|
||||
"item_group": "Products",
|
||||
"item_name": "Wind Turbine-L",
|
||||
"variant_of": "Wind Turbine",
|
||||
"valuation_rate": 300,
|
||||
"attributes": [
|
||||
{
|
||||
"attribute": "Size",
|
||||
"attribute_value": "Large"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"is_stock_item": 0,
|
||||
"description": "Wind Mill A Series with Spare Bearing",
|
||||
"item_code": "Wind Mill A Series with Spare Bearing",
|
||||
"item_group": "Products",
|
||||
"item_name": "Wind Mill A Series with Spare Bearing"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_supplier": "HomeBase",
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "3/4 in. x 2 ft. x 4 ft. Pine Plywood",
|
||||
"image": null,
|
||||
"item_code": "Base Plate Un Painted",
|
||||
"item_group": "Raw Material",
|
||||
"item_name": "Base Plate Un Painted"
|
||||
},
|
||||
{
|
||||
"is_fixed_asset": 1,
|
||||
"asset_category": "Furnitures",
|
||||
"is_stock_item": 0,
|
||||
"description": "Table",
|
||||
"item_code": "Table",
|
||||
"item_name": "Table",
|
||||
"item_group": "Products"
|
||||
},
|
||||
{
|
||||
"is_fixed_asset": 1,
|
||||
"asset_category": "Furnitures",
|
||||
"is_stock_item": 0,
|
||||
"description": "Chair",
|
||||
"item_code": "Chair",
|
||||
"item_name": "Chair",
|
||||
"item_group": "Products"
|
||||
},
|
||||
{
|
||||
"is_fixed_asset": 1,
|
||||
"asset_category": "Electronic Equipments",
|
||||
"is_stock_item": 0,
|
||||
"description": "Computer",
|
||||
"item_code": "Computer",
|
||||
"item_name": "Computer",
|
||||
"item_group": "Products"
|
||||
},
|
||||
{
|
||||
"is_fixed_asset": 1,
|
||||
"asset_category": "Electronic Equipments",
|
||||
"is_stock_item": 0,
|
||||
"description": "Mobile",
|
||||
"item_code": "Mobile",
|
||||
"item_name": "Mobile",
|
||||
"item_group": "Products"
|
||||
},
|
||||
{
|
||||
"is_fixed_asset": 1,
|
||||
"asset_category": "Softwares",
|
||||
"is_stock_item": 0,
|
||||
"description": "ERP",
|
||||
"item_code": "ERP",
|
||||
"item_name": "ERP",
|
||||
"item_group": "All Item Groups"
|
||||
},
|
||||
{
|
||||
"is_fixed_asset": 1,
|
||||
"asset_category": "Softwares",
|
||||
"is_stock_item": 0,
|
||||
"description": "Autocad",
|
||||
"item_code": "Autocad",
|
||||
"item_name": "Autocad",
|
||||
"item_group": "All Item Groups"
|
||||
},
|
||||
{
|
||||
"is_stock_item": 1,
|
||||
"has_batch_no": 1,
|
||||
"create_new_batch": 1,
|
||||
"valuation_rate": 200,
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_warehouse": "Stores"
|
||||
}
|
||||
],
|
||||
"description": "Corrugated Box",
|
||||
"item_code": "Corrugated Box",
|
||||
"item_name": "Corrugated Box",
|
||||
"item_group": "All Item Groups"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_warehouse": "Finished Goods"
|
||||
}
|
||||
],
|
||||
"is_stock_item": 1,
|
||||
"description": "OnePlus 6",
|
||||
"item_code": "OnePlus 6",
|
||||
"item_name": "OnePlus 6",
|
||||
"item_group": "Products",
|
||||
"domain": "Retail"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_warehouse": "Finished Goods"
|
||||
}
|
||||
],
|
||||
"is_stock_item": 1,
|
||||
"description": "OnePlus 6T",
|
||||
"item_code": "OnePlus 6T",
|
||||
"item_name": "OnePlus 6T",
|
||||
"item_group": "Products",
|
||||
"domain": "Retail"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_warehouse": "Finished Goods"
|
||||
}
|
||||
],
|
||||
"is_stock_item": 1,
|
||||
"description": "Xiaomi Poco F1",
|
||||
"item_code": "Xiaomi Poco F1",
|
||||
"item_name": "Xiaomi Poco F1",
|
||||
"item_group": "Products",
|
||||
"domain": "Retail"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_warehouse": "Finished Goods"
|
||||
}
|
||||
],
|
||||
"is_stock_item": 1,
|
||||
"description": "Iphone XS",
|
||||
"item_code": "Iphone XS",
|
||||
"item_name": "Iphone XS",
|
||||
"item_group": "Products",
|
||||
"domain": "Retail"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_warehouse": "Finished Goods"
|
||||
}
|
||||
],
|
||||
"is_stock_item": 1,
|
||||
"description": "Samsung Galaxy S9",
|
||||
"item_code": "Samsung Galaxy S9",
|
||||
"item_name": "Samsung Galaxy S9",
|
||||
"item_group": "Products",
|
||||
"domain": "Retail"
|
||||
},
|
||||
{
|
||||
"item_defaults": [
|
||||
{
|
||||
"default_warehouse": "Finished Goods"
|
||||
}
|
||||
],
|
||||
"is_stock_item": 1,
|
||||
"description": "Sony Bluetooth Headphone",
|
||||
"item_code": "Sony Bluetooth Headphone",
|
||||
"item_name": "Sony Bluetooth Headphone",
|
||||
"item_group": "Products",
|
||||
"domain": "Retail"
|
||||
},
|
||||
{
|
||||
"is_stock_item": 0,
|
||||
"description": "Samsung Phone Repair",
|
||||
"item_code": "Samsung Phone Repair",
|
||||
"item_name": "Samsung Phone Repair",
|
||||
"item_group": "Services",
|
||||
"domain": "Retail"
|
||||
},
|
||||
{
|
||||
"is_stock_item": 0,
|
||||
"description": "OnePlus Phone Repair",
|
||||
"item_code": "OnePlus Phone Repair",
|
||||
"item_name": "OnePlus Phone Repair",
|
||||
"item_group": "Services",
|
||||
"domain": "Retail"
|
||||
},
|
||||
{
|
||||
"is_stock_item": 0,
|
||||
"description": "Xiaomi Phone Repair",
|
||||
"item_code": "Xiaomi Phone Repair",
|
||||
"item_name": "Xiaomi Phone Repair",
|
||||
"item_group": "Services",
|
||||
"domain": "Retail"
|
||||
},
|
||||
{
|
||||
"is_stock_item": 0,
|
||||
"description": "Apple Phone Repair",
|
||||
"item_code": "Apple Phone Repair",
|
||||
"item_name": "Apple Phone Repair",
|
||||
"item_group": "Services",
|
||||
"domain": "Retail"
|
||||
}
|
||||
]
|
||||
@@ -5,104 +5,104 @@
|
||||
"last_name": "User"
|
||||
},
|
||||
{
|
||||
"email": "DikmanShervashidze@example.com",
|
||||
"first_name": "Dikman",
|
||||
"last_name": "Shervashidze"
|
||||
"email": "DianaPrince@example.com",
|
||||
"first_name": "Diana",
|
||||
"last_name": "Prince"
|
||||
},
|
||||
{
|
||||
"email": "Zukutakitoteka@example.com",
|
||||
"first_name": "Zukutakitoteka",
|
||||
"last_name": null
|
||||
"email": "ZatannaZatara@example.com",
|
||||
"first_name": "Zatanna",
|
||||
"last_name": "Zatara"
|
||||
},
|
||||
{
|
||||
"email": "HatsueKashiwagi@example.com",
|
||||
"first_name": "Hatsue",
|
||||
"last_name": "Kashiwagi"
|
||||
"email": "HollyGranger@example.com",
|
||||
"first_name": "Holly",
|
||||
"last_name": "Granger"
|
||||
},
|
||||
{
|
||||
"email": "NuranVerkleij@example.com",
|
||||
"first_name": "Nuran",
|
||||
"last_name": "Verkleij"
|
||||
"email": "NeptuniaAquaria@example.com",
|
||||
"first_name": "Neptunia",
|
||||
"last_name": "Aquaria"
|
||||
},
|
||||
{
|
||||
"email": "aromn@example.com",
|
||||
"first_name": "Arom",
|
||||
"last_name": "Nolan"
|
||||
"email": "ArthurCurry@example.com",
|
||||
"first_name": "Arthur",
|
||||
"last_name": "Curry"
|
||||
},
|
||||
{
|
||||
"email": "TildeLindqvist@example.com",
|
||||
"first_name": "Tilde",
|
||||
"last_name": "Lindqvist"
|
||||
"email": "ThaliaAlGhul@example.com",
|
||||
"first_name": "Thalia",
|
||||
"last_name": "Al Ghul"
|
||||
},
|
||||
{
|
||||
"email": "MichalSobczak@example.com",
|
||||
"first_name": "Micha\u0142",
|
||||
"last_name": "Sobczak"
|
||||
"email": "MaxwellLord@example.com",
|
||||
"first_name": "Maxwell",
|
||||
"last_name": "Lord"
|
||||
},
|
||||
{
|
||||
"email": "GabrielleLoftus@example.com",
|
||||
"first_name": "Gabrielle",
|
||||
"last_name": "Loftus"
|
||||
"email": "GraceChoi@example.com",
|
||||
"first_name": "Grace",
|
||||
"last_name": "Choi"
|
||||
},
|
||||
{
|
||||
"email": "VakhitaRyzaev@example.com",
|
||||
"first_name": "Vakhita",
|
||||
"last_name": "Ryzaev"
|
||||
"email": "VandalSavage@example.com",
|
||||
"first_name": "Vandal",
|
||||
"last_name": "Savage"
|
||||
},
|
||||
{
|
||||
"email": "CharmaineGaudreau@example.com",
|
||||
"first_name": "Charmaine",
|
||||
"last_name": "Gaudreau"
|
||||
"email": "CaitlinSnow@example.com",
|
||||
"first_name": "Caitlin",
|
||||
"last_name": "Snow"
|
||||
},
|
||||
{
|
||||
"email": "RafaelaMaartens@example.com",
|
||||
"first_name": "Rafa\u00ebla",
|
||||
"last_name": "Maartens"
|
||||
"email": "RipHunter@example.com",
|
||||
"first_name": "Rip",
|
||||
"last_name": "Hunter"
|
||||
},
|
||||
{
|
||||
"email": "NuguseYohannes@example.com",
|
||||
"first_name": "Nuguse",
|
||||
"last_name": "Yohannes"
|
||||
"email": "NicholasFury@example.com",
|
||||
"first_name": "Nicholas",
|
||||
"last_name": "Fury"
|
||||
},
|
||||
{
|
||||
"email": "panca@example.com",
|
||||
"first_name": "\u0420\u0430\u0438\u0441\u0430",
|
||||
"last_name": "\u0411\u0435\u043b\u044f\u043a\u043e\u0432\u0430"
|
||||
"email": "PeterParker@example.com",
|
||||
"first_name": "Peter",
|
||||
"last_name": "Parker"
|
||||
},
|
||||
{
|
||||
"email": "CaYinLong@example.com",
|
||||
"first_name": "\u80e4\u9686",
|
||||
"last_name": "\u8521"
|
||||
"email": "JohnConstantine@example.com",
|
||||
"first_name": "John",
|
||||
"last_name": "Constantine"
|
||||
},
|
||||
{
|
||||
"email": "FreddieScott@example.com",
|
||||
"first_name": "Freddie",
|
||||
"last_name": "Scott"
|
||||
"email": "HalJordan@example.com",
|
||||
"first_name": "Hal",
|
||||
"last_name": "Jordan"
|
||||
},
|
||||
{
|
||||
"email": "BergoraVigfusdottir@example.com",
|
||||
"first_name": "Berg\u00fe\u00f3ra",
|
||||
"last_name": "Vigf\u00fasd\u00f3ttir"
|
||||
"email": "VictorStone@example.com",
|
||||
"first_name": "Victor",
|
||||
"last_name": "Stone"
|
||||
},
|
||||
{
|
||||
"email": "WardNajmalDinKalb@example.com",
|
||||
"first_name": "Ward",
|
||||
"last_name": "Kalb"
|
||||
"email": "BruceWayne@example.com",
|
||||
"first_name": "Bruce",
|
||||
"last_name": "Wayne"
|
||||
},
|
||||
{
|
||||
"email": "WanMai@example.com",
|
||||
"first_name": "Wan",
|
||||
"last_name": "Mai"
|
||||
"email": "ClarkKent@example.com",
|
||||
"first_name": "Clark",
|
||||
"last_name": "Kent"
|
||||
},
|
||||
{
|
||||
"email": "LeonAbdulov@example.com",
|
||||
"first_name": "Leon",
|
||||
"last_name": "Abdulov"
|
||||
"email": "BarryAllen@example.com",
|
||||
"first_name": "Barry",
|
||||
"last_name": "Allen"
|
||||
},
|
||||
{
|
||||
"email": "SabinaNovotna@example.com",
|
||||
"first_name": "Sabina",
|
||||
"last_name": "Novotn\u00e1"
|
||||
"email": "KaraZorEl@example.com",
|
||||
"first_name": "Kara",
|
||||
"last_name": "Zor El"
|
||||
},
|
||||
{
|
||||
"email": "demo@erpnext.com",
|
||||
|
||||
@@ -3,8 +3,9 @@ from __future__ import unicode_literals
|
||||
import frappe, sys
|
||||
import erpnext
|
||||
import frappe.utils
|
||||
from erpnext.demo.user import hr, sales, purchase, manufacturing, stock, accounts, projects, fixed_asset, education
|
||||
from erpnext.demo.setup import education, manufacture, setup_data, healthcare
|
||||
from erpnext.demo.user import hr, sales, purchase, manufacturing, stock, accounts, projects, fixed_asset
|
||||
from erpnext.demo.user import education as edu
|
||||
from erpnext.demo.setup import education, manufacture, setup_data, healthcare, retail
|
||||
"""
|
||||
Make a demo
|
||||
|
||||
@@ -28,6 +29,8 @@ def make(domain='Manufacturing', days=100):
|
||||
setup_data.setup(domain)
|
||||
if domain== 'Manufacturing':
|
||||
manufacture.setup_data()
|
||||
elif domain == "Retail":
|
||||
retail.setup_data()
|
||||
elif domain== 'Education':
|
||||
education.setup_data()
|
||||
elif domain== 'Healthcare':
|
||||
@@ -77,13 +80,13 @@ def simulate(domain='Manufacturing', days=100):
|
||||
stock.work()
|
||||
accounts.work()
|
||||
projects.run_projects(current_date)
|
||||
sales.work(domain)
|
||||
# run_messages()
|
||||
|
||||
if domain=='Manufacturing':
|
||||
sales.work()
|
||||
manufacturing.work()
|
||||
elif domain=='Education':
|
||||
education.work()
|
||||
edu.work()
|
||||
|
||||
except:
|
||||
frappe.db.set_global('demo_last_date', current_date)
|
||||
|
||||
@@ -5,7 +5,7 @@ data = {
|
||||
'company_name': 'Wind Power LLC'
|
||||
},
|
||||
'Retail': {
|
||||
'company_name': 'Annapurna Dairy Shop',
|
||||
'company_name': 'Mobile Next',
|
||||
},
|
||||
'Distribution': {
|
||||
'company_name': 'Soltice Hardware',
|
||||
|
||||
65
erpnext/demo/setup/retail.py
Normal file
65
erpnext/demo/setup/retail.py
Normal file
@@ -0,0 +1,65 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import random, json
|
||||
import frappe
|
||||
from frappe.utils import nowdate, add_days
|
||||
from erpnext.demo.setup.setup_data import import_json
|
||||
from erpnext.demo.domains import data
|
||||
|
||||
from six import iteritems
|
||||
|
||||
def setup_data():
|
||||
setup_item()
|
||||
setup_item_price()
|
||||
frappe.db.commit()
|
||||
frappe.clear_cache()
|
||||
|
||||
def setup_item():
|
||||
items = json.loads(open(frappe.get_app_path('erpnext', 'demo', 'data', 'item.json')).read())
|
||||
for i in items:
|
||||
if not i.get("domain") == "Retail": continue
|
||||
item = frappe.new_doc('Item')
|
||||
item.update(i)
|
||||
if hasattr(item, 'item_defaults') and item.item_defaults[0].default_warehouse:
|
||||
item.item_defaults[0].company = data.get("Retail").get('company_name')
|
||||
warehouse = frappe.get_all('Warehouse', filters={'warehouse_name': item.item_defaults[0].default_warehouse}, limit=1)
|
||||
if warehouse:
|
||||
item.item_defaults[0].default_warehouse = warehouse[0].name
|
||||
item.insert()
|
||||
|
||||
def setup_item_price():
|
||||
frappe.db.sql("delete from `tabItem Price`")
|
||||
|
||||
standard_selling = {
|
||||
"OnePlus 6": 579,
|
||||
"OnePlus 6T": 600,
|
||||
"Xiaomi Poco F1": 300,
|
||||
"Iphone XS": 999,
|
||||
"Samsung Galaxy S9": 720,
|
||||
"Sony Bluetooth Headphone": 99,
|
||||
"Xiaomi Phone Repair": 10,
|
||||
"Samsung Phone Repair": 20,
|
||||
"OnePlus Phone Repair": 15,
|
||||
"Apple Phone Repair": 30,
|
||||
}
|
||||
|
||||
standard_buying = {
|
||||
"OnePlus 6": 300,
|
||||
"OnePlus 6T": 350,
|
||||
"Xiaomi Poco F1": 200,
|
||||
"Iphone XS": 600,
|
||||
"Samsung Galaxy S9": 500,
|
||||
"Sony Bluetooth Headphone": 69
|
||||
}
|
||||
|
||||
for price_list in ("standard_buying", "standard_selling"):
|
||||
for item, rate in iteritems(locals().get(price_list)):
|
||||
frappe.get_doc({
|
||||
"doctype": "Item Price",
|
||||
"price_list": price_list.replace("_", " ").title(),
|
||||
"item_code": item,
|
||||
"selling": 1 if price_list=="standard_selling" else 0,
|
||||
"buying": 1 if price_list=="standard_buying" else 0,
|
||||
"price_list_rate": rate,
|
||||
"currency": "USD"
|
||||
}).insert()
|
||||
@@ -5,6 +5,7 @@ import frappe, erpnext
|
||||
from frappe.utils.nestedset import get_root_of
|
||||
from frappe.utils import flt, now_datetime, cstr, random_string
|
||||
from frappe.utils.make_random import add_random_children, get_random
|
||||
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
|
||||
from erpnext.demo.domains import data
|
||||
from frappe import _
|
||||
|
||||
@@ -14,9 +15,10 @@ def setup(domain):
|
||||
setup_fiscal_year()
|
||||
setup_holiday_list()
|
||||
setup_user()
|
||||
#setup_employee()
|
||||
setup_employee()
|
||||
setup_user_roles()
|
||||
setup_role_permissions()
|
||||
setup_custom_field_for_domain()
|
||||
|
||||
employees = frappe.get_all('Employee', fields=['name', 'date_of_joining'])
|
||||
|
||||
@@ -120,7 +122,7 @@ def setup_user():
|
||||
user = frappe.new_doc("User")
|
||||
user.update(u)
|
||||
user.flags.no_welcome_mail = True
|
||||
user.new_password = 'demo'
|
||||
user.new_password = 'Demo1234567!!!'
|
||||
user.insert()
|
||||
|
||||
def setup_employee():
|
||||
@@ -136,6 +138,8 @@ def setup_employee():
|
||||
salary_component.save()
|
||||
|
||||
import_json('Employee')
|
||||
holiday_list = frappe.db.get_value("Holiday List", {"holiday_list_name": str(now_datetime().year)}, 'name')
|
||||
frappe.db.sql('''update tabEmployee set holiday_list={0}'''.format(holiday_list))
|
||||
|
||||
def setup_salary_structure(employees, salary_slip_based_on_timesheet=0):
|
||||
ss = frappe.new_doc('Salary Structure')
|
||||
@@ -166,12 +170,16 @@ def setup_salary_structure(employees, salary_slip_based_on_timesheet=0):
|
||||
"idx": 1
|
||||
})
|
||||
ss.insert()
|
||||
ss.submit()
|
||||
|
||||
for e in employees:
|
||||
sa = frappe.new_doc("Salary Structure Assignment")
|
||||
sa.employee = e.name
|
||||
sa.salary_structure = ss.name
|
||||
sa.from_date = "2015-01-01"
|
||||
sa.base = random.random() * 10000
|
||||
sa.insert()
|
||||
sa.submit()
|
||||
|
||||
return ss
|
||||
|
||||
@@ -184,52 +192,63 @@ def setup_user_roles():
|
||||
'Nursing User', 'Patient')
|
||||
|
||||
if not frappe.db.get_global('demo_hr_user'):
|
||||
user = frappe.get_doc('User', 'CharmaineGaudreau@example.com')
|
||||
user = frappe.get_doc('User', 'CaitlinSnow@example.com')
|
||||
user.add_roles('HR User', 'HR Manager', 'Accounts User')
|
||||
frappe.db.set_global('demo_hr_user', user.name)
|
||||
update_employee_department(user.name, 'Human Resources')
|
||||
for d in frappe.get_all('User Permission', filters={"user": "CaitlinSnow@example.com"}):
|
||||
frappe.delete_doc('User Permission', d.name)
|
||||
|
||||
if not frappe.db.get_global('demo_sales_user_1'):
|
||||
user = frappe.get_doc('User', 'VakhitaRyzaev@example.com')
|
||||
user = frappe.get_doc('User', 'VandalSavage@example.com')
|
||||
user.add_roles('Sales User')
|
||||
update_employee_department(user.name, 'Sales')
|
||||
frappe.db.set_global('demo_sales_user_1', user.name)
|
||||
|
||||
if not frappe.db.get_global('demo_sales_user_2'):
|
||||
user = frappe.get_doc('User', 'GabrielleLoftus@example.com')
|
||||
user = frappe.get_doc('User', 'GraceChoi@example.com')
|
||||
user.add_roles('Sales User', 'Sales Manager', 'Accounts User')
|
||||
update_employee_department(user.name, 'Sales')
|
||||
frappe.db.set_global('demo_sales_user_2', user.name)
|
||||
|
||||
if not frappe.db.get_global('demo_purchase_user'):
|
||||
user = frappe.get_doc('User', 'MichalSobczak@example.com')
|
||||
user = frappe.get_doc('User', 'MaxwellLord@example.com')
|
||||
user.add_roles('Purchase User', 'Purchase Manager', 'Accounts User', 'Stock User')
|
||||
update_employee_department(user.name, 'Purchase')
|
||||
frappe.db.set_global('demo_purchase_user', user.name)
|
||||
|
||||
if not frappe.db.get_global('demo_manufacturing_user'):
|
||||
user = frappe.get_doc('User', 'NuranVerkleij@example.com')
|
||||
user = frappe.get_doc('User', 'NeptuniaAquaria@example.com')
|
||||
user.add_roles('Manufacturing User', 'Stock User', 'Purchase User', 'Accounts User')
|
||||
update_employee_department(user.name, 'Production')
|
||||
frappe.db.set_global('demo_manufacturing_user', user.name)
|
||||
|
||||
if not frappe.db.get_global('demo_stock_user'):
|
||||
user = frappe.get_doc('User', 'HatsueKashiwagi@example.com')
|
||||
user = frappe.get_doc('User', 'HollyGranger@example.com')
|
||||
user.add_roles('Manufacturing User', 'Stock User', 'Purchase User', 'Accounts User')
|
||||
update_employee_department(user.name, 'Production')
|
||||
frappe.db.set_global('demo_stock_user', user.name)
|
||||
|
||||
if not frappe.db.get_global('demo_accounts_user'):
|
||||
user = frappe.get_doc('User', 'LeonAbdulov@example.com')
|
||||
user = frappe.get_doc('User', 'BarryAllen@example.com')
|
||||
user.add_roles('Accounts User', 'Accounts Manager', 'Sales User', 'Purchase User')
|
||||
update_employee_department(user.name, 'Accounts')
|
||||
frappe.db.set_global('demo_accounts_user', user.name)
|
||||
|
||||
if not frappe.db.get_global('demo_projects_user'):
|
||||
user = frappe.get_doc('User', 'panca@example.com')
|
||||
user = frappe.get_doc('User', 'PeterParker@example.com')
|
||||
user.add_roles('HR User', 'Projects User')
|
||||
update_employee_department(user.name, 'Management')
|
||||
frappe.db.set_global('demo_projects_user', user.name)
|
||||
|
||||
if not frappe.db.get_global('demo_education_user'):
|
||||
user = frappe.get_doc('User', 'aromn@example.com')
|
||||
user = frappe.get_doc('User', 'ArthurCurry@example.com')
|
||||
user.add_roles('Academics User')
|
||||
update_employee_department(user.name, 'Management')
|
||||
frappe.db.set_global('demo_education_user', user.name)
|
||||
|
||||
#Add Expense Approver
|
||||
user = frappe.get_doc('User', 'WanMai@example.com')
|
||||
user = frappe.get_doc('User', 'ClarkKent@example.com')
|
||||
user.add_roles('Expense Approver')
|
||||
|
||||
def setup_leave_allocation():
|
||||
@@ -403,3 +422,19 @@ def import_json(doctype, submit=False, values=None):
|
||||
frappe.db.commit()
|
||||
|
||||
frappe.flags.in_import = False
|
||||
|
||||
def update_employee_department(user_id, department):
|
||||
employee = frappe.db.get_value('Employee', {"user_id": user_id}, 'name')
|
||||
department = frappe.db.get_value('Department', {'department_name': department}, 'name')
|
||||
frappe.db.set_value('Employee', employee, 'department', department)
|
||||
|
||||
def setup_custom_field_for_domain():
|
||||
field = {
|
||||
"Item": [
|
||||
dict(fieldname='domain', label='Domain',
|
||||
fieldtype='Select', hidden=1, default="Manufacturing",
|
||||
options="Manufacturing\nService\nDistribution\nRetail"
|
||||
)
|
||||
]
|
||||
}
|
||||
create_custom_fields(field)
|
||||
|
||||
@@ -56,7 +56,7 @@ def work():
|
||||
if random.random() < 0.5:
|
||||
make_payment_entries("Purchase Invoice", "Accounts Payable")
|
||||
|
||||
if random.random() < 0.1:
|
||||
if random.random() < 0.4:
|
||||
#make payment request against sales invoice
|
||||
sales_invoice_name = get_random("Sales Invoice", filters={"docstatus": 1})
|
||||
if sales_invoice_name:
|
||||
|
||||
@@ -14,34 +14,31 @@ from erpnext.hr.doctype.leave_application.leave_application import (get_leave_ba
|
||||
def work():
|
||||
frappe.set_user(frappe.db.get_global('demo_hr_user'))
|
||||
year, month = frappe.flags.current_date.strftime("%Y-%m").split("-")
|
||||
setup_department_approvers()
|
||||
mark_attendance()
|
||||
make_leave_application()
|
||||
|
||||
# payroll entry
|
||||
if not frappe.db.sql('select name from `tabSalary Slip` where month(adddate(start_date, interval 1 month))=month(curdate())'):
|
||||
# process payroll for previous month
|
||||
payroll_entry = frappe.new_doc("Payroll Entry")
|
||||
payroll_entry.company = frappe.flags.company
|
||||
payroll_entry.payroll_frequency = 'Monthly'
|
||||
|
||||
# select a posting date from the previous month
|
||||
payroll_entry.posting_date = get_last_day(getdate(frappe.flags.current_date) - datetime.timedelta(days=10))
|
||||
payroll_entry.payment_account = frappe.get_value('Account', {'account_type': 'Cash', 'company': erpnext.get_default_company(),'is_group':0}, "name")
|
||||
|
||||
payroll_entry.set_start_end_dates()
|
||||
|
||||
# based on frequency
|
||||
payroll_entry = get_payroll_entry()
|
||||
payroll_entry.salary_slip_based_on_timesheet = 0
|
||||
payroll_entry.save()
|
||||
payroll_entry.create_salary_slips()
|
||||
payroll_entry.submit_salary_slips()
|
||||
payroll_entry.make_accrual_jv_entry()
|
||||
payroll_entry.submit()
|
||||
# payroll_entry.make_journal_entry(reference_date=frappe.flags.current_date,
|
||||
# reference_number=random_string(10))
|
||||
|
||||
# based on timesheet
|
||||
payroll_entry = get_payroll_entry()
|
||||
payroll_entry.salary_slip_based_on_timesheet = 1
|
||||
payroll_entry.save()
|
||||
payroll_entry.create_salary_slips()
|
||||
payroll_entry.submit_salary_slips()
|
||||
payroll_entry.make_accrual_jv_entry()
|
||||
payroll_entry.submit()
|
||||
# payroll_entry.make_journal_entry(reference_date=frappe.flags.current_date,
|
||||
# reference_number=random_string(10))
|
||||
|
||||
@@ -55,12 +52,14 @@ def work():
|
||||
expense_claim.company = frappe.flags.company
|
||||
expense_claim.payable_account = get_payable_account(expense_claim.company)
|
||||
expense_claim.posting_date = frappe.flags.current_date
|
||||
expense_claim.insert()
|
||||
expense_claim.expense_approver = frappe.db.get_global('demo_hr_user')
|
||||
expense_claim.save()
|
||||
|
||||
rand = random.random()
|
||||
|
||||
if rand < 0.4:
|
||||
update_sanctioned_amount(expense_claim)
|
||||
expense_claim.approval_status = 'Approved'
|
||||
expense_claim.submit()
|
||||
|
||||
if random.randint(0, 1):
|
||||
@@ -72,6 +71,19 @@ def work():
|
||||
je.flags.ignore_permissions = 1
|
||||
je.submit()
|
||||
|
||||
def get_payroll_entry():
|
||||
# process payroll for previous month
|
||||
payroll_entry = frappe.new_doc("Payroll Entry")
|
||||
payroll_entry.company = frappe.flags.company
|
||||
payroll_entry.payroll_frequency = 'Monthly'
|
||||
|
||||
# select a posting date from the previous month
|
||||
payroll_entry.posting_date = get_last_day(getdate(frappe.flags.current_date) - datetime.timedelta(days=10))
|
||||
payroll_entry.payment_account = frappe.get_value('Account', {'account_type': 'Cash', 'company': erpnext.get_default_company(),'is_group':0}, "name")
|
||||
|
||||
payroll_entry.set_start_end_dates()
|
||||
return payroll_entry
|
||||
|
||||
def get_expenses():
|
||||
expenses = []
|
||||
expese_types = frappe.db.sql("""select ect.name, eca.default_account from `tabExpense Claim Type` ect,
|
||||
@@ -114,7 +126,7 @@ def get_timesheet_based_salary_slip_employee():
|
||||
def make_timesheet_records():
|
||||
employees = get_timesheet_based_salary_slip_employee()
|
||||
for e in employees:
|
||||
ts = make_timesheet(e.employee, simulate = True, billable = 1, activity_type=get_random("Activity Type"))
|
||||
ts = make_timesheet(e.employee, simulate = True, billable = 1, activity_type=get_random("Activity Type"), company=frappe.flags.company)
|
||||
frappe.db.commit()
|
||||
|
||||
rand = random.random()
|
||||
@@ -195,3 +207,11 @@ def mark_attendance():
|
||||
attendance.save()
|
||||
attendance.submit()
|
||||
frappe.db.commit()
|
||||
|
||||
def setup_department_approvers():
|
||||
for d in frappe.get_all('Department', filters={'department_name': ['!=', 'All Departments']}):
|
||||
doc = frappe.get_doc('Department', d.name)
|
||||
doc.append("leave_approvers", {'approver': frappe.session.user})
|
||||
doc.append("expense_approvers", {'approver': frappe.session.user})
|
||||
doc.flags.ignore_mandatory = True
|
||||
doc.save()
|
||||
|
||||
@@ -4,25 +4,32 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe, random, erpnext
|
||||
from datetime import timedelta
|
||||
from frappe.utils.make_random import how_many
|
||||
from frappe.desk import query_report
|
||||
from erpnext.manufacturing.doctype.workstation.workstation import WorkstationHolidayError
|
||||
from erpnext.manufacturing.doctype.work_order.test_work_order import make_wo_order_test_record
|
||||
|
||||
def work():
|
||||
if random.random() < 0.3: return
|
||||
|
||||
frappe.set_user(frappe.db.get_global('demo_manufacturing_user'))
|
||||
if not frappe.get_all('Sales Order'): return
|
||||
|
||||
from erpnext.projects.doctype.timesheet.timesheet import OverlapError
|
||||
|
||||
ppt = frappe.get_doc("Production Planning Tool", "Production Planning Tool")
|
||||
ppt = frappe.new_doc("Production Plan")
|
||||
ppt.company = erpnext.get_default_company()
|
||||
ppt.use_multi_level_bom = 1
|
||||
# ppt.use_multi_level_bom = 1 #refactored
|
||||
ppt.get_items_from = "Sales Order"
|
||||
ppt.purchase_request_for_warehouse = "Stores - WPL"
|
||||
# ppt.purchase_request_for_warehouse = "Stores - WPL" # refactored
|
||||
ppt.run_method("get_open_sales_orders")
|
||||
if not ppt.get("sales_orders"): return
|
||||
ppt.run_method("get_items")
|
||||
ppt.run_method("raise_work_orders")
|
||||
ppt.run_method("raise_material_requests")
|
||||
ppt.save()
|
||||
ppt.submit()
|
||||
ppt.run_method("raise_work_orders")
|
||||
frappe.db.commit()
|
||||
|
||||
# submit work orders
|
||||
@@ -39,12 +46,12 @@ def work():
|
||||
frappe.db.commit()
|
||||
|
||||
# stores -> wip
|
||||
if random.random() < 0.3:
|
||||
if random.random() < 0.4:
|
||||
for pro in query_report.run("Open Work Orders")["result"][:how_many("Stock Entry for WIP")]:
|
||||
make_stock_entry_from_pro(pro[0], "Material Transfer for Manufacture")
|
||||
|
||||
# wip -> fg
|
||||
if random.random() < 0.3:
|
||||
if random.random() < 0.4:
|
||||
for pro in query_report.run("Work Orders in Progress")["result"][:how_many("Stock Entry for FG")]:
|
||||
make_stock_entry_from_pro(pro[0], "Manufacture")
|
||||
|
||||
@@ -55,17 +62,9 @@ def work():
|
||||
stock_uom = frappe.db.get_value('Item', bom.item, 'stock_uom'),
|
||||
planned_start_date = frappe.flags.current_date)
|
||||
|
||||
# submit time logs
|
||||
for timesheet in frappe.get_all("Timesheet", ["name"], {"docstatus": 0,
|
||||
"work_order": ("!=", ""), "to_time": ("<", frappe.flags.current_date)}):
|
||||
timesheet = frappe.get_doc("Timesheet", timesheet.name)
|
||||
try:
|
||||
timesheet.submit()
|
||||
frappe.db.commit()
|
||||
except OverlapError:
|
||||
pass
|
||||
except WorkstationHolidayError:
|
||||
pass
|
||||
# submit job card
|
||||
if random.random() < 0.4:
|
||||
submit_job_cards()
|
||||
|
||||
def make_stock_entry_from_pro(pro_id, purpose):
|
||||
from erpnext.manufacturing.doctype.work_order.work_order import make_stock_entry
|
||||
@@ -86,3 +85,27 @@ def make_stock_entry_from_pro(pro_id, purpose):
|
||||
except (NegativeStockError, IncorrectValuationRateError, DuplicateEntryForWorkOrderError,
|
||||
OperationsNotCompleteError):
|
||||
frappe.db.rollback()
|
||||
|
||||
def submit_job_cards():
|
||||
work_orders = frappe.get_all("Work Order", ["name", "creation"], {"docstatus": 1, "status": "Not Started"})
|
||||
work_order = random.choice(work_orders)
|
||||
# for work_order in work_orders:
|
||||
start_date = work_order.creation
|
||||
work_order = frappe.get_doc("Work Order", work_order.name)
|
||||
job = frappe.get_all("Job Card", ["name", "operation", "work_order"],
|
||||
{"docstatus": 0, "work_order": work_order.name})
|
||||
|
||||
if not job: return
|
||||
job_map = {}
|
||||
for d in job:
|
||||
job_map[d.operation] = frappe.get_doc("Job Card", d.name)
|
||||
|
||||
for operation in work_order.operations:
|
||||
job = job_map[operation.operation]
|
||||
job.actual_start_date = start_date
|
||||
minutes = operation.get("time_in_mins")
|
||||
random_minutes = random.randint(int(minutes/2), minutes)
|
||||
job.actual_end_date = job.actual_start_date + timedelta(minutes=random_minutes)
|
||||
start_date = job.actual_end_date
|
||||
job.save()
|
||||
job.submit()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import frappe, erpnext
|
||||
from frappe.utils import flt
|
||||
from frappe.utils.make_random import get_random
|
||||
from erpnext.projects.doctype.timesheet.test_timesheet import make_timesheet
|
||||
@@ -19,7 +19,7 @@ def run_projects(current_date):
|
||||
def make_timesheet_for_projects(current_date ):
|
||||
for data in frappe.get_all("Task", ["name", "project"], {"status": "Open", "exp_end_date": ("<", current_date)}):
|
||||
employee = get_random("Employee")
|
||||
ts = make_timesheet(employee, simulate = True, billable = 1,
|
||||
ts = make_timesheet(employee, simulate = True, billable = 1, company = erpnext.get_default_company(),
|
||||
activity_type=get_random("Activity Type"), project=data.project, task =data.name)
|
||||
|
||||
if flt(ts.total_billable_amount) > 0.0:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe, random
|
||||
import frappe, random, json, erpnext
|
||||
from frappe.utils.make_random import how_many, get_random
|
||||
from frappe.desk import query_report
|
||||
from erpnext.setup.utils import get_exchange_rate
|
||||
@@ -16,14 +16,14 @@ from erpnext.buying.doctype.request_for_quotation.request_for_quotation import \
|
||||
def work():
|
||||
frappe.set_user(frappe.db.get_global('demo_purchase_user'))
|
||||
|
||||
if random.random() < 0.3:
|
||||
if random.random() < 0.6:
|
||||
report = "Items To Be Requested"
|
||||
for row in query_report.run(report)["result"][:random.randint(1, 5)]:
|
||||
item_code, qty = row[0], abs(row[-1])
|
||||
|
||||
mr = make_material_request(item_code, qty)
|
||||
|
||||
if random.random() < 0.3:
|
||||
if random.random() < 0.6:
|
||||
for mr in frappe.get_all('Material Request',
|
||||
filters={'material_request_type': 'Purchase', 'status': 'Open'},
|
||||
limit=random.randint(1,6)):
|
||||
@@ -36,7 +36,7 @@ def work():
|
||||
rfq.submit()
|
||||
|
||||
# Make suppier quotation from RFQ against each supplier.
|
||||
if random.random() < 0.3:
|
||||
if random.random() < 0.6:
|
||||
for rfq in frappe.get_all('Request for Quotation',
|
||||
filters={'status': 'Open'}, limit=random.randint(1, 6)):
|
||||
if not frappe.get_all('Supplier Quotation',
|
||||
@@ -51,15 +51,15 @@ def work():
|
||||
# get supplier details
|
||||
supplier = get_random("Supplier")
|
||||
|
||||
company_currency = frappe.get_cached_value('Company', "Wind Power LLC", "default_currency")
|
||||
party_account_currency = get_party_account_currency("Supplier", supplier, "Wind Power LLC")
|
||||
company_currency = frappe.get_cached_value('Company', erpnext.get_default_company(), "default_currency")
|
||||
party_account_currency = get_party_account_currency("Supplier", supplier, erpnext.get_default_company())
|
||||
if company_currency == party_account_currency:
|
||||
exchange_rate = 1
|
||||
else:
|
||||
exchange_rate = get_exchange_rate(party_account_currency, company_currency, args="for_buying")
|
||||
|
||||
# make supplier quotations
|
||||
if random.random() < 0.2:
|
||||
if random.random() < 0.5:
|
||||
from erpnext.stock.doctype.material_request.material_request import make_supplier_quotation
|
||||
|
||||
report = "Material Requests for which Supplier Quotations are not created"
|
||||
@@ -80,16 +80,20 @@ def work():
|
||||
report = "Requested Items To Be Ordered"
|
||||
for row in query_report.run(report)["result"][:how_many("Purchase Order")]:
|
||||
if row[0] != "'Total'":
|
||||
po = frappe.get_doc(make_purchase_order(row[0]))
|
||||
po.supplier = supplier
|
||||
po.currency = party_account_currency or company_currency
|
||||
po.conversion_rate = exchange_rate
|
||||
po.transaction_date = frappe.flags.current_date
|
||||
po.insert()
|
||||
po.submit()
|
||||
frappe.db.commit()
|
||||
try:
|
||||
po = frappe.get_doc(make_purchase_order(row[0]))
|
||||
po.supplier = supplier
|
||||
po.currency = party_account_currency or company_currency
|
||||
po.conversion_rate = exchange_rate
|
||||
po.transaction_date = frappe.flags.current_date
|
||||
po.insert()
|
||||
po.submit()
|
||||
except Exception:
|
||||
pass
|
||||
else:
|
||||
frappe.db.commit()
|
||||
|
||||
if random.random() < 0.2:
|
||||
if random.random() < 0.5:
|
||||
make_subcontract()
|
||||
|
||||
def make_material_request(item_code, qty):
|
||||
@@ -122,13 +126,14 @@ def add_suppliers(rfq):
|
||||
rfq.append("suppliers", { "supplier": supplier })
|
||||
|
||||
def make_subcontract():
|
||||
from erpnext.buying.doctype.purchase_order.purchase_order import make_stock_entry
|
||||
from erpnext.buying.doctype.purchase_order.purchase_order import make_rm_stock_entry
|
||||
item_code = get_random("Item", {"is_sub_contracted_item": 1})
|
||||
if item_code:
|
||||
# make sub-contract PO
|
||||
po = frappe.new_doc("Purchase Order")
|
||||
po.is_subcontracted = "Yes"
|
||||
po.supplier = get_random("Supplier")
|
||||
po.transaction_date = frappe.flags.current_date # added
|
||||
po.schedule_date = frappe.utils.add_days(frappe.flags.current_date, 7)
|
||||
|
||||
item_code = get_random("Item", {"is_sub_contracted_item": 1})
|
||||
@@ -150,7 +155,20 @@ def make_subcontract():
|
||||
make_material_request(po.items[0].item_code, po.items[0].qty)
|
||||
|
||||
# transfer material for sub-contract
|
||||
stock_entry = frappe.get_doc(make_stock_entry(po.name, po.items[0].item_code))
|
||||
rm_items = get_rm_item(po.items[0], po.supplied_items[0])
|
||||
stock_entry = frappe.get_doc(make_rm_stock_entry(po.name, json.dumps([rm_items])))
|
||||
stock_entry.from_warehouse = "Stores - WPL"
|
||||
stock_entry.to_warehouse = "Supplier - WPL"
|
||||
stock_entry.insert()
|
||||
|
||||
def get_rm_item(items, supplied_items):
|
||||
return {
|
||||
"item_code": items.get("item_code"),
|
||||
"rm_item_code": supplied_items.get("rm_item_code"),
|
||||
"item_name": supplied_items.get("rm_item_code"),
|
||||
"qty": supplied_items.get("required_qty") + random.randint(3,10),
|
||||
"amount": supplied_items.get("amount"),
|
||||
"warehouse": supplied_items.get("reserve_warehouse"),
|
||||
"rate": supplied_items.get("rate"),
|
||||
"stock_uom": supplied_items.get("stock_uom")
|
||||
}
|
||||
|
||||
@@ -3,22 +3,23 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe, random
|
||||
import frappe, random, erpnext
|
||||
from frappe.utils import flt
|
||||
from frappe.utils.make_random import add_random_children, get_random
|
||||
from erpnext.setup.utils import get_exchange_rate
|
||||
from erpnext.accounts.party import get_party_account_currency
|
||||
from erpnext.accounts.doctype.payment_request.payment_request import make_payment_request, make_payment_entry
|
||||
|
||||
def work():
|
||||
def work(domain="Manufacturing"):
|
||||
frappe.set_user(frappe.db.get_global('demo_sales_user_2'))
|
||||
if random.random() < 0.5:
|
||||
for i in range(random.randint(1,7)):
|
||||
make_opportunity()
|
||||
|
||||
if random.random() < 0.5:
|
||||
for i in range(random.randint(1,3)):
|
||||
make_quotation()
|
||||
for i in range(random.randint(1,7)):
|
||||
if random.random() < 0.5:
|
||||
make_opportunity(domain)
|
||||
|
||||
for i in range(random.randint(1,3)):
|
||||
if random.random() < 0.5:
|
||||
make_quotation(domain)
|
||||
|
||||
# lost quotations / inquiries
|
||||
if random.random() < 0.3:
|
||||
@@ -32,24 +33,27 @@ def work():
|
||||
if opportunity and opportunity.status in ('Open', 'Replied'):
|
||||
opportunity.declare_enquiry_lost('Did not ask')
|
||||
|
||||
if random.random() < 0.3:
|
||||
for i in range(random.randint(1,3)):
|
||||
for i in range(random.randint(1,3)):
|
||||
if random.random() < 0.6:
|
||||
make_sales_order()
|
||||
|
||||
if random.random() < 0.1:
|
||||
if random.random() < 0.5:
|
||||
#make payment request against Sales Order
|
||||
sales_order_name = get_random("Sales Order", filters={"docstatus": 1})
|
||||
if sales_order_name:
|
||||
so = frappe.get_doc("Sales Order", sales_order_name)
|
||||
if flt(so.per_billed) != 100:
|
||||
payment_request = make_payment_request(dt="Sales Order", dn=so.name, recipient_id=so.contact_email,
|
||||
submit_doc=True, mute_email=True, use_dummy_message=True)
|
||||
try:
|
||||
if sales_order_name:
|
||||
so = frappe.get_doc("Sales Order", sales_order_name)
|
||||
if flt(so.per_billed) != 100:
|
||||
payment_request = make_payment_request(dt="Sales Order", dn=so.name, recipient_id=so.contact_email,
|
||||
submit_doc=True, mute_email=True, use_dummy_message=True)
|
||||
|
||||
payment_entry = frappe.get_doc(make_payment_entry(payment_request.name))
|
||||
payment_entry.posting_date = frappe.flags.current_date
|
||||
payment_entry.submit()
|
||||
payment_entry = frappe.get_doc(make_payment_entry(payment_request.name))
|
||||
payment_entry.posting_date = frappe.flags.current_date
|
||||
payment_entry.submit()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def make_opportunity():
|
||||
def make_opportunity(domain):
|
||||
b = frappe.get_doc({
|
||||
"doctype": "Opportunity",
|
||||
"enquiry_from": "Customer",
|
||||
@@ -61,13 +65,13 @@ def make_opportunity():
|
||||
|
||||
add_random_children(b, "items", rows=4, randomize = {
|
||||
"qty": (1, 5),
|
||||
"item_code": ("Item", {"has_variants": 0, "is_fixed_asset": 0})
|
||||
"item_code": ("Item", {"has_variants": 0, "is_fixed_asset": 0, "domain": domain})
|
||||
}, unique="item_code")
|
||||
|
||||
b.insert()
|
||||
frappe.db.commit()
|
||||
|
||||
def make_quotation():
|
||||
def make_quotation(domain):
|
||||
# get open opportunites
|
||||
opportunity = get_random("Opportunity", {"status": "Open", "with_items": 1})
|
||||
|
||||
@@ -84,8 +88,8 @@ def make_quotation():
|
||||
# get customer, currency and exchange_rate
|
||||
customer = get_random("Customer")
|
||||
|
||||
company_currency = frappe.get_cached_value('Company', "Wind Power LLC", "default_currency")
|
||||
party_account_currency = get_party_account_currency("Customer", customer, "Wind Power LLC")
|
||||
company_currency = frappe.get_cached_value('Company', erpnext.get_default_company(), "default_currency")
|
||||
party_account_currency = get_party_account_currency("Customer", customer, erpnext.get_default_company())
|
||||
if company_currency == party_account_currency:
|
||||
exchange_rate = 1
|
||||
else:
|
||||
@@ -104,7 +108,7 @@ def make_quotation():
|
||||
|
||||
add_random_children(qtn, "items", rows=3, randomize = {
|
||||
"qty": (1, 5),
|
||||
"item_code": ("Item", {"has_variants": "0", "is_fixed_asset": 0})
|
||||
"item_code": ("Item", {"has_variants": "0", "is_fixed_asset": 0, "domain": domain})
|
||||
}, unique="item_code")
|
||||
|
||||
qtn.insert()
|
||||
@@ -115,8 +119,8 @@ def make_quotation():
|
||||
def make_sales_order():
|
||||
q = get_random("Quotation", {"status": "Submitted"})
|
||||
if q:
|
||||
from erpnext.selling.doctype.quotation.quotation import make_sales_order
|
||||
so = frappe.get_doc(make_sales_order(q))
|
||||
from erpnext.selling.doctype.quotation.quotation import make_sales_order as mso
|
||||
so = frappe.get_doc(mso(q))
|
||||
so.transaction_date = frappe.flags.current_date
|
||||
so.delivery_date = frappe.utils.add_days(frappe.flags.current_date, 10)
|
||||
so.insert()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
from __future__ import print_function, unicode_literals
|
||||
|
||||
import frappe, random
|
||||
import frappe, random, erpnext
|
||||
from frappe.desk import query_report
|
||||
from erpnext.stock.stock_ledger import NegativeStockError
|
||||
from erpnext.stock.doctype.serial_no.serial_no import SerialNoRequiredError, SerialNoQtyError
|
||||
@@ -45,7 +45,7 @@ def make_delivery_note():
|
||||
# make purchase requests
|
||||
|
||||
# make delivery notes (if possible)
|
||||
if random.random() < 0.3:
|
||||
if random.random() < 0.6:
|
||||
from erpnext.selling.doctype.sales_order.sales_order import make_delivery_note
|
||||
report = "Ordered Items To Be Delivered"
|
||||
for so in list(set([r[0] for r in query_report.run(report)["result"]
|
||||
@@ -56,8 +56,9 @@ def make_delivery_note():
|
||||
if not d.expense_account:
|
||||
d.expense_account = ("Cost of Goods Sold - {0}".format(
|
||||
frappe.get_cached_value('Company', dn.company, 'abbr')))
|
||||
dn.insert()
|
||||
|
||||
try:
|
||||
dn.insert()
|
||||
dn.submit()
|
||||
frappe.db.commit()
|
||||
except (NegativeStockError, SerialNoRequiredError, SerialNoQtyError, UnableToSelectBatchError):
|
||||
@@ -68,9 +69,10 @@ def make_stock_reconciliation():
|
||||
from erpnext.stock.doctype.stock_reconciliation.stock_reconciliation \
|
||||
import OpeningEntryAccountError, EmptyStockReconciliationItemsError
|
||||
|
||||
if random.random() < 0.1:
|
||||
if random.random() < 0.4:
|
||||
stock_reco = frappe.new_doc("Stock Reconciliation")
|
||||
stock_reco.posting_date = frappe.flags.current_date
|
||||
stock_reco.company = erpnext.get_default_company()
|
||||
stock_reco.get_items_for("Stores - WP")
|
||||
if stock_reco.items:
|
||||
for item in stock_reco.items:
|
||||
@@ -87,7 +89,7 @@ def make_stock_reconciliation():
|
||||
|
||||
def submit_draft_stock_entries():
|
||||
from erpnext.stock.doctype.stock_entry.stock_entry import IncorrectValuationRateError, \
|
||||
DuplicateEntryForProductionOrderError, OperationsNotCompleteError
|
||||
DuplicateEntryForWorkOrderError, OperationsNotCompleteError
|
||||
|
||||
# try posting older drafts (if exists)
|
||||
frappe.db.commit()
|
||||
@@ -98,7 +100,7 @@ def submit_draft_stock_entries():
|
||||
ste.save()
|
||||
ste.submit()
|
||||
frappe.db.commit()
|
||||
except (NegativeStockError, IncorrectValuationRateError, DuplicateEntryForProductionOrderError,
|
||||
except (NegativeStockError, IncorrectValuationRateError, DuplicateEntryForWorkOrderError,
|
||||
OperationsNotCompleteError):
|
||||
frappe.db.rollback()
|
||||
|
||||
|
||||
@@ -5,6 +5,9 @@ data = {
|
||||
'Patient Encounter',
|
||||
'Lab Test',
|
||||
'Healthcare',
|
||||
'Vital Signs',
|
||||
'Clinical Procedure',
|
||||
'Inpatient Record',
|
||||
'Accounts',
|
||||
'Buying',
|
||||
'Stock',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -14,6 +15,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,10 +43,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -72,10 +76,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -102,6 +108,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -115,7 +122,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-11-10 19:09:02.326827",
|
||||
"modified": "2018-11-04 03:37:57.763134",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Education",
|
||||
"name": "Fee Schedule Program",
|
||||
@@ -125,9 +132,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Education",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -14,6 +15,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,10 +43,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -71,6 +75,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -84,7 +89,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-11-10 19:09:19.498184",
|
||||
"modified": "2018-11-04 03:38:06.535706",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Education",
|
||||
"name": "Fee Schedule Student Group",
|
||||
@@ -94,9 +99,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Education",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -14,6 +15,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,10 +43,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -72,10 +76,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -103,10 +109,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -132,10 +140,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -163,10 +173,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -194,10 +206,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -225,10 +239,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -254,10 +270,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -284,6 +302,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -297,7 +316,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-12-27 10:05:22.307860",
|
||||
"modified": "2018-11-04 03:38:30.902942",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Education",
|
||||
"name": "Instructor Log",
|
||||
@@ -307,9 +326,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Education",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -15,6 +16,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -42,10 +44,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -72,10 +76,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -102,10 +108,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -131,10 +139,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -161,10 +171,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -191,6 +203,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -204,7 +217,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-11-10 18:57:21.174604",
|
||||
"modified": "2018-11-04 03:37:17.408427",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Education",
|
||||
"name": "Student Admission Program",
|
||||
@@ -214,9 +227,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Education",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -14,6 +15,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,11 +43,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -73,11 +76,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -105,11 +109,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -135,11 +140,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -166,16 +172,17 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fetch_from": "course.course_name",
|
||||
"fetch_from": "course.course_name",
|
||||
"fieldname": "course_code",
|
||||
"fieldtype": "Read Only",
|
||||
"hidden": 0,
|
||||
@@ -199,11 +206,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -230,7 +238,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -244,7 +252,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-05-16 22:42:54.254306",
|
||||
"modified": "2018-11-04 03:38:52.525155",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Education",
|
||||
"name": "Student Group Creation Tool Course",
|
||||
@@ -254,9 +262,11 @@
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Education",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -14,6 +15,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,11 +43,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -71,16 +74,17 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fetch_from": "instructor.instructor_name",
|
||||
"fetch_from": "instructor.instructor_name",
|
||||
"fieldname": "instructor_name",
|
||||
"fieldtype": "Read Only",
|
||||
"hidden": 0,
|
||||
@@ -104,7 +108,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -118,7 +122,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-05-16 22:43:13.173633",
|
||||
"modified": "2018-11-04 03:39:02.413082",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Education",
|
||||
"name": "Student Group Instructor",
|
||||
@@ -128,9 +132,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Education",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 0,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -13,6 +14,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -40,10 +42,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -70,10 +74,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -99,10 +105,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -129,10 +137,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -160,6 +170,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -173,7 +184,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-11-10 19:11:39.735521",
|
||||
"modified": "2018-11-04 03:38:22.896203",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Education",
|
||||
"name": "Student Group Student",
|
||||
@@ -183,9 +194,11 @@
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Education",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 0,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -13,6 +14,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -40,10 +42,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -70,10 +74,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -101,6 +107,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -114,7 +121,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-11-10 19:10:57.680471",
|
||||
"modified": "2018-11-04 03:38:14.211238",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Education",
|
||||
"name": "Student Guardian",
|
||||
@@ -124,9 +131,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Education",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 0,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -15,6 +16,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,7 +43,8 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
"translatable": 0,
|
||||
"unique": 1
|
||||
}
|
||||
],
|
||||
"has_web_view": 0,
|
||||
@@ -54,7 +57,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-11-10 19:05:37.035846",
|
||||
"modified": "2018-11-04 03:37:34.712397",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Education",
|
||||
"name": "Student Language",
|
||||
@@ -63,7 +66,6 @@
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
@@ -85,10 +87,12 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Education",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"title_field": "",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -4,7 +4,29 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _
|
||||
from frappe.utils import get_link_to_form
|
||||
from frappe.model.document import Document
|
||||
|
||||
class StudentLeaveApplication(Document):
|
||||
pass
|
||||
def validate(self):
|
||||
self.validate_duplicate()
|
||||
|
||||
def validate_duplicate(self):
|
||||
data = frappe.db.sql(""" select name from `tabStudent Leave Application`
|
||||
where
|
||||
((%(from_date)s > from_date and %(from_date)s < to_date) or
|
||||
(%(to_date)s > from_date and %(to_date)s < to_date) or
|
||||
(%(from_date)s <= from_date and %(to_date)s >= to_date)) and
|
||||
name != %(name)s and student = %(student)s and docstatus < 2
|
||||
""", {
|
||||
'from_date': self.from_date,
|
||||
'to_date': self.to_date,
|
||||
'student': self.student,
|
||||
'name': self.name
|
||||
}, as_dict=1)
|
||||
|
||||
if data:
|
||||
link = get_link_to_form("Student Leave Application", data[0].name)
|
||||
frappe.throw(_("Leave application {0} already exists against the student {1}")
|
||||
.format(link, self.student))
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -14,6 +15,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -41,10 +43,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -71,10 +75,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -102,10 +108,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -133,10 +141,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -163,10 +173,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -193,10 +205,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -224,10 +238,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -253,10 +269,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -284,10 +302,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -315,10 +335,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -346,10 +368,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -378,10 +402,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -408,10 +434,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -438,10 +466,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -469,10 +499,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -500,10 +532,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -530,6 +564,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -543,7 +578,7 @@
|
||||
"issingle": 1,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-03-20 17:57:53.936119",
|
||||
"modified": "2018-11-04 03:38:42.970869",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Education",
|
||||
"name": "Student Report Generation Tool",
|
||||
@@ -552,7 +587,6 @@
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 0,
|
||||
@@ -574,9 +608,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Education",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -13,6 +14,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -40,10 +42,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -71,10 +75,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -103,10 +109,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -132,10 +140,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -164,10 +174,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -195,10 +207,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -225,10 +239,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -256,6 +272,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -269,7 +286,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-11-10 19:05:24.999063",
|
||||
"modified": "2018-11-04 03:37:25.881487",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Education",
|
||||
"name": "Student Sibling",
|
||||
@@ -279,9 +296,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Education",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 0,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -13,6 +14,7 @@
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -40,10 +42,12 @@
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -71,10 +75,12 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
@@ -101,6 +107,7 @@
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
@@ -114,7 +121,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-11-10 19:05:46.408887",
|
||||
"modified": "2018-11-04 03:37:46.485218",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Education",
|
||||
"name": "Student Siblings",
|
||||
@@ -124,9 +131,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Education",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 0,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -73,6 +73,7 @@ def get_attendance_list(from_date, to_date, student_group, students_list):
|
||||
return att_map
|
||||
|
||||
def get_students_with_leave_application(from_date, to_date, students_list):
|
||||
if not students_list: return
|
||||
leave_applications = frappe.db.sql("""
|
||||
select student, from_date, to_date
|
||||
from `tabStudent Leave Application`
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on('QuickBooks Migrator', {
|
||||
connect: function(frm) {
|
||||
// OAuth requires user intervention to provide application access permissionsto requested scope
|
||||
// Here we open a new window and redirect user to the authorization url.
|
||||
// After user grants us permission to access. We will set authorization details on this doc which will force refresh.
|
||||
window.open(frm.doc.authorization_url)
|
||||
},
|
||||
fetch_data: function(frm) {
|
||||
frm.call("migrate")
|
||||
},
|
||||
onload: function(frm) {
|
||||
frm.trigger("set_indicator")
|
||||
var domain = frappe.urllib.get_base_url()
|
||||
var redirect_url = `${domain}/api/method/erpnext.erpnext_integrations.doctype.quickbooks_migrator.quickbooks_migrator.callback`
|
||||
if (frm.doc.redirect_url != redirect_url) {
|
||||
frm.set_value("redirect_url", redirect_url)
|
||||
}
|
||||
// Instead of changing percentage width and message of single progress bar
|
||||
// Show a different porgress bar for every action after some time remove the finished progress bar
|
||||
// Former approach causes the progress bar to dance back and forth.
|
||||
frm.trigger("set_indicator")
|
||||
frappe.realtime.on("quickbooks_progress_update", function (data) {
|
||||
frm.dashboard.show_progress(data.message, (data.count / data.total) * 100, data.message)
|
||||
if (data.count == data.total) {
|
||||
window.setTimeout( function(message) {frm.dashboard.hide_progress(message)}, 1500, data.messsage)
|
||||
}
|
||||
})
|
||||
},
|
||||
refresh: function(frm) {
|
||||
frm.trigger("set_indicator")
|
||||
if (!frm.doc.access_token) {
|
||||
// Unset access_token signifies that we don't have enough information to connect to quickbooks api and fetch data
|
||||
if (frm.doc.authorization_url) {
|
||||
frm.add_custom_button(__("Connect to Quickbooks"), function () {
|
||||
frm.trigger("connect")
|
||||
});
|
||||
}
|
||||
}
|
||||
if (frm.doc.access_token) {
|
||||
// If we have access_token that means we also have refresh_token we don't need user intervention anymore
|
||||
// All we need now is a Company from erpnext
|
||||
frm.remove_custom_button(__("Connect to Quickbooks"))
|
||||
|
||||
frm.toggle_display("company_settings", 1)
|
||||
frm.set_df_property("company", "reqd", 1)
|
||||
if (frm.doc.company) {
|
||||
frm.add_custom_button(__("Fetch Data"), function () {
|
||||
frm.trigger("fetch_data")
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
set_indicator: function(frm) {
|
||||
var indicator_map = {
|
||||
"Connecting to QuickBooks": [__("Connecting to QuickBooks"), "orange"],
|
||||
"Connected to QuickBooks": [__("Connected to QuickBooks"), "green"],
|
||||
"In Progress": [__("In Progress"), "orange"],
|
||||
"Complete": [__("Complete"), "green"],
|
||||
"Failed": [__("Failed"), "red"],
|
||||
}
|
||||
if (frm.doc.status) {
|
||||
var indicator = indicator_map[frm.doc.status]
|
||||
var label = indicator[0]
|
||||
var color = indicator[1]
|
||||
frm.page.set_indicator(label, color)
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,843 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"beta": 1,
|
||||
"creation": "2018-07-10 14:48:16.757030",
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"fields": [
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "status",
|
||||
"fieldtype": "Select",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Status",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Connecting to QuickBooks\nConnected to QuickBooks\nIn Progress\nComplete\nFailed",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"collapsible_depends_on": "eval:doc.client_id && doc.client_secret && doc.redirect_url",
|
||||
"columns": 0,
|
||||
"fieldname": "application_settings",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Application Settings",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"default": "",
|
||||
"fieldname": "client_id",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Client ID",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"default": "",
|
||||
"fieldname": "redirect_url",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Redirect URL",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"default": "https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer",
|
||||
"fieldname": "token_endpoint",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Token Endpoint",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "application_column_break",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"default": "",
|
||||
"fieldname": "client_secret",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Client Secret",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"default": "com.intuit.quickbooks.accounting",
|
||||
"fieldname": "scope",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 1,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Scope",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"default": "https://quickbooks.api.intuit.com/v3",
|
||||
"fieldname": "api_endpoint",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "API Endpoint",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 1,
|
||||
"columns": 0,
|
||||
"fieldname": "authorization_settings",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Authorization Settings",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"default": "https://appcenter.intuit.com/connect/oauth2",
|
||||
"fieldname": "authorization_endpoint",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Authorization Endpoint",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "refresh_token",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Refresh Token",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "code",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Code",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "authorization_column_break",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "authorization_url",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Authorization URL",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "access_token",
|
||||
"fieldtype": "Small Text",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Access Token",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "quickbooks_company_id",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Quickbooks Company ID",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "company_settings",
|
||||
"fieldtype": "Section Break",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Company Settings",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "company",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Company",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Company",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "default_shipping_account",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Default Shipping Account",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Account",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "default_warehouse",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Default Warehouse",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Warehouse",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "company_column_break",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "default_cost_center",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Default Cost Center",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Cost Center",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_bulk_edit": 0,
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
"fieldname": "undeposited_funds_account",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_standard_filter": 0,
|
||||
"label": "Undeposited Funds Account",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Account",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"remember_last_selected_value": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"translatable": 0,
|
||||
"unique": 0
|
||||
}
|
||||
],
|
||||
"has_web_view": 0,
|
||||
"hide_heading": 0,
|
||||
"hide_toolbar": 0,
|
||||
"idx": 0,
|
||||
"image_view": 0,
|
||||
"in_create": 0,
|
||||
"is_submittable": 0,
|
||||
"issingle": 1,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-10-17 03:12:53.506229",
|
||||
"modified_by": "Administrator",
|
||||
"module": "ERPNext Integrations",
|
||||
"name": "QuickBooks Migrator",
|
||||
"name_case": "",
|
||||
"owner": "Administrator",
|
||||
"permissions": [
|
||||
{
|
||||
"amend": 0,
|
||||
"cancel": 0,
|
||||
"create": 1,
|
||||
"delete": 1,
|
||||
"email": 1,
|
||||
"export": 0,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 0,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 0,
|
||||
"role": "System Manager",
|
||||
"set_user_permissions": 0,
|
||||
"share": 1,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"show_name_in_global_search": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 0,
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,15 +2,15 @@
|
||||
// rename this file from _test_[name] to test_[name] to activate
|
||||
// and remove above this line
|
||||
|
||||
QUnit.test("test: Subscriber", function (assert) {
|
||||
QUnit.test("test: QuickBooks Migrator", function (assert) {
|
||||
let done = assert.async();
|
||||
|
||||
// number of asserts
|
||||
assert.expect(1);
|
||||
|
||||
frappe.run_serially([
|
||||
// insert a new Subscriber
|
||||
() => frappe.tests.make('Subscriber', [
|
||||
// insert a new QuickBooks Migrator
|
||||
() => frappe.tests.make('QuickBooks Migrator', [
|
||||
// values to be set
|
||||
{key: 'value'}
|
||||
]),
|
||||
@@ -3,7 +3,8 @@
|
||||
# See license.txt
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import frappe
|
||||
import unittest
|
||||
|
||||
class TestSubscriber(unittest.TestCase):
|
||||
class TestQuickBooksMigrator(unittest.TestCase):
|
||||
pass
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -410,7 +411,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-07-26 17:05:29.402908",
|
||||
"modified": "2018-11-04 03:33:16.833884",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Healthcare",
|
||||
"name": "Clinical Procedure Item",
|
||||
@@ -420,6 +421,7 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Healthcare",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -185,7 +186,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-08-06 16:46:54.699133",
|
||||
"modified": "2018-11-04 03:33:26.958713",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Healthcare",
|
||||
"name": "Inpatient Occupancy",
|
||||
@@ -195,6 +196,7 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Healthcare",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
|
||||
@@ -105,7 +105,9 @@ def get_healthcare_service_unit():
|
||||
parent_service_unit.healthcare_service_unit_name = "All Healthcare Service Units"
|
||||
parent_service_unit.is_group = 1
|
||||
parent_service_unit.save(ignore_permissions = True)
|
||||
service_unit.parent_healthcare_service_unit = "All Healthcare Service Units"
|
||||
service_unit.parent_healthcare_service_unit = parent_service_unit.name
|
||||
else:
|
||||
service_unit.parent_healthcare_service_unit = service_unit_parent_name[0][0]
|
||||
service_unit.save(ignore_permissions = True)
|
||||
return service_unit.name
|
||||
return service_unit
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -339,13 +339,13 @@ def get_events(start, end, filters=None):
|
||||
|
||||
data = frappe.db.sql("""select name, patient, practitioner, status,
|
||||
duration, timestamp(appointment_date, appointment_time) as
|
||||
'appointment_date' from `tabPatient Appointment` where
|
||||
'start' from `tabPatient Appointment` where
|
||||
(appointment_date between %(start)s and %(end)s)
|
||||
and docstatus < 2 {conditions}""".format(conditions=conditions),
|
||||
{"start": start, "end": end}, as_dict=True, update={"allDay": 0})
|
||||
|
||||
for item in data:
|
||||
item.appointment_datetime = item.appointment_date + datetime.timedelta(minutes = item.duration)
|
||||
item.end = item.start + datetime.timedelta(minutes = item.duration)
|
||||
|
||||
return data
|
||||
|
||||
|
||||
@@ -10,37 +10,5 @@ frappe.views.calendar["Patient Appointment"] = {
|
||||
},
|
||||
order_by: "appointment_date",
|
||||
gantt: true,
|
||||
get_events_method: "erpnext.healthcare.doctype.patient_appointment.patient_appointment.get_events",
|
||||
filters: [
|
||||
{
|
||||
'fieldtype': 'Link',
|
||||
'fieldname': 'practitioner',
|
||||
'options': 'Healthcare Practitioner',
|
||||
'label': __('Healthcare Practitioner')
|
||||
},
|
||||
{
|
||||
'fieldtype': 'Link',
|
||||
'fieldname': 'patient',
|
||||
'options': 'Patient',
|
||||
'label': __('Patient')
|
||||
},
|
||||
{
|
||||
'fieldtype': 'Link',
|
||||
'fieldname': 'appointment_type',
|
||||
'options': 'Appointment Type',
|
||||
'label': __('Appointment Type')
|
||||
},
|
||||
{
|
||||
'fieldtype': 'Link',
|
||||
'fieldname': 'department',
|
||||
'options': 'Medical Department',
|
||||
'label': __('Department')
|
||||
},
|
||||
{
|
||||
'fieldtype': 'Select',
|
||||
'fieldname': 'status',
|
||||
'options': 'Scheduled\nOpen\nClosed\nPending',
|
||||
'label': __('Status')
|
||||
}
|
||||
]
|
||||
get_events_method: "erpnext.healthcare.doctype.patient_appointment.patient_appointment.get_events"
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -89,7 +90,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-06-29 15:14:18.647514",
|
||||
"modified": "2018-11-04 03:33:07.936958",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Healthcare",
|
||||
"name": "Practitioner Service Unit Schedule",
|
||||
@@ -99,9 +100,11 @@
|
||||
"quick_entry": 1,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Healthcare",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"track_changes": 1,
|
||||
"track_seen": 0
|
||||
"track_seen": 0,
|
||||
"track_views": 0
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"allow_copy": 1,
|
||||
"allow_events_in_timeline": 0,
|
||||
"allow_guest_to_view": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
@@ -317,7 +318,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2018-08-06 16:53:36.440428",
|
||||
"modified": "2018-11-04 03:33:35.939816",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Healthcare",
|
||||
"name": "Procedure Prescription",
|
||||
@@ -327,6 +328,7 @@
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"restrict_to_domain": "Healthcare",
|
||||
"show_name_in_global_search": 0,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
margin-bottom: -4px;
|
||||
}
|
||||
|
||||
.medical_record-row > * {
|
||||
z-index: -999;
|
||||
}
|
||||
|
||||
.date-indicator {
|
||||
background:none;
|
||||
font-size:12px;
|
||||
|
||||
@@ -342,6 +342,8 @@ def manage_fee_validity(appointment_name, method, ref_invoice=None):
|
||||
def appointments_valid_in_fee_validity(appointment, invoiced):
|
||||
valid_days = frappe.db.get_value("Healthcare Settings", None, "valid_days")
|
||||
max_visit = frappe.db.get_value("Healthcare Settings", None, "max_visit")
|
||||
if int(max_visit) < 1:
|
||||
max_visit = 1
|
||||
valid_days_date = add_days(getdate(appointment.appointment_date), int(valid_days))
|
||||
return frappe.get_list("Patient Appointment",{'patient': appointment.patient, 'invoiced': invoiced,
|
||||
'appointment_date':("<=", valid_days_date), 'appointment_date':(">=", getdate(appointment.appointment_date)),
|
||||
|
||||
@@ -12,7 +12,7 @@ app_license = "GNU General Public License (v3)"
|
||||
source_link = "https://github.com/frappe/erpnext"
|
||||
|
||||
develop_version = '11.x.x-develop'
|
||||
staging_version = '11.0.3-beta.7'
|
||||
staging_version = '11.0.3-beta.19'
|
||||
|
||||
error_report_email = "support@erpnext.com"
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user