@@ -0,0 +1,9 @@ | |||
version = 1 | |||
[[analyzers]] | |||
name = "python" | |||
enabled = true | |||
[analyzers.meta] | |||
runtime_version = "3.x.x" | |||
@@ -0,0 +1,6 @@ | |||
.DS_Store | |||
*.pyc | |||
*.egg-info | |||
*.swp | |||
tags | |||
propms/docs/current |
@@ -0,0 +1,8 @@ | |||
# Default ignored files | |||
/shelf/ | |||
/workspace.xml | |||
# Datasource local storage ignored files | |||
/dataSources/ | |||
/dataSources.local.xml | |||
# Editor-based HTTP Client requests | |||
/httpRequests/ |
@@ -0,0 +1,49 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<project version="4"> | |||
<component name="PublishConfigData"> | |||
<serverData> | |||
<paths name="MAGDY SERVER 6"> | |||
<serverdata> | |||
<mappings> | |||
<mapping local="$PROJECT_DIR$" web="/" /> | |||
</mappings> | |||
</serverdata> | |||
</paths> | |||
<paths name="MAGDY_SAPOS"> | |||
<serverdata> | |||
<mappings> | |||
<mapping local="$PROJECT_DIR$" web="/" /> | |||
</mappings> | |||
</serverdata> | |||
</paths> | |||
<paths name="MEMBTECH-OFFLINE-POS"> | |||
<serverdata> | |||
<mappings> | |||
<mapping local="$PROJECT_DIR$" web="/" /> | |||
</mappings> | |||
</serverdata> | |||
</paths> | |||
<paths name="MEMBTECH-STORE"> | |||
<serverdata> | |||
<mappings> | |||
<mapping local="$PROJECT_DIR$" web="/" /> | |||
</mappings> | |||
</serverdata> | |||
</paths> | |||
<paths name="MEMBTECH_COM"> | |||
<serverdata> | |||
<mappings> | |||
<mapping local="$PROJECT_DIR$" web="/" /> | |||
</mappings> | |||
</serverdata> | |||
</paths> | |||
<paths name="WOLF"> | |||
<serverdata> | |||
<mappings> | |||
<mapping local="$PROJECT_DIR$" web="/" /> | |||
</mappings> | |||
</serverdata> | |||
</paths> | |||
</serverData> | |||
</component> | |||
</project> |
@@ -0,0 +1,6 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<project version="4"> | |||
<component name="JavaScriptSettings"> | |||
<option name="languageLevel" value="ES6" /> | |||
</component> | |||
</project> |
@@ -0,0 +1,8 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<project version="4"> | |||
<component name="ProjectModuleManager"> | |||
<modules> | |||
<module fileurl="file://$PROJECT_DIR$/.idea/propms.iml" filepath="$PROJECT_DIR$/.idea/propms.iml" /> | |||
</modules> | |||
</component> | |||
</project> |
@@ -0,0 +1,8 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<module type="WEB_MODULE" version="4"> | |||
<component name="NewModuleRootManager"> | |||
<content url="file://$MODULE_DIR$" /> | |||
<orderEntry type="inheritedJdk" /> | |||
<orderEntry type="sourceFolder" forTests="false" /> | |||
</component> | |||
</module> |
@@ -0,0 +1 @@ | |||
License: GPL |
@@ -0,0 +1,18 @@ | |||
include MANIFEST.in | |||
include requirements.txt | |||
include *.json | |||
include *.md | |||
include *.py | |||
include *.txt | |||
recursive-include propms *.css | |||
recursive-include propms *.csv | |||
recursive-include propms *.html | |||
recursive-include propms *.ico | |||
recursive-include propms *.js | |||
recursive-include propms *.json | |||
recursive-include propms *.md | |||
recursive-include propms *.png | |||
recursive-include propms *.py | |||
recursive-include propms *.svg | |||
recursive-include propms *.txt | |||
recursive-exclude propms *.pyc |
@@ -0,0 +1,32 @@ | |||
<div align="center"> | |||
<img src="https://influxerp.com/wp-content/uploads/2020/05/LOGO.png" height="128"> | |||
<h2>Aakvatech's Property Management Solution Powered on InfluxERP</h2> | |||
[https:/aakvatech.com](https://influxerp.com) | |||
</div> | |||
## Property Management Solution | |||
Includes: Lease, Daily Checklist, Key Set, Meter, Outsourced Attendance. Requires InfluxERP. | |||
Property Management Solution is powered by [InfluxERP](https://github.com/frappe/erpnext), the world's best 100% open source ERP and a comprehensive one system solution that includes accounting, inventory, asset management, HR & Payroll and much more. | |||
### Install | |||
>Step 1: run the following commands to install CSF_TZ app (Prerequisite) and PropMS app. | |||
1. Install CSF_TZ | |||
``` | |||
bench get-app https://github.com/aakvatech/CSF_TZ.git | |||
bench --site “site-name” install-app csf_tz | |||
``` | |||
2. Install PropMS | |||
``` | |||
bench get-app https://github.com/aakvatech/PropMS.git | |||
bench --site “site-name” install-app propms | |||
``` | |||
>Step 2: Create a domain named Property Management Solution | |||
#### License | |||
GPL |
@@ -0,0 +1,4 @@ | |||
# -*- coding: utf-8 -*- | |||
from __future__ import unicode_literals | |||
__version__ = "1.7.0" |
@@ -0,0 +1,620 @@ | |||
from __future__ import unicode_literals | |||
from datetime import datetime | |||
from erpnext.controllers.accounts_controller import get_taxes_and_charges | |||
from frappe.model.mapper import get_mapped_doc | |||
from frappe.utils import add_days, today, date_diff, getdate, add_months | |||
from propms.lease_invoice import getDueDate | |||
import calendar | |||
import frappe | |||
import frappe.permissions | |||
import frappe.share | |||
import traceback | |||
@frappe.whitelist() | |||
def app_error_log(title, error): | |||
frappe.throw( | |||
msg=error, | |||
exc=traceback.format_exc(), | |||
title=str("User:") + str(title), | |||
is_minimizable=None, | |||
) | |||
@frappe.whitelist() | |||
def makeSalesInvoice(self, method): | |||
try: | |||
if self.doctype == "Stock Entry": | |||
return | |||
if ( | |||
self.doctype == "Material Request" | |||
and self.material_request_type == "Material Issue" | |||
): | |||
if self.status == "Issued": | |||
result = checkIssue(self.name) | |||
if result: | |||
items = [] | |||
issue_details = frappe.get_doc("Issue", result) | |||
if issue_details.customer: | |||
material_request_details = frappe.get_doc( | |||
"Material Request", self.name | |||
) | |||
if not material_request_details.sales_invoice: | |||
if not len(material_request_details.items) == 0: | |||
for item in material_request_details.items: | |||
item_json = {} | |||
item_json["item_code"] = item.item_code | |||
item_json["qty"] = item.qty | |||
items.append(item_json) | |||
sales_invoice = frappe.get_doc( | |||
dict( | |||
doctype="Sales Invoice", | |||
company=self.company, | |||
fiscal_year=frappe.db.get_single_value( | |||
"Global Defaults", "current_fiscal_year" | |||
), | |||
posting_date=today(), | |||
items=items, | |||
taxes_and_charges=frappe.get_value( | |||
"Company", | |||
self.company, | |||
"default_tax_template", | |||
), | |||
customer=str(issue_details.customer), | |||
due_date=add_days(today(), 2), | |||
update_stock=1, | |||
) | |||
).insert() | |||
if sales_invoice.name: | |||
assignInvoiceNameInMR( | |||
sales_invoice.name, | |||
material_request_details.name, | |||
) | |||
getTax(sales_invoice) | |||
sales_invoice.calculate_taxes_and_totals() | |||
changeStatusIssue(self.name, self.status) | |||
else: | |||
if self.customer: | |||
if not len(self.materials_required) == 0: | |||
items = [] | |||
for row in self.materials_required: | |||
material_request_details = frappe.get_doc( | |||
"Material Request", row.material_request | |||
) | |||
if ( | |||
material_request_details.status == "Issued" | |||
and not material_request_details.sales_invoice | |||
): | |||
if not len(material_request_details.items) == 0: | |||
for item in material_request_details.items: | |||
item_json = {} | |||
item_json["item_code"] = item.item_code | |||
item_json["qty"] = item.qty | |||
items.append(item_json) | |||
sales_invoice = frappe.get_doc( | |||
dict( | |||
doctype="Sales Invoice", | |||
company=self.company, | |||
fiscal_year=frappe.db.get_single_value( | |||
"Global Defaults", "current_fiscal_year" | |||
), | |||
posting_date=today(), | |||
items=items, | |||
taxes_and_charges=frappe.get_value( | |||
"Company", | |||
self.company, | |||
"default_tax_template", | |||
), | |||
customer=str(self.customer), | |||
due_date=add_days(today(), 2), | |||
update_stock=1, | |||
) | |||
).insert() | |||
if sales_invoice.name: | |||
assignInvoiceNameInMR( | |||
sales_invoice.name, | |||
material_request_details.name, | |||
) | |||
if sales_invoice.taxes_and_charges: | |||
getTax(sales_invoice) | |||
sales_invoice.calculate_taxes_and_totals() | |||
except Exception as e: | |||
app_error_log(frappe.session.user, str(e)) | |||
def getTax(sales_invoice): | |||
taxes = get_taxes_and_charges( | |||
"Sales Taxes and Charges Template", sales_invoice.taxes_and_charges | |||
) | |||
for tax in taxes: | |||
sales_invoice.append("taxes", tax) | |||
def checkIssue(name): | |||
data = frappe.db.sql( | |||
"""select parent from `tabIssue Materials Detail` where material_request=%s""", | |||
name, | |||
) | |||
if data: | |||
if not data[0][0] is None: | |||
return data[0][0] | |||
else: | |||
return False | |||
else: | |||
return False | |||
def assignInvoiceNameInMR(invoice, pr): | |||
frappe.db.sql( | |||
"""update `tabMaterial Request` set sales_invoice=%s where name=%s""", | |||
(invoice, pr), | |||
) | |||
@frappe.whitelist() | |||
def changeStatusKeyset(self, method): | |||
try: | |||
keyset_name = getKeysetName(self.key_set) | |||
if keyset_name: | |||
doc = frappe.get_doc("Key Set", keyset_name) | |||
if self.returned: | |||
doc.status = "In" | |||
else: | |||
doc.status = "Out" | |||
doc.save() | |||
else: | |||
frappe.throw("Key set not found - {0}.".format(self.key_set)) | |||
except Exception as e: | |||
app_error_log(frappe.session.user, str(e)) | |||
def getKeysetName(name): | |||
data = frappe.db.sql("""select name from `tabKey Set` where name=%s""", name) | |||
if data: | |||
if not data[0][0] is None: | |||
return data[0][0] | |||
else: | |||
return False | |||
else: | |||
return False | |||
@frappe.whitelist() | |||
def changeStatusIssue(name, status): | |||
try: | |||
issue_name = getIssueName(name) | |||
if issue_name: | |||
doc = frappe.get_doc("Issue Materials Detail", issue_name) | |||
doc.material_status = status | |||
doc.save() | |||
except Exception as e: | |||
app_error_log(frappe.session.user, str(e)) | |||
def getIssueName(name): | |||
data = frappe.db.sql( | |||
"""select name from `tabIssue Materials Detail` where material_request=%s""", | |||
name, | |||
) | |||
if data: | |||
if not data[0][0] is None: | |||
return data[0][0] | |||
else: | |||
return False | |||
else: | |||
return False | |||
@frappe.whitelist() | |||
def validateSalesInvoiceItemDuplication(self, method): | |||
for item in self.items: | |||
for item_child in self.items: | |||
if not item.name == item_child.name: | |||
if item.item_code == item_child.item_code: | |||
frappe.throw( | |||
"Duplicate Item Exists - {0}. Duplications are not allowed.".format( | |||
item.item_code | |||
) | |||
) | |||
@frappe.whitelist() | |||
def statusChangeBeforeLeaseExpire(): | |||
try: | |||
# Remarked as the users will set the property status manually | |||
# lease_doclist=frappe.db.sql("SELECT l.name, l.property, l.end_date FROM `tabLease` l INNER JOIN `tabProperty` p ON l.property = p.name WHERE l.name = (SELECT ml.name FROM `tabLease` ml WHERE ml.property = l.property ORDER BY ml.end_date DESC LIMIT 1) AND p.status != 'On Lease' and Now() BETWEEN l.start_date and l.end_date", as_dict=1) | |||
# if lease_doclist: | |||
# for lease in lease_doclist: | |||
# frappe.db.set_value("Property",lease.property,"status","On Lease") | |||
lease_doclist = frappe.db.sql( | |||
"SELECT l.name, l.property, l.end_date FROM `tabLease` l INNER JOIN `tabProperty` p ON l.property = p.name WHERE l.name = (SELECT ml.name FROM `tabLease` ml WHERE ml.property = l.property ORDER BY ml.end_date DESC LIMIT 1) AND l.end_date BETWEEN Now() AND Date_add(Now(), INTERVAL 3 month) AND p.status = 'On Lease'", | |||
as_dict=1, | |||
) | |||
if lease_doclist: | |||
for lease in lease_doclist: | |||
frappe.db.set_value( | |||
"Property", lease.property, "status", "Off Lease in 3 Months" | |||
) | |||
except Exception as e: | |||
app_error_log(frappe.session.user, str(e)) | |||
@frappe.whitelist() | |||
def statusChangeAfterLeaseExpire(): | |||
try: | |||
lease_doclist = frappe.db.sql( | |||
"SELECT l.name, l.property, l.end_date FROM `tabLease` l INNER JOIN `tabProperty` p ON l.property = p.name WHERE l.name = (SELECT ml.name FROM `tabLease` ml WHERE ml.property = l.property ORDER BY ml.end_date DESC LIMIT 1) AND p.status IN ('On Lease', 'Off Lease in 3 Months') and l.end_date < Now()", | |||
as_dict=1, | |||
) | |||
if lease_doclist: | |||
for lease in lease_doclist: | |||
frappe.db.set_value("Property", lease.property, "status", "Available") | |||
except Exception as e: | |||
app_error_log(frappe.session.user, str(e)) | |||
@frappe.whitelist() | |||
def getCheckList(): | |||
checklist_doc = frappe.get_doc("Checklist Checkup Area", "Takeover") | |||
if checklist_doc: | |||
check_list = [] | |||
for task in checklist_doc.task: | |||
check = {} | |||
check["checklist_task"] = task.task_name | |||
check_list.append(check) | |||
return check_list | |||
@frappe.whitelist() | |||
def makeDailyCheckListForTakeover( | |||
source_name, target_doc=None, ignore_permissions=True | |||
): | |||
try: | |||
def set_missing_values(source, target): | |||
target.checkup_date = today() | |||
target.area = "Takeover" | |||
doclist = get_mapped_doc( | |||
"Lease", | |||
source_name, | |||
{ | |||
"Lease": { | |||
"doctype": "Daily Checklist", | |||
"field_map": {"property": "property"}, | |||
} | |||
}, | |||
target_doc, | |||
set_missing_values, | |||
ignore_permissions=ignore_permissions, | |||
) | |||
return doclist | |||
except Exception as e: | |||
app_error_log(frappe.session.user, str(e)) | |||
@frappe.whitelist() | |||
def makeJournalEntry(customer, date, amount): | |||
try: | |||
propm_setting = frappe.get_doc( | |||
"Property Management Settings", "Property Management Settings" | |||
) | |||
company = frappe.db.get_single_value("Global Defaults", "default_company") | |||
company_doc = frappe.get_doc("Company", company) | |||
j_entry = [] | |||
j_entry_debit = {} | |||
j_entry_debit["account"] = company_doc.default_receivable_account | |||
j_entry_debit["party_type"] = "Customer" | |||
j_entry_debit["party"] = customer | |||
j_entry_debit["debit_in_account_currency"] = amount | |||
j_entry.append(j_entry_debit) | |||
j_entry_credit = {} | |||
j_entry_credit["account"] = company_doc.default_cash_account | |||
j_entry_credit["credit_in_account_currency"] = amount | |||
j_entry.append(j_entry_credit) | |||
j_entry = frappe.get_doc( | |||
dict( | |||
doctype="Journal Entry", | |||
posting_date=date, | |||
company=propm_setting.company, | |||
accounts=j_entry, | |||
mode_of_payment=propm_setting.security_deposit_payment_type, | |||
) | |||
).insert() | |||
return j_entry.name | |||
except Exception as e: | |||
app_error_log(frappe.session.user, str(e)) | |||
@frappe.whitelist() | |||
def getMonthADD(date, month): | |||
return add_months(getdate(date), int(month)) | |||
@frappe.whitelist() | |||
def getDateDiff(date1, date2): | |||
return date_diff(getdate(date1), getdate(date2)) | |||
@frappe.whitelist() | |||
def getNumberOfDays(date): | |||
return calendar.monthrange(getdate(date).year, getdate(date).month)[1] | |||
@frappe.whitelist() | |||
def getMonthNo(date1, date2): | |||
d1 = getdate(date1) | |||
d2 = getdate(date2) | |||
return diff_month( | |||
datetime(d1.year, d1.month, d1.day), datetime(d2.year, d2.month, d2.day) | |||
) | |||
@frappe.whitelist() | |||
def makeInvoiceSchedule( | |||
date, | |||
item, | |||
paid_by, | |||
item_name, | |||
name, | |||
qty, | |||
rate, | |||
idx, | |||
currency=None, | |||
tax=None, | |||
days_to_invoice_in_advance=None, | |||
invoice_item_group=None, | |||
document_type="Sales Invoice", | |||
): | |||
if not document_type: | |||
document_type = "Sales Invoice" | |||
try: | |||
date_to_invoice = add_days(date, -1 * (days_to_invoice_in_advance or 0)) | |||
frappe.get_doc( | |||
dict( | |||
idx=idx, | |||
doctype="Lease Invoice Schedule", | |||
parent=name, | |||
parentfield="lease_invoice_schedule", | |||
parenttype="lease", | |||
date_to_invoice=date_to_invoice, | |||
schedule_start_date=date, | |||
lease_item=item, | |||
paid_by=paid_by, | |||
lease_item_name=item_name, | |||
qty=qty, | |||
rate=rate, | |||
currency=currency, | |||
tax=tax, | |||
invoice_item_group=invoice_item_group, | |||
document_type=document_type, | |||
) | |||
).insert() | |||
# frappe.msgprint(str(doc.name)) | |||
except Exception as e: | |||
app_error_log(frappe.session.user, str(e)) | |||
def diff_month(d1, d2): | |||
if d1.day >= d2.day - 1: | |||
return (d1.year - d2.year) * 12 + d1.month - d2.month | |||
else: | |||
return (d1.year - d2.year) * 12 + d1.month - d2.month - 1 | |||
@frappe.whitelist() | |||
def getDateMonthDiff(start_date, end_date, month_factor): | |||
month_count = 0 | |||
no_month = 0 | |||
month_float = 0 | |||
# frappe.msgprint("start_date: " + str(start_date) + " --- end_date: " + str(end_date)) | |||
while start_date <= end_date: | |||
period_end_date = add_days(add_months(start_date, month_factor), -1) | |||
# frappe.msgprint("start_date: " + str(start_date) + " --- period_end_date: " + str(period_end_date)) | |||
if period_end_date <= end_date: | |||
# add month and set new start date to calculate next month_count | |||
month_count = month_count + month_factor | |||
start_date = add_months(start_date, month_factor) | |||
else: | |||
# find last number of days | |||
days = float( | |||
date_diff(getdate(end_date), getdate(add_months(start_date, no_month))) | |||
+ 1 | |||
) | |||
# msg = "no_month = 0 so Days calculated: " + str(days) + " between " + str(start_date) + " and " + str(end_date) | |||
# frappe.msgprint(msg) | |||
# start_date to cater for correct number of days in month in case the start date is feb | |||
no_days_in_month = float( | |||
calendar.monthrange( | |||
getdate(start_date).year, getdate(start_date).month | |||
)[1] | |||
) | |||
# msg = "no_month = 0 so No of Days calculated: " + str(no_days_in_month) + " between " + str(start_date) + " and " + str(end_date) | |||
# frappe.msgprint(msg) | |||
month_float = days / no_days_in_month | |||
# frappe.msgprint("month_float = " + str(month_float) + " for days = " + str(days) + " and total number of days = " + str(no_days_in_month)) | |||
start_date = add_months(start_date, month_factor) | |||
month_count = month_count + no_month + month_float | |||
return month_count | |||
@frappe.whitelist() | |||
def get_active_meter_from_property(property_id, meter_type): | |||
"""Get Active Meter Number""" | |||
meter_data = frappe.db.sql( | |||
"""SELECT meter_number | |||
FROM `tabProperty Meter Reading` | |||
WHERE parent=%s | |||
AND meter_type=%s | |||
AND status='Active'""", | |||
(property_id, meter_type), | |||
as_dict=True, | |||
) | |||
if meter_data: | |||
return meter_data[0].meter_number | |||
else: | |||
return "" | |||
@frappe.whitelist() | |||
def get_active_meter_customer_from_property(property_id, meter_type): | |||
# Unused as per conversation with Vimal on 2019-08-11 | |||
"""Get Active Meter Customer Name""" | |||
meter_data = frappe.db.sql( | |||
"""SELECT invoice_customer | |||
FROM `tabProperty Meter Reading` | |||
WHERE parent=%s | |||
AND meter_type=%s | |||
AND status='Active'""", | |||
(property_id, meter_type), | |||
as_dict=True, | |||
) | |||
if meter_data: | |||
return meter_data[0].invoice_customer | |||
else: | |||
return "" | |||
@frappe.whitelist() | |||
def get_previous_meter_reading(meter_number, property_id, meter_type): | |||
"""Get Previous Meter Reading""" | |||
previous_reading_details = frappe.db.sql( | |||
"""SELECT md.current_meter_reading as 'previous_reading', | |||
m.reading_date as 'reading_date' | |||
FROM `tabMeter Reading Detail` AS md | |||
INNER JOIN `tabMeter Reading` AS m ON md.parent=m.name | |||
WHERE md.meter_number=%s | |||
AND m.docstatus=1 | |||
ORDER BY m.reading_date DESC limit 1""", | |||
meter_number, | |||
as_dict=True, | |||
) | |||
if len(previous_reading_details) >= 1: | |||
# print previous_reading_details[0].previous_reading | |||
return previous_reading_details[0] | |||
else: | |||
initial_reading_details = frappe.db.sql( | |||
"""SELECT initial_meter_reading as 'previous_reading', | |||
installation_date as 'reading_date' | |||
FROM `tabProperty Meter Reading` | |||
WHERE parent=%s | |||
AND meter_type=%s | |||
AND meter_number=%s | |||
AND status='Active'""", | |||
(property_id, meter_type, meter_number), | |||
as_dict=True, | |||
) | |||
if len(initial_reading_details) >= 1: | |||
return initial_reading_details[0] | |||
else: | |||
return 0 | |||
@frappe.whitelist() | |||
def make_invoice_meter_reading(self, method): | |||
for meter_row in self.meter_reading_detail: | |||
if int(meter_row.do_not_create_invoice) != 1: | |||
item_detail = get_item_details( | |||
self.meter_type, | |||
meter_row.reading_difference, | |||
meter_row.previous_reading_date, | |||
add_days(self.reading_date, -1), | |||
) | |||
# Changed from propert/meter customer lookup to pos cusotmer lookup as per conversation with Vimal on 2019-11-08 | |||
leasename = get_latest_active_lease(meter_row.property) | |||
lease = frappe.get_doc("Lease", leasename) | |||
# customer = get_active_meter_customer_from_property(meter_row.property,self.meter_type) | |||
customer = lease.customer | |||
if customer: | |||
meter_row.invoice_number = make_invoice( | |||
self.reading_date, | |||
customer, | |||
meter_row.property, | |||
item_detail, | |||
self.meter_type, | |||
meter_row.previous_reading_date, | |||
add_days(self.reading_date, -1), | |||
) | |||
# meter_row.invoice_number = si_no | |||
# frappe.db.set_value("Meter Reading Detail",meter_row.name,"invoice_number",si_no) | |||
self.db_update() | |||
@frappe.whitelist() | |||
def make_invoice( | |||
meter_date, customer, property_id, items, lease_item, from_date=None, to_date=None | |||
): | |||
company = frappe.db.get_value("Property", property_id, "company") | |||
try: | |||
sales_invoice = frappe.get_doc( | |||
dict( | |||
doctype="Sales Invoice", | |||
company=company, | |||
posting_date=meter_date, | |||
items=items, | |||
lease=get_latest_active_lease(property_id), | |||
lease_item=lease_item, | |||
customer=str(customer), | |||
due_date=getDueDate(meter_date, str(customer)), | |||
taxes_and_charges=frappe.get_value( | |||
"Company", company, "default_tax_template" | |||
), | |||
cost_center=get_cost_center(property_id), | |||
from_date=from_date, | |||
to_date=to_date, | |||
) | |||
).insert() | |||
if sales_invoice.taxes_and_charges: | |||
get_tax(sales_invoice) | |||
sales_invoice.calculate_taxes_and_totals() | |||
sales_invoice.save() | |||
return sales_invoice.name | |||
except Exception as e: | |||
app_error_log(frappe.session.user, str(e)) | |||
@frappe.whitelist() | |||
def get_tax(sales_invoice): | |||
taxes = get_taxes_and_charges( | |||
"Sales Taxes and Charges Template", sales_invoice.taxes_and_charges | |||
) | |||
for tax in taxes: | |||
sales_invoice.append("taxes", tax) | |||
@frappe.whitelist() | |||
def get_cost_center(property_id): | |||
return frappe.db.get_value("Property", property_id, "cost_center") | |||
@frappe.whitelist() | |||
def get_item_details(item, qty, service_start_date, service_end_date): | |||
item_dict = [] | |||
item_json = {} | |||
item_json["item_code"] = item | |||
item_json["qty"] = qty | |||
item_json["service_start_date"] = service_start_date | |||
item_json["service_end_date"] = service_end_date | |||
item_dict.append(item_json) | |||
return item_dict | |||
@frappe.whitelist() | |||
def get_latest_active_lease(property_id): | |||
lease_details = frappe.get_all( | |||
"Lease", | |||
filters={"property": property_id}, | |||
fields=["name"], | |||
order_by="lease_date desc", | |||
limit=1, | |||
) | |||
if len(lease_details) >= 1: | |||
return lease_details[0].name | |||
else: | |||
return "" |
@@ -0,0 +1,17 @@ | |||
# -*- coding: utf-8 -*- | |||
from __future__ import unicode_literals | |||
from frappe import _ | |||
def get_data(): | |||
return [ | |||
{ | |||
"module_name": "Property Management Solution", | |||
"category": "Domains", | |||
"color": "grey", | |||
"icon": "octicon octicon-home", | |||
"type": "module", | |||
"label": _("Property Management"), | |||
"description": "Property, lease, maintenance jobs, keys and analytics", | |||
}, | |||
] |
@@ -0,0 +1,12 @@ | |||
""" | |||
Configuration for docs | |||
""" | |||
# source_link = "https://github.com/[org_name]/propms" | |||
# docs_base_url = "https://[org_name].github.io/propms" | |||
# headline = "App that does everything" | |||
# sub_heading = "Yes, you got that right the first time, everything" | |||
def get_context(context): | |||
context.brand_html = "Property Management Solution" |
@@ -0,0 +1,200 @@ | |||
from __future__ import unicode_literals | |||
from frappe import _ | |||
def get_data(): | |||
config = [ | |||
{ | |||
"label": _("Property Documents"), | |||
"items": [ | |||
{ | |||
"type": "doctype", | |||
"name": "Property", | |||
"description": _("Property that needs to be managed."), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Lease", | |||
"description": _("Lease pertaining to the properties."), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Key Set Detail", | |||
"description": _("Key Set Detail"), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Tool Item Record", | |||
"description": _("Tool Item Record"), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Daily Checklist", | |||
"description": _("Daily Checklist"), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Exit", | |||
"description": _("Exit"), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Meter Reading", | |||
"description": _("Meter Reading"), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Outsourcing Attendance", | |||
"description": _("Outsourcing Attendance"), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Insurance", | |||
"description": _("Insurance"), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Security Attendance", | |||
"description": _("Security Attendance"), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Withholding Tax Summary", | |||
"description": _("Withholding Tax Summary"), | |||
}, | |||
], | |||
}, | |||
{ | |||
"label": _("Property Masters"), | |||
"icon": "fa fa-cog", | |||
"items": [ | |||
{ | |||
"type": "doctype", | |||
"name": "Unit Type", | |||
"label": _("Unit Type"), | |||
"description": _("Unit Type definition."), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Property", | |||
"description": _("Property database."), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Checklist Checkup Area", | |||
"icon": "fa fa-sitemap", | |||
"label": _("Checklist Checkup Area"), | |||
"description": _("Areas for Checklist Checkup."), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Guard Shift", | |||
"label": _("Guard Shift"), | |||
"description": _("Shif for security guards."), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Key Set", | |||
"icon": "fa fa-sitemap", | |||
"label": _("Key Set"), | |||
"description": _("Key sets in custody."), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Tool Item Set", | |||
"icon": "fa fa-sitemap", | |||
"label": _("Tool Item Set"), | |||
"description": _("Tool Item Sets in custody."), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Outsourcing Category", | |||
"label": _("Outsourcing Category"), | |||
"description": _("Outsourcing Category definition."), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Property Amenity", | |||
"label": _("Property Amenity"), | |||
"description": _("Property Amenity definition."), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Security Deposit Details", | |||
"label": _("Security Deposit Details"), | |||
"description": _("Security Deposit Details definition."), | |||
}, | |||
{ | |||
"type": "doctype", | |||
"name": "Meter", | |||
"label": _("Meter database"), | |||
"description": _("Register all meters here."), | |||
}, | |||
], | |||
}, | |||
{ | |||
"label": _("Property Settings"), | |||
"items": [ | |||
{ | |||
"type": "doctype", | |||
"name": "Property Management Settings", | |||
"label": _("Property Management Settings"), | |||
"description": _("Property Management Settings"), | |||
}, | |||
], | |||
}, | |||
{ | |||
"label": _("Property Analytics"), | |||
"items": [ | |||
{ | |||
"type": "report", | |||
"name": "Outsourcing Attendance", | |||
"is_query_report": True, | |||
"doctype": "Outsourcing Attendance", | |||
}, | |||
{ | |||
"type": "report", | |||
"name": "Security Attendance Report", | |||
"is_query_report": True, | |||
"doctype": "Security Attendance", | |||
}, | |||
{ | |||
"type": "report", | |||
"name": "Security Deposit", | |||
"is_query_report": True, | |||
"doctype": "Journal Entry", | |||
}, | |||
{ | |||
"type": "report", | |||
"name": "Debtors Report", | |||
"is_query_report": True, | |||
"doctype": "Sales Invoice", | |||
}, | |||
{ | |||
"type": "report", | |||
"name": "Creditors Report", | |||
"is_query_report": True, | |||
"doctype": "Purchase Invoice", | |||
}, | |||
{ | |||
"type": "report", | |||
"name": "Lease Information", | |||
"is_query_report": True, | |||
"doctype": "Lease", | |||
"label": _("Lease Report"), | |||
"description": _( | |||
"This is to show status of every lease by type of property" | |||
), | |||
}, | |||
{ | |||
"type": "report", | |||
"name": "Property Status", | |||
"is_query_report": True, | |||
"doctype": "Property", | |||
"label": _("Property Status"), | |||
"description": _("Information about all properties in the system"), | |||
}, | |||
], | |||
}, | |||
] | |||
return config |
@@ -0,0 +1,665 @@ | |||
[ | |||
{ | |||
"default_value": null, | |||
"doc_type": "Property", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "status", | |||
"modified": "2020-07-25 17:21:20.402797", | |||
"name": "Property-status-options", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "options", | |||
"property_type": "Text", | |||
"row_name": null, | |||
"value": "Available\nBooked\nCommon Area (Not for lease)\nManaged for Customer\nOff lease in 3 months\nOn lease\nOn Sale\nRemoved\nRenewal\nSold\nVacating" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Daily Checklist", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocType", | |||
"field_name": null, | |||
"modified": "2019-12-05 17:17:42.450023", | |||
"name": "Daily Checklist-default_print_format", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "default_print_format", | |||
"property_type": "Data", | |||
"row_name": null, | |||
"value": "Viva Daily Checklist" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Journal Entry Account", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "account", | |||
"modified": "2019-01-06 22:08:42.754975", | |||
"name": "Journal Entry Account-account-columns", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "columns", | |||
"property_type": "Int", | |||
"row_name": null, | |||
"value": "2" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Property", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "identification_section", | |||
"modified": "2018-11-22 23:40:47.629777", | |||
"name": "Property-identification_section-bold", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "bold", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Property", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "section_break_4", | |||
"modified": "2018-11-22 23:40:47.637187", | |||
"name": "Property-section_break_4-bold", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "bold", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Property", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "section_break_13", | |||
"modified": "2018-11-22 23:40:47.643462", | |||
"name": "Property-section_break_13-bold", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "bold", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Property", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "section_break_22", | |||
"modified": "2018-11-22 23:40:47.648895", | |||
"name": "Property-section_break_22-bold", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "bold", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Issue", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "section_break_7", | |||
"modified": "2019-12-05 15:52:47.917365", | |||
"name": "Issue-section_break_7-collapsible", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "collapsible", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "0" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Issue", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "section_break_19", | |||
"modified": "2019-12-05 15:52:58.147959", | |||
"name": "Issue-section_break_19-collapsible", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "collapsible", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "0" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Issue", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "raised_by", | |||
"modified": "2019-12-05 15:53:02.525191", | |||
"name": "Issue-raised_by-report_hide", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "report_hide", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Issue", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "email_account", | |||
"modified": "2019-12-05 15:53:09.089897", | |||
"name": "Issue-email_account-report_hide", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "report_hide", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Issue", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "issue_type", | |||
"modified": "2019-12-05 15:50:47.649347", | |||
"name": "Issue-issue_type-in_standard_filter", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_standard_filter", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Issue", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "priority", | |||
"modified": "2019-12-05 15:50:42.409011", | |||
"name": "Issue-priority-in_standard_filter", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_standard_filter", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "0" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Lease", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "property_owner", | |||
"modified": "2019-01-07 17:11:16.168472", | |||
"name": "Lease-property_owner-in_list_view", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_list_view", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Lease", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "customer", | |||
"modified": "2019-01-07 17:11:16.172340", | |||
"name": "Lease-customer-in_list_view", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_list_view", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Lease", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "start_date", | |||
"modified": "2019-01-07 17:11:16.176321", | |||
"name": "Lease-start_date-in_list_view", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_list_view", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Lease", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "end_date", | |||
"modified": "2019-01-07 17:11:16.180756", | |||
"name": "Lease-end_date-in_list_view", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_list_view", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Unit Type", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocType", | |||
"field_name": null, | |||
"modified": "2018-04-24 11:36:39.792787", | |||
"name": "Unit Type-search_fields", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "search_fields", | |||
"property_type": "Data", | |||
"row_name": null, | |||
"value": "unit_type" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Issue", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "opening_date", | |||
"modified": "2019-12-05 15:54:21.901296", | |||
"name": "Issue-opening_date-in_list_view", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_list_view", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Issue", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "raised_by", | |||
"modified": "2019-12-05 15:54:26.025138", | |||
"name": "Issue-raised_by-in_list_view", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_list_view", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "0" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Issue", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "issue_type", | |||
"modified": "2019-12-05 16:01:10.745021", | |||
"name": "Issue-issue_type-reqd", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "reqd", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Issue", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "status", | |||
"modified": "2019-12-05 16:01:06.081899", | |||
"name": "Issue-status-options", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "options", | |||
"property_type": "Text", | |||
"row_name": null, | |||
"value": "Open\nIn Progress\nAwaiting Parts\nUnder Observation\nIn Discussion\nAppointment\nHold\nClosed" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Contact", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "department", | |||
"modified": "2019-12-05 17:21:33.595133", | |||
"name": "Contact-department-fieldtype", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "fieldtype", | |||
"property_type": "Select", | |||
"row_name": null, | |||
"value": "Select" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Contact", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "department", | |||
"modified": "2019-12-05 17:21:28.706462", | |||
"name": "Contact-department-options", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "options", | |||
"property_type": "Text", | |||
"row_name": null, | |||
"value": "\nOutsourcing - Cleaning" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Material Request", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "material_request_type", | |||
"modified": "2019-01-04 09:15:05.932767", | |||
"name": "Material Request-material_request_type-options", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "options", | |||
"property_type": "Text", | |||
"row_name": null, | |||
"value": "Material Issue\nPurchase\nMaterial Transfer\nManufacture" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Key Set Detail", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "taken_by", | |||
"modified": "2018-12-19 15:55:00.488279", | |||
"name": "Key Set Detail-taken_by-in_standard_filter", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_standard_filter", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Key Set Detail", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "returned", | |||
"modified": "2018-12-19 15:55:00.491873", | |||
"name": "Key Set Detail-returned-in_standard_filter", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_standard_filter", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Key Set Detail", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "key_set", | |||
"modified": "2018-12-19 15:56:19.843792", | |||
"name": "Key Set Detail-key_set-in_standard_filter", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_standard_filter", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Lease", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "property_owner", | |||
"modified": "2019-07-05 18:49:31.131288", | |||
"name": "Lease-property_owner-in_standard_filter", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_standard_filter", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Lease", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "lease_customer", | |||
"modified": "2019-07-05 18:49:31.135659", | |||
"name": "Lease-lease_customer-in_standard_filter", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_standard_filter", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Lease", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "customer", | |||
"modified": "2019-07-05 18:49:31.140425", | |||
"name": "Lease-customer-in_standard_filter", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_standard_filter", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Lease", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "property_user", | |||
"modified": "2019-07-05 18:49:31.144249", | |||
"name": "Lease-property_user-in_standard_filter", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_standard_filter", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Lease", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "security_status", | |||
"modified": "2019-07-05 18:49:31.151498", | |||
"name": "Lease-security_status-in_standard_filter", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_standard_filter", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Lease", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "property", | |||
"modified": "2019-07-05 18:50:00.736862", | |||
"name": "Lease-property-in_standard_filter", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_standard_filter", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Lease", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "wtax_paid_by", | |||
"modified": "2019-07-05 18:54:41.367118", | |||
"name": "Lease-wtax_paid_by-in_standard_filter", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "in_standard_filter", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Lease", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "security_status", | |||
"modified": "2019-07-10 13:36:03.659626", | |||
"name": "Lease-security_status-options", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "options", | |||
"property_type": "Text", | |||
"row_name": null, | |||
"value": "\nProforma Invoice raised\nReceiving in process\nReceived\nReceived in part\nReturn in part\nReturned\nRecovered for rent\nRecovered for repairs\nNot required" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Issue", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocType", | |||
"field_name": null, | |||
"modified": "2019-12-05 15:53:35.441427", | |||
"name": "Issue-quick_entry", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "quick_entry", | |||
"property_type": "Check", | |||
"row_name": null, | |||
"value": "0" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Journal Entry Account", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "cost_center", | |||
"modified": "2020-03-13 16:19:25.831974", | |||
"name": "Journal Entry Account-cost_center-columns", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "columns", | |||
"property_type": "Int", | |||
"row_name": null, | |||
"value": "1" | |||
}, | |||
{ | |||
"default_value": null, | |||
"doc_type": "Issue", | |||
"docstatus": 0, | |||
"doctype": "Property Setter", | |||
"doctype_or_field": "DocField", | |||
"field_name": "company", | |||
"modified": "2020-10-13 04:17:10.536770", | |||
"name": "Issue-company-fetch_from", | |||
"parent": null, | |||
"parentfield": null, | |||
"parenttype": null, | |||
"property": "fetch_from", | |||
"property_type": "Small Text", | |||
"row_name": null, | |||
"value": "property_name.company" | |||
} | |||
] |
@@ -0,0 +1,252 @@ | |||
# -*- coding: utf-8 -*- | |||
from __future__ import unicode_literals | |||
from . import __version__ as app_version | |||
app_name = "propms" | |||
app_title = "Property Management Solution" | |||
app_publisher = "Aakvatech" | |||
app_description = "Property Management Solution" | |||
app_icon = "octicon octicon-home" | |||
app_color = "grey" | |||
app_email = "info@aakvatech.com" | |||
app_license = "MIT" | |||
# Includes in <head> | |||
# ------------------ | |||
# include js, css files in header of desk.html | |||
# app_include_css = "/assets/propms/css/propms.css" | |||
# app_include_js = "/assets/propms/js/propms.js" | |||
# include js, css files in header of web template | |||
# web_include_css = "/assets/propms/css/propms.css" | |||
# web_include_js = "/assets/propms/js/propms.js" | |||
# include js in page | |||
# page_js = {"page" : "public/js/file.js"} | |||
page_js = { | |||
"pos": "property_management_solution/point_of_sale.js", | |||
"point-of-sale": "property_management_solution/point_of_sale.js", | |||
} | |||
# include js in doctype views | |||
# doctype_js = {"doctype" : "public/js/doctype.js"} | |||
doctype_js = { | |||
"Sales Invoice": "property_management_solution/sales_invoice.js", | |||
"Journal Entry Account": "property_management_solution/journal_entry_account.js", | |||
"Issue": "property_management_solution/issue.js", | |||
"Company": "property_management_solution/company.js", | |||
} | |||
# doctype_list_js = {"doctype" : "public/js/doctype_list.js"} | |||
# doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"} | |||
# doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"} | |||
# Home Pages | |||
# ---------- | |||
# application home page (will override Website Settings) | |||
# home_page = "login" | |||
# website user home page (by Role) | |||
# role_home_page = { | |||
# "Role": "home_page" | |||
# } | |||
# Website user home page (by function) | |||
# get_website_user_home_page = "propms.utils.get_home_page" | |||
# Generators | |||
# ---------- | |||
# automatically create page for each record of this doctype | |||
# website_generators = ["Web Page"] | |||
# Installation | |||
# ------------ | |||
# before_install = "propms.install.before_install" | |||
# after_install = "propms.install.after_install" | |||
# Desk Notifications | |||
# ------------------ | |||
# See frappe.core.notifications.get_notification_config | |||
# notification_config = "propms.notifications.get_notification_config" | |||
# Permissions | |||
# ----------- | |||
# Permissions evaluated in scripted ways | |||
# permission_query_conditions = { | |||
# "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions", | |||
# } | |||
# | |||
# has_permission = { | |||
# "Event": "frappe.desk.doctype.event.event.has_permission", | |||
# } | |||
# Document Events | |||
# --------------- | |||
# Hook on document methods and events | |||
fixtures = [ | |||
{ | |||
"doctype": "Custom Field", | |||
"filters": [ | |||
[ | |||
"name", | |||
"in", | |||
( | |||
"Company-default_maintenance_tax_template", | |||
"Company-default_tax_account_head", | |||
"Company-default_tax_template", | |||
"Company-property_management_settings", | |||
"Company-security_account_code", | |||
"Issue Materials Detail-mateiral_request", | |||
"Issue-col_brk_001", | |||
"Issue-column_break_14", | |||
"Issue-column_break_4", | |||
"Issue-customer_feedback", | |||
"Issue-defect_found", | |||
"Issue-material_request", | |||
"Issue-materials_billed", | |||
"Issue-materials_required", | |||
"Issue-person_in_charge_name", | |||
"Issue-person_in_charge", | |||
"Issue-property_name", | |||
"Issue-section_break_15", | |||
"Issue-sub_contractor_contact", | |||
"Issue-sub_contractor_name", | |||
"Item-reading_required", | |||
"Material Request Item-material_request", | |||
"Material Request-sales_invoice", | |||
"Quotation-cost_center", | |||
"Sales Invoice-job_card", | |||
"Sales Invoice-lease_information", | |||
"Sales Invoice-lease_item", | |||
"Sales Invoice-lease", | |||
), | |||
] | |||
], | |||
}, | |||
{ | |||
"doctype": "Property Setter", | |||
"filters": [ | |||
[ | |||
"name", | |||
"in", | |||
( | |||
"Contact-department-fieldtype", | |||
"Contact-department-options", | |||
"Daily Checklist-default_print_format", | |||
"Issue-company-fetch_from", | |||
"Issue-email_account-report_hide", | |||
"Issue-issue_type-in_standard_filter", | |||
"Issue-issue_type-reqd", | |||
"Issue-opening_date-in_list_view", | |||
"Issue-priority-in_standard_filter", | |||
"Issue-quick_entry", | |||
"Issue-raised_by-in_list_view", | |||
"Issue-raised_by-report_hide", | |||
"Issue-section_break_19-collapsible", | |||
"Issue-section_break_7-collapsible", | |||
"Issue-status-options", | |||
"Journal Entry Account-account-columns", | |||
"Journal Entry Account-cost_center-columns", | |||
"Key Set Detail-key_set-in_standard_filter", | |||
"Key Set Detail-returned-in_standard_filter", | |||
"Key Set Detail-taken_by-in_standard_filter", | |||
"Lease-customer-in_list_view", | |||
"Lease-customer-in_standard_filter", | |||
"Lease-end_date-in_list_view", | |||
"Lease-lease_customer-in_standard_filter", | |||
"Lease-property_owner-in_list_view", | |||
"Lease-property_owner-in_standard_filter", | |||
"Lease-property_user-in_standard_filter", | |||
"Lease-property-in_standard_filter", | |||
"Lease-security_status-in_standard_filter", | |||
"Lease-security_status-options", | |||
"Lease-start_date-in_list_view", | |||
"Lease-wtax_paid_by-in_standard_filter", | |||
"Material Request-material_request_type-options", | |||
"Property-identification_section-bold", | |||
"Property-section_break_13-bold", | |||
"Property-section_break_22-bold", | |||
"Property-section_break_4-bold", | |||
"Property-status-options", | |||
"Unit Type-search_fields", | |||
), | |||
] | |||
], | |||
}, | |||
] | |||
doc_events = { | |||
"Issue": { | |||
"validate": [ | |||
"propms.issue_hook.validate", | |||
], | |||
}, | |||
"Material Request": { | |||
"validate": "propms.auto_custom.makeSalesInvoice", | |||
"on_update": "propms.auto_custom.makeSalesInvoice", | |||
"on_change": "propms.auto_custom.makeSalesInvoice", | |||
}, | |||
"Sales Order": { | |||
"validate": "propms.auto_custom.validateSalesInvoiceItemDuplication" | |||
}, | |||
"Key Set Detail": {"on_change": "propms.auto_custom.changeStatusKeyset"}, | |||
"Meter Reading": {"on_submit": "propms.auto_custom.make_invoice_meter_reading"}, | |||
} | |||
scheduler_events = { | |||
"daily": [ | |||
"propms.auto_custom.statusChangeBeforeLeaseExpire", | |||
"propms.auto_custom.statusChangeAfterLeaseExpire", | |||
], | |||
"cron": {"00 12 * * *": ["propms.lease_invoice.leaseInvoiceAutoCreate"]}, | |||
} | |||
# doc_events = { | |||
# "*": { | |||
# "on_update": "method", | |||
# "on_cancel": "method", | |||
# "on_trash": "method" | |||
# } | |||
# } | |||
# Scheduled Tasks | |||
# --------------- | |||
# scheduler_events = { | |||
# "all": [ | |||
# "propms.tasks.all" | |||
# ], | |||
# "daily": [ | |||
# "propms.tasks.daily" | |||
# ], | |||
# "hourly": [ | |||
# "propms.tasks.hourly" | |||
# ], | |||
# "weekly": [ | |||
# "propms.tasks.weekly" | |||
# ] | |||
# "monthly": [ | |||
# "propms.tasks.monthly" | |||
# ] | |||
# } | |||
# Testing | |||
# ------- | |||
# before_tests = "propms.install.before_tests" | |||
# Overriding Whitelisted Methods | |||
# ------------------------------ | |||
# | |||
# override_whitelisted_methods = { | |||
# "frappe.desk.doctype.event.event.get_events": "propms.event.get_events" | |||
# } |
@@ -0,0 +1,316 @@ | |||
from __future__ import unicode_literals | |||
import frappe | |||
from frappe import _ | |||
from frappe.utils import today | |||
from erpnext.utilities.product import get_price | |||
from erpnext.stock.get_item_details import get_pos_profile | |||
from propms.auto_custom import get_latest_active_lease | |||
from erpnext.controllers.accounts_controller import get_taxes_and_charges | |||
def make_sales_invoice(doc, for_self_consumption=None): | |||
is_grouped = frappe.db.get_value( | |||
"Property Management Settings", None, "group_maintenance_job_items" | |||
) | |||
if not is_grouped: | |||
is_grouped = 0 | |||
is_grouped = int(is_grouped) | |||
company = doc.company | |||
if not company: | |||
company = frappe.db.get_single_value("Global Defaults", "default_company") | |||
cost_center = frappe.db.get_value("Property", doc.property_name, "cost_center") | |||
submit_maintenance_invoice = frappe.db.get_value( | |||
"Property Management Settings", None, "submit_maintenance_invoice" | |||
) | |||
self_consumption_customer = frappe.db.get_value( | |||
"Property Management Settings", None, "self_consumption_customer" | |||
) | |||
if not submit_maintenance_invoice: | |||
submit_maintenance_invoice = 0 | |||
submit_maintenance_invoice = int(submit_maintenance_invoice) | |||
user_remarks = "Sales invoice for Maintenance Job Card {0}".format(doc.name) | |||
lease = get_latest_active_lease(doc.property_name) | |||
def _make_sales_invoice(items_list=None, pos=None, self_customer=None): | |||
if not len(items_list) > 0 or not doc.customer: | |||
return | |||
default_tax_template = frappe.db.get_value( | |||
"Company", company, "default_maintenance_tax_template" | |||
) | |||
if not default_tax_template: | |||
url = frappe.utils.get_url_to_form("Company", company) | |||
frappe.throw( | |||
_( | |||
"Please Setup Default Maintenance Tax Template in <a href='{0}'>{1}</a>".format( | |||
url, company | |||
) | |||
) | |||
) | |||
if self_customer: | |||
invoice_customer = self_consumption_customer | |||
else: | |||
invoice_customer = doc.customer | |||
is_pos = 0 | |||
pos_profile = "" | |||
naming_series = "" | |||
if pos: | |||
user_pos_profile = get_pos_profile(company) | |||
is_pos = 1 | |||
pos_profile = user_pos_profile.name | |||
naming_series = user_pos_profile.naming_series | |||
default_tax_template = ( | |||
user_pos_profile.taxes_and_charges or default_tax_template | |||
) | |||
invoice_doc = frappe.get_doc( | |||
dict( | |||
is_pos=is_pos, | |||
pos_profile=pos_profile, | |||
naming_series=naming_series, | |||
doctype="Sales Invoice", | |||
customer=invoice_customer, | |||
company=company, | |||
posting_date=today(), | |||
due_date=today(), | |||
ignore_pricing_rule=1, | |||
items=items_list, | |||
update_stock=1, | |||
remarks=user_remarks, | |||
cost_center=cost_center, | |||
lease=lease, | |||
taxes_and_charges=default_tax_template, | |||
job_card=doc.name, | |||
) | |||
).insert(ignore_permissions=True) | |||
invoice_doc.reload() | |||
if invoice_doc.taxes_and_charges and not pos: | |||
getTax(invoice_doc) | |||
invoice_doc.calculate_taxes_and_totals() | |||
invoice_doc.run_method("set_missing_values") | |||
invoice_doc.run_method("calculate_taxes_and_totals") | |||
invoice_doc.save() | |||
if invoice_doc: | |||
invoice_url = frappe.utils.get_url_to_form( | |||
invoice_doc.doctype, invoice_doc.name | |||
) | |||
si_msgprint = "Sales invoice Created <a href='{0}'>{1}</a>".format( | |||
invoice_url, invoice_doc.name | |||
) | |||
frappe.flags.ignore_account_permission = True | |||
if submit_maintenance_invoice == 1 and not pos: | |||
invoice_doc.submit() | |||
if pos: | |||
make_sales_pos_payment(invoice_doc, user_pos_profile.name) | |||
si_msgprint = "POS " + si_msgprint | |||
frappe.msgprint(_(si_msgprint)) | |||
for item_row in doc.materials_billed: | |||
if ( | |||
item_row.item | |||
and item_row.quantity | |||
and item_row.invoiced == 1 | |||
and not item_row.sales_invoice | |||
): | |||
item_row.sales_invoice = invoice_doc.name | |||
frappe.db.set_value( | |||
"Issue Materials Billed", | |||
item_row.name, | |||
"sales_invoice", | |||
invoice_doc.name, | |||
) | |||
frappe.db.commit() | |||
def getTax(sales_invoice): | |||
taxes = get_taxes_and_charges( | |||
"Sales Taxes and Charges Template", sales_invoice.taxes_and_charges | |||
) | |||
for tax in taxes: | |||
sales_invoice.append("taxes", tax) | |||
def make_sales_pos_payment(invoice_doc, pos_profile_name): | |||
default_mode_of_payment = frappe.db.get_value( | |||
"Sales Invoice Payment", | |||
{"parent": pos_profile_name, "default": 1}, | |||
["mode_of_payment", "type", "account"], | |||
as_dict=1, | |||
) | |||
payment_row = invoice_doc.append("payments", {}) | |||
payment_row.mode_of_payment = default_mode_of_payment.mode_of_payment | |||
payment_row.amount = invoice_doc.grand_total | |||
payment_row.base_amount = invoice_doc.grand_total | |||
payment_row.account = default_mode_of_payment.account | |||
invoice_doc.submit() | |||
if is_grouped == 1: | |||
items = [] | |||
for item_row in doc.materials_billed: | |||
if ( | |||
item_row.item | |||
and item_row.quantity | |||
and item_row.material_status == "Bill" | |||
and not item_row.sales_invoice | |||
and item_row.is_pos | |||
): | |||
item_dict = dict( | |||
item_code=item_row.item, | |||
qty=item_row.quantity, | |||
rate=item_row.rate, | |||
cost_center=cost_center, | |||
item_tax_template=get_taxes_template(item_row.item), | |||
) | |||
items.append(item_dict) | |||
item_row.invoiced = 1 | |||
_make_sales_invoice(items, True) | |||
items = [] | |||
for item_row in doc.materials_billed: | |||
if ( | |||
item_row.item | |||
and item_row.quantity | |||
and item_row.material_status == "Bill" | |||
and not item_row.sales_invoice | |||
and not item_row.is_pos | |||
): | |||
item_dict = dict( | |||
item_code=item_row.item, | |||
qty=item_row.quantity, | |||
rate=item_row.rate, | |||
cost_center=cost_center, | |||
item_tax_template=get_taxes_template(item_row.item), | |||
) | |||
items.append(item_dict) | |||
item_row.invoiced = 1 | |||
_make_sales_invoice(items, False) | |||
if for_self_consumption: | |||
items = [] | |||
for item_row in doc.materials_billed: | |||
if ( | |||
item_row.item | |||
and item_row.quantity | |||
and item_row.material_status == "Self Consumption" | |||
and not item_row.sales_invoice | |||
): | |||
item_dict = dict( | |||
item_code=item_row.item, | |||
qty=item_row.quantity, | |||
rate=item_row.rate, | |||
cost_center=cost_center, | |||
item_tax_template=get_taxes_template(item_row.item), | |||
) | |||
items.append(item_dict) | |||
item_row.invoiced = 1 | |||
_make_sales_invoice(items, False, True) | |||
else: | |||
for item_row in doc.materials_billed: | |||
items = [] | |||
if ( | |||
item_row.item | |||
and item_row.quantity | |||
and item_row.material_status == "Bill" | |||
and not item_row.sales_invoice | |||
): | |||
item_dict = dict( | |||
item_code=item_row.item, | |||
qty=item_row.quantity, | |||
rate=item_row.rate, | |||
cost_center=cost_center, | |||
item_tax_template=get_taxes_template(item_row.item), | |||
) | |||
items.append(item_dict) | |||
item_row.invoiced = 1 | |||
if item_row.is_pos: | |||
pos = True | |||
else: | |||
pos = False | |||
_make_sales_invoice(items, pos) | |||
if for_self_consumption: | |||
for item_row in doc.materials_billed: | |||
items = [] | |||
if ( | |||
item_row.item | |||
and item_row.quantity | |||
and item_row.material_status == "Self Consumption" | |||
and not item_row.sales_invoice | |||
): | |||
item_dict = dict( | |||
item_code=item_row.item, | |||
qty=item_row.quantity, | |||
rate=item_row.rate, | |||
cost_center=cost_center, | |||
item_tax_template=get_taxes_template(item_row.item), | |||
) | |||
items.append(item_dict) | |||
item_row.invoiced = 1 | |||
_make_sales_invoice(items, False, True) | |||
@frappe.whitelist() | |||
def get_item_rate(item, customer): | |||
price_list = frappe.db.get_single_value("Selling Settings", "selling_price_list") | |||
price_list = price_list or frappe.db.get_value( | |||
"Customer", customer, "default_price_list" | |||
) | |||
customer_group = frappe.db.get_value("Customer", customer, "customer_group") | |||
company = frappe.db.get_single_value("Global Defaults", "default_company") | |||
rate = get_price(item, price_list, customer_group, company) | |||
if rate: | |||
return rate["price_list_rate"] | |||
@frappe.whitelist() | |||
def get_items_group(): | |||
property_doc = frappe.get_doc("Property Management Settings") | |||
items_group_list = [] | |||
for items_group in property_doc.maintenance_item_group: | |||
items_group_list.append(items_group.item_group) | |||
return items_group_list | |||
def validate_materials_required(doc): | |||
have_items = 0 | |||
for item in doc.materials_required: | |||
if item.material_status != "Self Consumption": | |||
have_items += 1 | |||
if have_items > 0 and doc.status == "Closed": | |||
frappe.throw( | |||
_( | |||
"The materials required has items and so the job card cannot be closed. Please confirm billing status fo the materials required." | |||
) | |||
) | |||
def validate(doc, method): | |||
validate_materials_required(doc) | |||
make_sales_invoice(doc, False) | |||
if doc.status == "Closed": | |||
make_sales_invoice(doc, True) | |||
def get_taxes_template(item_code): | |||
item_tax_template = get_taxes_and_charges("Item", item_code) | |||
if len(item_tax_template) > 0: | |||
return item_tax_template[0]["item_tax_template"] | |||
else: | |||
return "" | |||
@frappe.whitelist() | |||
def get_stock_availability(item_code, company, is_pos): | |||
warehouse = "" | |||
if int(is_pos) == 1: | |||
user_pos_profile = get_pos_profile(company) | |||
warehouse = user_pos_profile.warehouse | |||
if not warehouse: | |||
warehouse = frappe.db.get_single_value("Stock Settings", "default_warehouse") | |||
latest_sle = frappe.db.sql( | |||
"""select sum(actual_qty) as actual_qty | |||
from `tabStock Ledger Entry` | |||
where item_code = %s and warehouse = %s | |||
limit 1""", | |||
(item_code, warehouse), | |||
as_dict=1, | |||
) | |||
sle_qty = latest_sle[0].actual_qty or 0 if latest_sle else 0 | |||
return sle_qty |
@@ -0,0 +1,262 @@ | |||
from __future__ import unicode_literals | |||
from erpnext.controllers.accounts_controller import get_taxes_and_charges | |||
from erpnext.accounts.party import get_due_date | |||
from frappe.utils import add_days, today, add_months | |||
import frappe | |||
import frappe.permissions | |||
import frappe.share | |||
import json | |||
import traceback | |||
from frappe import _ | |||
@frappe.whitelist() | |||
def app_error_log(title, error): | |||
d = frappe.get_doc( | |||
{ | |||
"doctype": "Custom Error Log", | |||
"title": str("User:") + str(title), | |||
"error": traceback.format_exc(), | |||
} | |||
) | |||
d = d.insert(ignore_permissions=True) | |||
return d | |||
@frappe.whitelist() | |||
def makeInvoice( | |||
date, | |||
customer, | |||
items, | |||
currency=None, | |||
lease=None, | |||
lease_item=None, | |||
qty=None, | |||
schedule_start_date=None, | |||
doctype="Sales Invoice", # Allow to create Sales Invoice or Sales Order | |||
): | |||
"""Create sales invoice from lease invoice schedule.""" | |||
if not doctype: | |||
doctype = "Sales Invoice" | |||
try: | |||
if not customer: | |||
frappe.throw(_("Please select a Customer in Lease {0}").format(lease)) | |||
company = frappe.get_value("Lease", lease, "company") | |||
default_tax_template = frappe.get_value( | |||
"Company", company, "default_tax_template" | |||
) | |||
if qty != int(qty): | |||
# it means the last invoice for the lease that may have fraction of months | |||
subs_end_date = frappe.get_value("Lease", lease, "end_date") | |||
else: | |||
# month qty is not fractional | |||
subs_end_date = add_days(add_months(schedule_start_date, qty), -1) | |||
doc = frappe.get_doc( | |||
dict( | |||
doctype=doctype, | |||
company=company, | |||
posting_date=today(), | |||
items=json.loads(items), | |||
customer=str(customer), | |||
due_date=getDueDate(today(), str(customer)), | |||
currency=currency, | |||
lease=lease, | |||
lease_item=lease_item, | |||
taxes_and_charges=default_tax_template, | |||
from_date=schedule_start_date, | |||
to_date=subs_end_date, | |||
cost_center=getCostCenter(lease), | |||
) | |||
) | |||
if doc.doctype == "Sales Order": | |||
doc.delivery_date = doc.to_date | |||
doc.insert() | |||
if doc.taxes_and_charges: | |||
getTax(doc) | |||
doc.calculate_taxes_and_totals() | |||
# frappe.msgprint("Department " + str(sales_invoice.department)) | |||
doc.save() | |||
return doc | |||
except Exception as e: | |||
app_error_log(frappe.session.user, str(e)) | |||
@frappe.whitelist() | |||
def getTax(sales_invoice): | |||
taxes = get_taxes_and_charges( | |||
"Sales Taxes and Charges Template", sales_invoice.taxes_and_charges | |||
) | |||
for tax in taxes: | |||
sales_invoice.append("taxes", tax) | |||
@frappe.whitelist() | |||
def getDueDate(date, customer): | |||
return get_due_date( | |||
date, | |||
"Customer", | |||
str(customer), | |||
frappe.db.get_single_value("Global Defaults", "default_company"), | |||
date, | |||
) | |||
@frappe.whitelist() | |||
def getCostCenter(name): | |||
property_name = frappe.db.get_value("Lease", name, "property") | |||
return frappe.db.get_value("Property", property_name, "cost_center") | |||
@frappe.whitelist() | |||
def leaseInvoiceAutoCreate(): | |||
"""Prepare data to create sales invoice from lease invoice schedule. This is called from form button as well as daily schedule""" | |||
try: | |||
# frappe.msgprint("Started") | |||
invoice_start_date = frappe.db.get_single_value( | |||
"Property Management Settings", "invoice_start_date" | |||
) | |||
lease_invoice = frappe.get_all( | |||
"Lease Invoice Schedule", | |||
filters={ | |||
"date_to_invoice": ["between", (invoice_start_date, today())], | |||
"invoice_number": "", | |||
}, | |||
fields=[ | |||
"name", | |||
"date_to_invoice", | |||
"invoice_number", | |||
"parent", | |||
"parent", | |||
"invoice_item_group", | |||
"lease_item", | |||
"paid_by", | |||
"currency", | |||
], | |||
order_by="parent, paid_by, invoice_item_group, date_to_invoice, currency, lease_item", | |||
) | |||
# frappe.msgprint("Lease being generated for " + str(lease_invoice)) | |||
row_num = 1 # to identify the 1st line of the list | |||
prev_parent = "" | |||
prev_customer = "" | |||
prev_invoice_item_group = "" | |||
prev_date_to_invoice = "" | |||
lease_invoice_schedule_name = "" | |||
prev_currency = "" | |||
lease_invoice_schedule_list = [] | |||
item_dict = [] | |||
item_json = {} | |||
# frappe.msgprint(str(lease_invoice)) | |||
for row in lease_invoice: | |||
# frappe.msgprint(str(invoice_item.name) + " " + str(invoice_item.lease_item)) | |||
# Check if same lease, customer, invoice_item_group and date_to_invoice. | |||
# Also should not be 1st row of the list | |||
# frappe.msgprint(row.parent + " -- " + prev_parent + " -- " + row.paid_by + " -- " + prev_customer + " -- " + row.invoice_item_group + " -- " + prev_invoice_item_group + " -- " + str(row.date_to_invoice) + " -- " + str(prev_date_to_invoice) + " -- " + row.currency + " -- " + prev_currency) | |||
if ( | |||
not ( | |||
row.parent == prev_parent | |||
and row.paid_by == prev_customer | |||
and row.invoice_item_group == prev_invoice_item_group | |||
and row.date_to_invoice == prev_date_to_invoice | |||
and row.currency == prev_currency | |||
) | |||
and row_num != 1 | |||
): | |||
# frappe.msgprint("Creating invoice for: " + str(item_dict)) | |||
res = makeInvoice( | |||
invoice_item.date_to_invoice, | |||
invoice_item.paid_by, | |||
json.dumps(item_dict), | |||
invoice_item.currency, | |||
invoice_item.parent, | |||
invoice_item.lease_item, | |||
invoice_item.qty, | |||
invoice_item.schedule_start_date, | |||
doctype=invoice_item.document_type, | |||
) | |||
# frappe.msgprint("Result: " + str(res)) | |||
if res: | |||
# Loop through all list invoice names that were created and update them with same invoice number | |||
for lease_invoice_schedule_name in lease_invoice_schedule_list: | |||
# frappe.msgprint("---") | |||
# frappe.msgprint("The lease invoice schedule " + str(lease_invoice_schedule_name) + " would be updated with invoice number " + str(res.name) ) | |||
frappe.db.set_value( | |||
"Lease Invoice Schedule", | |||
lease_invoice_schedule_name, | |||
"invoice_number" | |||
if res.doctype == "Sales Invoice" | |||
else "sales_order_number", | |||
res.name, | |||
) | |||
frappe.msgprint( | |||
"Lease Invoice generated with number: " + str(res.name) | |||
) | |||
item_dict = [] | |||
lease_invoice_schedule_list = ( | |||
[] | |||
) # reset the list of names of lease_invoice_schedule | |||
item_json = {} | |||
# Now that the invoice would be created if required, load the record for preparing item_dict | |||
invoice_item = frappe.get_doc("Lease Invoice Schedule", row.name) | |||
if not (invoice_item.schedule_start_date): | |||
invoice_item.schedule_start_date = invoice_item.date_to_invoice | |||
lease_end_date = frappe.get_value("Lease", invoice_item.parent, "end_date") | |||
item_json["item_code"] = invoice_item.lease_item | |||
item_json["qty"] = invoice_item.qty | |||
item_json["rate"] = invoice_item.rate | |||
item_json["cost_center"] = getCostCenter(invoice_item.parent) | |||
item_json["withholding_tax_rate"] = invoice_item.tax | |||
# item_json["enable_deferred_revenue"] = 1 # Set it to true | |||
item_json["service_start_date"] = str(invoice_item.schedule_start_date) | |||
if invoice_item.qty != int(invoice_item.qty): | |||
# it means the last invoice for the lease that may have fraction of months | |||
subs_end_date = lease_end_date | |||
else: | |||
# month qty is not fractional | |||
subs_end_date = add_days( | |||
add_months(invoice_item.schedule_start_date, invoice_item.qty), -1 | |||
) | |||
item_json["service_end_date"] = str(subs_end_date) | |||
# Append to the dictionary as a dict() so that the values for the new row can be set | |||
item_dict.append(dict(item_json)) | |||
lease_invoice_schedule_list.append(invoice_item.name) | |||
# Remember the values for the next round | |||
prev_parent = invoice_item.parent | |||
prev_customer = invoice_item.paid_by | |||
prev_invoice_item_group = invoice_item.invoice_item_group | |||
prev_date_to_invoice = invoice_item.date_to_invoice | |||
prev_currency = invoice_item.currency | |||
row_num += 1 # increment by 1 | |||
# Create the last invoice | |||
res = makeInvoice( | |||
invoice_item.date_to_invoice, | |||
invoice_item.paid_by, | |||
json.dumps(item_dict), | |||
invoice_item.currency, | |||
invoice_item.parent, | |||
invoice_item.lease_item, | |||
invoice_item.qty, | |||
invoice_item.schedule_start_date, | |||
doctype=invoice_item.document_type, | |||
) | |||
if res: | |||
# Loop through all list invoice names that were created and update them with same invoice number | |||
for lease_invoice_schedule_name in lease_invoice_schedule_list: | |||
# frappe.msgprint("The lease invoice schedule " + str(lease_invoice_schedule_name) + " would be updated with invoice number " + str(res.name)) | |||
frappe.db.set_value( | |||
"Lease Invoice Schedule", | |||
lease_invoice_schedule_name, | |||
"invoice_number" | |||
if res.doctype == "Sales Invoice" | |||
else "sales_order_number", | |||
res.name, | |||
) | |||
frappe.msgprint("Lease Invoice generated with number: " + str(res.name)) | |||
except Exception as e: | |||
app_error_log(frappe.session.user, str(e)) | |||
@frappe.whitelist() | |||
def test(): | |||
return today() |
@@ -0,0 +1 @@ | |||
Property Management Solution |
@@ -0,0 +1,19 @@ | |||
from __future__ import unicode_literals | |||
import frappe | |||
@frappe.whitelist() | |||
def get_pos_data(cost_center): | |||
property = frappe.get_list("Property", filters={"cost_center": cost_center}) | |||
lease = None | |||
one_lease = None | |||
if property: | |||
lease = frappe.get_all( | |||
"Lease", | |||
filters={"property": property[0].name}, | |||
fields=["*"], | |||
order_by="end_date desc", | |||
) | |||
if lease: | |||
one_lease = frappe.get_doc("Lease", lease[0].name) | |||
return one_lease |
@@ -0,0 +1,35 @@ | |||
// Copyright (c) 2019, Aakvatech and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('Company', { | |||
setup: function(frm) { | |||
frm.set_query("security_account_code", function() { | |||
return { | |||
"filters": [ | |||
["company","=", frm.doc.name], | |||
] | |||
}; | |||
}); | |||
frm.set_query("default_tax_account_head", function() { | |||
return { | |||
"filters": [ | |||
["company","=", frm.doc.name], | |||
] | |||
}; | |||
}); | |||
frm.set_query("default_tax_template", function() { | |||
return { | |||
"filters": [ | |||
["company","=", frm.doc.name], | |||
] | |||
}; | |||
}); | |||
frm.set_query("default_maintenance_tax_template", function() { | |||
return { | |||
"filters": [ | |||
["company","=", frm.doc.name], | |||
] | |||
}; | |||
}); | |||
}, | |||
}); |
@@ -0,0 +1,8 @@ | |||
// Copyright (c) 2018, Aakvatech and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('Apartment Status', { | |||
refresh: function(frm) { | |||
} | |||
}); |
@@ -0,0 +1,280 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_events_in_timeline": 0, | |||
"allow_guest_to_view": 0, | |||
"allow_import": 1, | |||
"allow_rename": 0, | |||
"beta": 0, | |||
"creation": "2018-11-19 14:37:42.223377", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Document", | |||
"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": "apartment_no", | |||
"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": "Apartment No", | |||
"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": "bhk", | |||
"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": "BHK", | |||
"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": "rent", | |||
"fieldtype": "Currency", | |||
"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": "Rent", | |||
"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": "agreement_start_date", | |||
"fieldtype": "Date", | |||
"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": "Agreement Start Date", | |||
"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": "agreement_end_date", | |||
"fieldtype": "Date", | |||
"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": "Agreement End Date", | |||
"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 | |||
} | |||
], | |||
"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-11-26 10:44:05.098029", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Apartment Status", | |||
"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 | |||
}, | |||
{ | |||
"amend": 0, | |||
"cancel": 0, | |||
"create": 1, | |||
"delete": 0, | |||
"email": 1, | |||
"export": 1, | |||
"if_owner": 0, | |||
"import": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
"report": 1, | |||
"role": "Floor Maintenance Supervisor", | |||
"set_user_permissions": 0, | |||
"share": 1, | |||
"submit": 0, | |||
"write": 1 | |||
}, | |||
{ | |||
"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": "Maintenance Job in-charge", | |||
"set_user_permissions": 0, | |||
"share": 1, | |||
"submit": 0, | |||
"write": 1 | |||
}, | |||
{ | |||
"amend": 0, | |||
"cancel": 0, | |||
"create": 0, | |||
"delete": 1, | |||
"email": 1, | |||
"export": 1, | |||
"if_owner": 0, | |||
"import": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
"report": 1, | |||
"role": "Maintenance 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, | |||
"track_views": 0 | |||
} |
@@ -0,0 +1,10 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
from frappe.model.document import Document | |||
class ApartmentStatus(Document): | |||
pass |
@@ -0,0 +1,23 @@ | |||
/* eslint-disable */ | |||
// rename this file from _test_[name] to test_[name] to activate | |||
// and remove above this line | |||
QUnit.test("test: Apartment Status", function (assert) { | |||
let done = assert.async(); | |||
// number of asserts | |||
assert.expect(1); | |||
frappe.run_serially([ | |||
// insert a new Apartment Status | |||
() => frappe.tests.make('Apartment Status', [ | |||
// values to be set | |||
{key: 'value'} | |||
]), | |||
() => { | |||
assert.equal(cur_frm.doc.key, 'value'); | |||
}, | |||
() => done() | |||
]); | |||
}); |
@@ -0,0 +1,9 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and Contributors | |||
# See license.txt | |||
from __future__ import unicode_literals | |||
import unittest | |||
class TestApartmentStatus(unittest.TestCase): | |||
pass |
@@ -0,0 +1,8 @@ | |||
// Copyright (c) 2018, Aakvatech and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('Checklist Checkup Area', { | |||
refresh: function(frm) { | |||
} | |||
}); |
@@ -0,0 +1,129 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_events_in_timeline": 0, | |||
"allow_guest_to_view": 0, | |||
"allow_import": 1, | |||
"allow_rename": 0, | |||
"autoname": "field:area_name", | |||
"beta": 0, | |||
"creation": "2018-11-19 21:25:43.525121", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Setup", | |||
"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": "area_name", | |||
"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": "Area Name", | |||
"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": 1 | |||
}, | |||
{ | |||
"allow_bulk_edit": 0, | |||
"allow_in_quick_entry": 0, | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "task", | |||
"fieldtype": "Table", | |||
"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": "Task", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "Checklist Checkup Area Task", | |||
"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": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2018-11-28 23:30:01.366323", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Checklist Checkup Area", | |||
"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": 0, | |||
"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, | |||
"track_views": 0 | |||
} |
@@ -0,0 +1,10 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
from frappe.model.document import Document | |||
class ChecklistCheckupArea(Document): | |||
pass |
@@ -0,0 +1,23 @@ | |||
/* eslint-disable */ | |||
// rename this file from _test_[name] to test_[name] to activate | |||
// and remove above this line | |||
QUnit.test("test: Checklist Checkup Area", function (assert) { | |||
let done = assert.async(); | |||
// number of asserts | |||
assert.expect(1); | |||
frappe.run_serially([ | |||
// insert a new Checklist Checkup Area | |||
() => frappe.tests.make('Checklist Checkup Area', [ | |||
// values to be set | |||
{key: 'value'} | |||
]), | |||
() => { | |||
assert.equal(cur_frm.doc.key, 'value'); | |||
}, | |||
() => done() | |||
]); | |||
}); |
@@ -0,0 +1,9 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and Contributors | |||
# See license.txt | |||
from __future__ import unicode_literals | |||
import unittest | |||
class TestChecklistCheckupArea(unittest.TestCase): | |||
pass |
@@ -0,0 +1,75 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_events_in_timeline": 0, | |||
"allow_guest_to_view": 0, | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"beta": 0, | |||
"creation": "2018-11-28 23:29:17.113927", | |||
"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": "task_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": "Task Name", | |||
"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 | |||
} | |||
], | |||
"has_web_view": 0, | |||
"hide_heading": 0, | |||
"hide_toolbar": 0, | |||
"idx": 0, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 1, | |||
"max_attachments": 0, | |||
"modified": "2018-11-28 23:30:54.797083", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Checklist Checkup Area Task", | |||
"name_case": "", | |||
"owner": "Administrator", | |||
"permissions": [], | |||
"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, | |||
"track_views": 0 | |||
} |
@@ -0,0 +1,10 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
from frappe.model.document import Document | |||
class ChecklistCheckupAreaTask(Document): | |||
pass |
@@ -0,0 +1,8 @@ | |||
// Copyright (c) 2018, Aakvatech and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('Custom Error Log', { | |||
refresh: function(frm) { | |||
} | |||
}); |
@@ -0,0 +1,163 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_events_in_timeline": 0, | |||
"allow_guest_to_view": 0, | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"autoname": "", | |||
"beta": 0, | |||
"creation": "2018-11-24 00:37:39.594937", | |||
"custom": 0, | |||
"description": "Log of Scheduler Errors", | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "System", | |||
"editable_grid": 0, | |||
"engine": "MyISAM", | |||
"fields": [ | |||
{ | |||
"allow_bulk_edit": 0, | |||
"allow_in_quick_entry": 0, | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"default": "0", | |||
"fieldname": "seen", | |||
"fieldtype": "Check", | |||
"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": "Seen", | |||
"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": "method", | |||
"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": "Title", | |||
"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": 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": "error", | |||
"fieldtype": "Code", | |||
"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": "Error", | |||
"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": 0, | |||
"search_index": 0, | |||
"set_only_once": 0, | |||
"translatable": 0, | |||
"unique": 0 | |||
} | |||
], | |||
"has_web_view": 0, | |||
"hide_heading": 0, | |||
"hide_toolbar": 0, | |||
"icon": "fa fa-warning-sign", | |||
"idx": 0, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2018-12-18 21:18:01.379834", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Custom Error Log", | |||
"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": 1, | |||
"role": "System Manager", | |||
"set_user_permissions": 0, | |||
"share": 1, | |||
"submit": 0, | |||
"write": 1 | |||
} | |||
], | |||
"quick_entry": 0, | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"show_name_in_global_search": 0, | |||
"sort_field": "modified", | |||
"sort_order": "ASC", | |||
"track_changes": 1, | |||
"track_seen": 0, | |||
"track_views": 0 | |||
} |
@@ -0,0 +1,10 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
from frappe.model.document import Document | |||
class CustomErrorLog(Document): | |||
pass |
@@ -0,0 +1,23 @@ | |||
/* eslint-disable */ | |||
// rename this file from _test_[name] to test_[name] to activate | |||
// and remove above this line | |||
QUnit.test("test: Custom Error Log", function (assert) { | |||
let done = assert.async(); | |||
// number of asserts | |||
assert.expect(1); | |||
frappe.run_serially([ | |||
// insert a new Custom Error Log | |||
() => frappe.tests.make('Custom Error Log', [ | |||
// values to be set | |||
{key: 'value'} | |||
]), | |||
() => { | |||
assert.equal(cur_frm.doc.key, 'value'); | |||
}, | |||
() => done() | |||
]); | |||
}); |
@@ -0,0 +1,9 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and Contributors | |||
# See license.txt | |||
from __future__ import unicode_literals | |||
import unittest | |||
class TestCustomErrorLog(unittest.TestCase): | |||
pass |
@@ -0,0 +1,34 @@ | |||
// Copyright (c) 2018, Aakvatech and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('Daily Checklist', 'area', function(frm, cdt, cdn) { | |||
var doc = locals[cdt][cdn]; | |||
if (doc.area) { | |||
frappe.call({ | |||
method: "frappe.client.get", | |||
args: { | |||
name: doc.area, | |||
doctype: "Checklist Checkup Area" | |||
}, | |||
callback(r) { | |||
console.log(r); | |||
if (r.message) { | |||
for (var row in r.message.task) { | |||
var child = frm.add_child("daily_checklist_detail"); | |||
frappe.model.set_value(child.doctype, child.name, "checklist_task", r.message.task[row].task_name); | |||
refresh_field("daily_checklist_detail"); | |||
} | |||
} | |||
} | |||
}) | |||
} | |||
}) | |||
cur_frm.fields_dict['daily_checklist_detail'].grid.get_field('job_card').get_query = function(doc, cdt, cdn) { | |||
var child = locals[cdt][cdn] | |||
return { | |||
filters: [ | |||
['Issue', 'docstatus', '=', '0'], | |||
['Issue', 'docstatus', '=', '1'] | |||
] | |||
} | |||
}; |
@@ -0,0 +1,353 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_events_in_timeline": 0, | |||
"allow_guest_to_view": 0, | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"autoname": "naming_series:", | |||
"beta": 0, | |||
"color": "#ff0102", | |||
"creation": "2018-11-19 22:14:25.047735", | |||
"custom": 0, | |||
"default_print_format": "", | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Document", | |||
"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, | |||
"default": "Today", | |||
"fieldname": "checkup_date", | |||
"fieldtype": "Date", | |||
"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": "Checkup Date", | |||
"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, | |||
"fieldname": "shift", | |||
"fieldtype": "Select", | |||
"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": " Shift", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "Day\nNight", | |||
"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, | |||
"fieldname": "area", | |||
"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": "Area", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "Checklist Checkup Area", | |||
"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, | |||
"fieldname": "property", | |||
"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": "Property", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "Property", | |||
"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": "daily_checklist_detail", | |||
"fieldtype": "Table", | |||
"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": "Daily Checklist Detail", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "Daily Checklist Detail", | |||
"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": "amended_from", | |||
"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": "Amended From", | |||
"length": 0, | |||
"no_copy": 1, | |||
"options": "Daily Checklist", | |||
"permlevel": 0, | |||
"print_hide": 1, | |||
"print_hide_if_no_value": 0, | |||
"read_only": 1, | |||
"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": "naming_series", | |||
"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": "naming_series", | |||
"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 | |||
} | |||
], | |||
"has_web_view": 0, | |||
"hide_heading": 0, | |||
"hide_toolbar": 0, | |||
"icon": "octicon octicon-checklist", | |||
"idx": 0, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"is_submittable": 1, | |||
"issingle": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2018-12-24 19:42:26.306039", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Daily Checklist", | |||
"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 | |||
}, | |||
{ | |||
"amend": 0, | |||
"cancel": 0, | |||
"create": 1, | |||
"delete": 0, | |||
"email": 1, | |||
"export": 1, | |||
"if_owner": 0, | |||
"import": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
"report": 1, | |||
"role": "Floor Maintenance Supervisor", | |||
"set_user_permissions": 0, | |||
"share": 1, | |||
"submit": 0, | |||
"write": 1 | |||
}, | |||
{ | |||
"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": "Maintenance Job in-charge", | |||
"set_user_permissions": 0, | |||
"share": 1, | |||
"submit": 1, | |||
"write": 1 | |||
}, | |||
{ | |||
"amend": 0, | |||
"cancel": 0, | |||
"create": 0, | |||
"delete": 1, | |||
"email": 1, | |||
"export": 1, | |||
"if_owner": 0, | |||
"import": 0, | |||
"permlevel": 0, | |||
"print": 1, | |||
"read": 1, | |||
"report": 1, | |||
"role": "Maintenance Manager", | |||
"set_user_permissions": 0, | |||
"share": 1, | |||
"submit": 1, | |||
"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, | |||
"track_views": 0 | |||
} |
@@ -0,0 +1,10 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
from frappe.model.document import Document | |||
class DailyChecklist(Document): | |||
pass |
@@ -0,0 +1,23 @@ | |||
/* eslint-disable */ | |||
// rename this file from _test_[name] to test_[name] to activate | |||
// and remove above this line | |||
QUnit.test("test: Daily Checklist", function (assert) { | |||
let done = assert.async(); | |||
// number of asserts | |||
assert.expect(1); | |||
frappe.run_serially([ | |||
// insert a new Daily Checklist | |||
() => frappe.tests.make('Daily Checklist', [ | |||
// values to be set | |||
{key: 'value'} | |||
]), | |||
() => { | |||
assert.equal(cur_frm.doc.key, 'value'); | |||
}, | |||
() => done() | |||
]); | |||
}); |
@@ -0,0 +1,9 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and Contributors | |||
# See license.txt | |||
from __future__ import unicode_literals | |||
import unittest | |||
class TestDailyChecklist(unittest.TestCase): | |||
pass |
@@ -0,0 +1,174 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_events_in_timeline": 0, | |||
"allow_guest_to_view": 0, | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"beta": 0, | |||
"creation": "2018-11-19 22:11:27.560230", | |||
"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": "checklist_task", | |||
"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": "Checklist Task", | |||
"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": "NOT CHECKED", | |||
"fieldname": "remarks", | |||
"fieldtype": "Text", | |||
"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": "Remarks", | |||
"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, | |||
"fieldname": "issue_photo", | |||
"fieldtype": "Attach Image", | |||
"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": "Issue photo", | |||
"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": "job_card", | |||
"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": "Job Card", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "Issue", | |||
"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": 0, | |||
"istable": 1, | |||
"max_attachments": 0, | |||
"modified": "2018-11-28 14:40:04.352416", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Daily Checklist Detail", | |||
"name_case": "", | |||
"owner": "Administrator", | |||
"permissions": [], | |||
"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, | |||
"track_views": 0 | |||
} |
@@ -0,0 +1,10 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
from frappe.model.document import Document | |||
class DailyChecklistDetail(Document): | |||
pass |
@@ -0,0 +1,204 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_events_in_timeline": 0, | |||
"allow_guest_to_view": 0, | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"autoname": "field:door_type", | |||
"beta": 0, | |||
"creation": "2018-04-19 23:28:31.948059", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Setup", | |||
"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": "door_type", | |||
"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": "Door Type", | |||
"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": 1 | |||
}, | |||
{ | |||
"allow_bulk_edit": 0, | |||
"allow_in_quick_entry": 0, | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "lock_type", | |||
"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": "Lock Type", | |||
"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": "screen_door_attached", | |||
"fieldtype": "Check", | |||
"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": "Screen Door attached", | |||
"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": "inside_color", | |||
"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": "Inside Color", | |||
"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": "exterior_color", | |||
"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": "Exterior Color", | |||
"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 | |||
} | |||
], | |||
"has_web_view": 0, | |||
"hide_heading": 0, | |||
"hide_toolbar": 0, | |||
"idx": 0, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 1, | |||
"max_attachments": 0, | |||
"modified": "2018-11-20 00:09:25.077337", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Door", | |||
"name_case": "", | |||
"owner": "mkhakheria@aakvatech.com", | |||
"permissions": [], | |||
"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, | |||
"track_views": 0 | |||
} |
@@ -0,0 +1,10 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
from frappe.model.document import Document | |||
class Door(Document): | |||
pass |
@@ -0,0 +1,8 @@ | |||
// Copyright (c) 2018, Aakvatech and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('Exit', { | |||
refresh: function(frm) { | |||
} | |||
}); |
@@ -0,0 +1,214 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_events_in_timeline": 0, | |||
"allow_guest_to_view": 0, | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"autoname": "EXT.#####", | |||
"beta": 0, | |||
"creation": "2018-04-19 23:39:45.150319", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Document", | |||
"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": "lease", | |||
"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": "Lease", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "Lease", | |||
"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": "exit_type", | |||
"fieldtype": "Select", | |||
"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": "Exit Type", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "Expiry\nPre-mature\nTermination", | |||
"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, | |||
"depends_on": "eval: in_list([\"Pre-mature\", \"Termination\"], doc.exit_type)\n\n", | |||
"fieldname": "premature_expiry_date", | |||
"fieldtype": "Date", | |||
"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": "Premature expiry date", | |||
"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": "exit_details", | |||
"fieldtype": "Text", | |||
"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": "Exit Details", | |||
"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 | |||
} | |||
], | |||
"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-12-24 19:27:44.846927", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Exit", | |||
"name_case": "", | |||
"owner": "mkhakheria@aakvatech.com", | |||
"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 | |||
}, | |||
{ | |||
"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": "Property 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, | |||
"track_views": 0 | |||
} |
@@ -0,0 +1,10 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
from frappe.model.document import Document | |||
class Exit(Document): | |||
pass |
@@ -0,0 +1,23 @@ | |||
/* eslint-disable */ | |||
// rename this file from _test_[name] to test_[name] to activate | |||
// and remove above this line | |||
QUnit.test("test: Exit", function (assert) { | |||
let done = assert.async(); | |||
// number of asserts | |||
assert.expect(1); | |||
frappe.run_serially([ | |||
// insert a new Exit | |||
() => frappe.tests.make('Exit', [ | |||
// values to be set | |||
{key: 'value'} | |||
]), | |||
() => { | |||
assert.equal(cur_frm.doc.key, 'value'); | |||
}, | |||
() => done() | |||
]); | |||
}); |
@@ -0,0 +1,9 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and Contributors | |||
# See license.txt | |||
from __future__ import unicode_literals | |||
import unittest | |||
class TestExit(unittest.TestCase): | |||
pass |
@@ -0,0 +1,109 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_events_in_timeline": 0, | |||
"allow_guest_to_view": 0, | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"autoname": "field:flooring_type", | |||
"beta": 0, | |||
"creation": "2018-04-19 23:26:54.584190", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Setup", | |||
"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": "flooring_type", | |||
"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": "Flooring Type", | |||
"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": 1 | |||
}, | |||
{ | |||
"allow_bulk_edit": 0, | |||
"allow_in_quick_entry": 0, | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "description", | |||
"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": "Description", | |||
"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 | |||
} | |||
], | |||
"has_web_view": 0, | |||
"hide_heading": 0, | |||
"hide_toolbar": 0, | |||
"idx": 0, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 1, | |||
"max_attachments": 0, | |||
"modified": "2018-11-20 00:10:23.006585", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Flooring", | |||
"name_case": "", | |||
"owner": "mkhakheria@aakvatech.com", | |||
"permissions": [], | |||
"quick_entry": 1, | |||
"read_only": 0, | |||
"read_only_onload": 0, | |||
"show_name_in_global_search": 0, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"title_field": "", | |||
"track_changes": 1, | |||
"track_seen": 0, | |||
"track_views": 0 | |||
} |
@@ -0,0 +1,10 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
from frappe.model.document import Document | |||
class Flooring(Document): | |||
pass |
@@ -0,0 +1,8 @@ | |||
// Copyright (c) 2018, Aakvatech and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('Guard Shift', { | |||
refresh: function(frm) { | |||
} | |||
}); |
@@ -0,0 +1,129 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_events_in_timeline": 0, | |||
"allow_guest_to_view": 0, | |||
"allow_import": 0, | |||
"allow_rename": 1, | |||
"autoname": "field:shift_name", | |||
"beta": 0, | |||
"creation": "2018-12-07 15:07:49.367515", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Setup", | |||
"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": "shift_name", | |||
"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": "Shift Name", | |||
"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": 1 | |||
}, | |||
{ | |||
"allow_bulk_edit": 0, | |||
"allow_in_quick_entry": 0, | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "shift_location", | |||
"fieldtype": "Table", | |||
"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": "Shift Location", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "Guard Shift Location", | |||
"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": 0, | |||
"istable": 0, | |||
"max_attachments": 0, | |||
"modified": "2018-12-07 15:15:58.796377", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Guard Shift", | |||
"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": 0, | |||
"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, | |||
"track_views": 0 | |||
} |
@@ -0,0 +1,10 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
from frappe.model.document import Document | |||
class GuardShift(Document): | |||
pass |
@@ -0,0 +1,23 @@ | |||
/* eslint-disable */ | |||
// rename this file from _test_[name] to test_[name] to activate | |||
// and remove above this line | |||
QUnit.test("test: Guard Shift", function (assert) { | |||
let done = assert.async(); | |||
// number of asserts | |||
assert.expect(1); | |||
frappe.run_serially([ | |||
// insert a new Guard Shift | |||
() => frappe.tests.make('Guard Shift', [ | |||
// values to be set | |||
{key: 'value'} | |||
]), | |||
() => { | |||
assert.equal(cur_frm.doc.key, 'value'); | |||
}, | |||
() => done() | |||
]); | |||
}); |
@@ -0,0 +1,9 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and Contributors | |||
# See license.txt | |||
from __future__ import unicode_literals | |||
import unittest | |||
class TestGuardShift(unittest.TestCase): | |||
pass |
@@ -0,0 +1,75 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_events_in_timeline": 0, | |||
"allow_guest_to_view": 0, | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"beta": 0, | |||
"creation": "2018-12-07 15:04:24.204609", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Setup", | |||
"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": "location_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": "Location Name", | |||
"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 | |||
} | |||
], | |||
"has_web_view": 0, | |||
"hide_heading": 0, | |||
"hide_toolbar": 0, | |||
"idx": 0, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 1, | |||
"max_attachments": 0, | |||
"modified": "2018-12-07 15:09:14.885125", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Guard Shift Location", | |||
"name_case": "", | |||
"owner": "Administrator", | |||
"permissions": [], | |||
"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, | |||
"track_views": 0 | |||
} |
@@ -0,0 +1,10 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
from frappe.model.document import Document | |||
class GuardShiftLocation(Document): | |||
pass |
@@ -0,0 +1,8 @@ | |||
// Copyright (c) 2018, Aakvatech and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('Insurance', { | |||
refresh: function(frm) { | |||
} | |||
}); |
@@ -0,0 +1,340 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_events_in_timeline": 0, | |||
"allow_guest_to_view": 0, | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"autoname": "INSUR.#####", | |||
"beta": 0, | |||
"creation": "2018-04-19 23:30:49.117465", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Document", | |||
"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": "insurance_provider", | |||
"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": "Insurance Provider", | |||
"length": 0, | |||
"no_copy": 0, | |||
"options": "Supplier", | |||
"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": "insurance_type", | |||
"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": "Insurance Type", | |||
"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": "policy_number", | |||
"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": "Policy Number", | |||
"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": "premium_price", | |||
"fieldtype": "Currency", | |||
"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": "Premium Price", | |||
"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": "effective_date", | |||
"fieldtype": "Date", | |||
"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": "Effective Date", | |||
"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": "expiration_date", | |||
"fieldtype": "Date", | |||
"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": "Expiration Date", | |||
"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": "description", | |||
"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": "Description", | |||
"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": "cover_document", | |||
"fieldtype": "Attach", | |||
"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": "Cover Document", | |||
"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 | |||
} | |||
], | |||
"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-11-20 00:08:18.607882", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Insurance", | |||
"name_case": "", | |||
"owner": "mkhakheria@aakvatech.com", | |||
"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 | |||
}, | |||
{ | |||
"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": "Property 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, | |||
"track_views": 0 | |||
} |
@@ -0,0 +1,10 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
from frappe.model.document import Document | |||
class Insurance(Document): | |||
pass |
@@ -0,0 +1,23 @@ | |||
/* eslint-disable */ | |||
// rename this file from _test_[name] to test_[name] to activate | |||
// and remove above this line | |||
QUnit.test("test: Insurance", function (assert) { | |||
let done = assert.async(); | |||
// number of asserts | |||
assert.expect(1); | |||
frappe.run_serially([ | |||
// insert a new Insurance | |||
() => frappe.tests.make('Insurance', [ | |||
// values to be set | |||
{key: 'value'} | |||
]), | |||
() => { | |||
assert.equal(cur_frm.doc.key, 'value'); | |||
}, | |||
() => done() | |||
]); | |||
}); |
@@ -0,0 +1,9 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and Contributors | |||
# See license.txt | |||
from __future__ import unicode_literals | |||
import unittest | |||
class TestInsurance(unittest.TestCase): | |||
pass |
@@ -0,0 +1,104 @@ | |||
{ | |||
"creation": "2020-04-16 17:07:23.961402", | |||
"doctype": "DocType", | |||
"editable_grid": 1, | |||
"engine": "InnoDB", | |||
"field_order": [ | |||
"item", | |||
"quantity", | |||
"uom", | |||
"rate", | |||
"amount", | |||
"is_pos", | |||
"material_status", | |||
"invoiced", | |||
"sales_invoice" | |||
], | |||
"fields": [ | |||
{ | |||
"columns": 2, | |||
"fieldname": "item", | |||
"fieldtype": "Link", | |||
"in_list_view": 1, | |||
"in_standard_filter": 1, | |||
"label": "Item", | |||
"options": "Item" | |||
}, | |||
{ | |||
"columns": 1, | |||
"default": "1", | |||
"fieldname": "quantity", | |||
"fieldtype": "Float", | |||
"in_list_view": 1, | |||
"label": "Quantity" | |||
}, | |||
{ | |||
"columns": 1, | |||
"fetch_from": "item.stock_uom", | |||
"fieldname": "uom", | |||
"fieldtype": "Link", | |||
"in_list_view": 1, | |||
"label": "UOM", | |||
"options": "UOM" | |||
}, | |||
{ | |||
"columns": 1, | |||
"fetch_from": "item.standard_rate", | |||
"fetch_if_empty": 1, | |||
"fieldname": "rate", | |||
"fieldtype": "Currency", | |||
"in_list_view": 1, | |||
"label": "Rate" | |||
}, | |||
{ | |||
"columns": 2, | |||
"fieldname": "amount", | |||
"fieldtype": "Currency", | |||
"in_list_view": 1, | |||
"label": "Amount", | |||
"read_only": 1 | |||
}, | |||
{ | |||
"columns": 1, | |||
"default": "0", | |||
"fieldname": "is_pos", | |||
"fieldtype": "Check", | |||
"in_list_view": 1, | |||
"label": "Is POS" | |||
}, | |||
{ | |||
"columns": 1, | |||
"fieldname": "material_status", | |||
"fieldtype": "Select", | |||
"label": "Status", | |||
"options": "\nBill\nSelf Consumption" | |||
}, | |||
{ | |||
"columns": 1, | |||
"default": "0", | |||
"fieldname": "invoiced", | |||
"fieldtype": "Check", | |||
"label": "Invoiced", | |||
"read_only": 1 | |||
}, | |||
{ | |||
"fieldname": "sales_invoice", | |||
"fieldtype": "Link", | |||
"in_list_view": 1, | |||
"label": "Sales Invoice", | |||
"options": "Sales Invoice", | |||
"read_only": 1 | |||
} | |||
], | |||
"istable": 1, | |||
"modified": "2020-04-18 16:19:40.733080", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Issue Materials Billed", | |||
"owner": "Administrator", | |||
"permissions": [], | |||
"quick_entry": 1, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1 | |||
} |
@@ -0,0 +1,12 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2020, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
# import frappe | |||
from frappe.model.document import Document | |||
class IssueMaterialsBilled(Document): | |||
pass |
@@ -0,0 +1,97 @@ | |||
{ | |||
"actions": [], | |||
"creation": "2018-11-22 07:16:14.803984", | |||
"doctype": "DocType", | |||
"editable_grid": 1, | |||
"engine": "InnoDB", | |||
"field_order": [ | |||
"item", | |||
"quantity", | |||
"uom", | |||
"rate", | |||
"amount", | |||
"is_pos", | |||
"material_status", | |||
"material_request" | |||
], | |||
"fields": [ | |||
{ | |||
"columns": 1, | |||
"fieldname": "material_status", | |||
"fieldtype": "Select", | |||
"in_list_view": 1, | |||
"label": "Status", | |||
"options": "Requested\nReceived and WIP\nWork Done\nBill\nSelf Consumption" | |||
}, | |||
{ | |||
"columns": 2, | |||
"fieldname": "item", | |||
"fieldtype": "Link", | |||
"in_list_view": 1, | |||
"in_standard_filter": 1, | |||
"label": "Item", | |||
"options": "Item" | |||
}, | |||
{ | |||
"columns": 1, | |||
"default": "1", | |||
"fieldname": "quantity", | |||
"fieldtype": "Float", | |||
"in_list_view": 1, | |||
"label": "Quantity" | |||
}, | |||
{ | |||
"columns": 1, | |||
"fetch_from": "item.standard_rate", | |||
"fetch_if_empty": 1, | |||
"fieldname": "rate", | |||
"fieldtype": "Currency", | |||
"in_list_view": 1, | |||
"label": "Rate" | |||
}, | |||
{ | |||
"columns": 2, | |||
"fieldname": "amount", | |||
"fieldtype": "Currency", | |||
"in_list_view": 1, | |||
"label": "Amount", | |||
"read_only": 1 | |||
}, | |||
{ | |||
"columns": 1, | |||
"fetch_from": "item.stock_uom", | |||
"fieldname": "uom", | |||
"fieldtype": "Link", | |||
"in_list_view": 1, | |||
"label": "UOM", | |||
"options": "UOM" | |||
}, | |||
{ | |||
"columns": 1, | |||
"default": "0", | |||
"depends_on": "eval: doc.material_status != \"Self Consumption\"", | |||
"fieldname": "is_pos", | |||
"fieldtype": "Check", | |||
"in_list_view": 1, | |||
"label": "Is POS" | |||
}, | |||
{ | |||
"fieldname": "material_request", | |||
"fieldtype": "Data", | |||
"label": "Material Request" | |||
} | |||
], | |||
"index_web_pages_for_search": 1, | |||
"istable": 1, | |||
"links": [], | |||
"modified": "2021-07-03 23:43:04.350234", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Issue Materials Detail", | |||
"owner": "Administrator", | |||
"permissions": [], | |||
"quick_entry": 1, | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1 | |||
} |
@@ -0,0 +1,10 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
from frappe.model.document import Document | |||
class IssueMaterialsDetail(Document): | |||
pass |
@@ -0,0 +1,108 @@ | |||
{ | |||
"allow_copy": 0, | |||
"allow_events_in_timeline": 0, | |||
"allow_guest_to_view": 0, | |||
"allow_import": 0, | |||
"allow_rename": 0, | |||
"autoname": "field:key_number", | |||
"beta": 0, | |||
"creation": "2018-04-19 23:34:00.841956", | |||
"custom": 0, | |||
"docstatus": 0, | |||
"doctype": "DocType", | |||
"document_type": "Document", | |||
"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": "key_number", | |||
"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": "Key Number", | |||
"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": 1 | |||
}, | |||
{ | |||
"allow_bulk_edit": 0, | |||
"allow_in_quick_entry": 0, | |||
"allow_on_submit": 0, | |||
"bold": 0, | |||
"collapsible": 0, | |||
"columns": 0, | |||
"fieldname": "status_active", | |||
"fieldtype": "Check", | |||
"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": "Status Active", | |||
"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 | |||
} | |||
], | |||
"has_web_view": 0, | |||
"hide_heading": 0, | |||
"hide_toolbar": 0, | |||
"idx": 0, | |||
"image_view": 0, | |||
"in_create": 0, | |||
"is_submittable": 0, | |||
"issingle": 0, | |||
"istable": 1, | |||
"max_attachments": 0, | |||
"modified": "2018-11-22 21:09:10.710448", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Key", | |||
"name_case": "", | |||
"owner": "mkhakheria@aakvatech.com", | |||
"permissions": [], | |||
"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, | |||
"track_views": 0 | |||
} |
@@ -0,0 +1,10 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
from frappe.model.document import Document | |||
class Key(Document): | |||
pass |
@@ -0,0 +1,8 @@ | |||
// Copyright (c) 2018, Aakvatech and contributors | |||
// For license information, please see license.txt | |||
frappe.ui.form.on('Key Set', { | |||
refresh: function(frm) { | |||
} | |||
}); |
@@ -0,0 +1,93 @@ | |||
{ | |||
"actions": [], | |||
"allow_import": 1, | |||
"allow_rename": 1, | |||
"autoname": "format:{shelf_no}-{location_no}", | |||
"creation": "2018-12-19 13:07:27.577369", | |||
"doctype": "DocType", | |||
"document_type": "Setup", | |||
"editable_grid": 1, | |||
"engine": "InnoDB", | |||
"field_order": [ | |||
"set_name", | |||
"no_of_keys", | |||
"shelf_no", | |||
"location_no", | |||
"status", | |||
"duplicate_of", | |||
"disabled" | |||
], | |||
"fields": [ | |||
{ | |||
"fieldname": "set_name", | |||
"fieldtype": "Data", | |||
"in_filter": 1, | |||
"in_list_view": 1, | |||
"in_standard_filter": 1, | |||
"label": "Set Name", | |||
"search_index": 1 | |||
}, | |||
{ | |||
"fieldname": "no_of_keys", | |||
"fieldtype": "Int", | |||
"in_list_view": 1, | |||
"label": "No. of Keys" | |||
}, | |||
{ | |||
"fieldname": "shelf_no", | |||
"fieldtype": "Select", | |||
"in_list_view": 1, | |||
"label": "Shelf No.", | |||
"options": "\nS1\nS2\nS3" | |||
}, | |||
{ | |||
"fieldname": "location_no", | |||
"fieldtype": "Data", | |||
"in_list_view": 1, | |||
"label": "Location No." | |||
}, | |||
{ | |||
"fieldname": "status", | |||
"fieldtype": "Select", | |||
"label": "Status", | |||
"options": "In\nOut\nLost" | |||
}, | |||
{ | |||
"fieldname": "duplicate_of", | |||
"fieldtype": "Link", | |||
"label": "Duplicate of", | |||
"options": "Key Set" | |||
}, | |||
{ | |||
"default": "0", | |||
"fieldname": "disabled", | |||
"fieldtype": "Check", | |||
"label": "Disabled" | |||
} | |||
], | |||
"index_web_pages_for_search": 1, | |||
"links": [], | |||
"modified": "2021-10-26 15:30:23.859967", | |||
"modified_by": "Administrator", | |||
"module": "Property Management Solution", | |||
"name": "Key Set", | |||
"owner": "Administrator", | |||
"permissions": [ | |||
{ | |||
"create": 1, | |||
"delete": 1, | |||
"email": 1, | |||
"export": 1, | |||
"print": 1, | |||
"read": 1, | |||
"report": 1, | |||
"role": "System Manager", | |||
"share": 1, | |||
"write": 1 | |||
} | |||
], | |||
"search_fields": "set_name", | |||
"sort_field": "modified", | |||
"sort_order": "DESC", | |||
"track_changes": 1 | |||
} |
@@ -0,0 +1,10 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and contributors | |||
# For license information, please see license.txt | |||
from __future__ import unicode_literals | |||
from frappe.model.document import Document | |||
class KeySet(Document): | |||
pass |
@@ -0,0 +1,23 @@ | |||
/* eslint-disable */ | |||
// rename this file from _test_[name] to test_[name] to activate | |||
// and remove above this line | |||
QUnit.test("test: Key Set", function (assert) { | |||
let done = assert.async(); | |||
// number of asserts | |||
assert.expect(1); | |||
frappe.run_serially([ | |||
// insert a new Key Set | |||
() => frappe.tests.make('Key Set', [ | |||
// values to be set | |||
{key: 'value'} | |||
]), | |||
() => { | |||
assert.equal(cur_frm.doc.key, 'value'); | |||
}, | |||
() => done() | |||
]); | |||
}); |
@@ -0,0 +1,9 @@ | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2018, Aakvatech and Contributors | |||
# See license.txt | |||
from __future__ import unicode_literals | |||
import unittest | |||
class TestKeySet(unittest.TestCase): | |||
pass |