Merge branch 'master' into navupdate
diff --git a/build.json b/build.json
index 4d7fc0d..635e73d 100644
--- a/build.json
+++ b/build.json
@@ -9,6 +9,7 @@
"lib/js/wn/require.js",
"lib/js/wn/dom.js",
"lib/js/wn/page.js",
+ "lib/js/wn/misc/user.js",
"lib/js/lib/json2.js",
"lib/js/core.js"
]
@@ -36,11 +37,13 @@
{
"css/all-web.css": [
"lib/css/legacy/body.css",
- "lib/css/legacy/menus.css",
"lib/css/legacy/messages.css",
"lib/css/legacy/dialog.css",
- "lib/css/legacy/bootstrap-buttons.css",
- "lib/css/bootstrap/bootstrap-topbar.css",
+ "lib/css/bootstrap/headings.css",
+ "lib/css/bootstrap/buttons.css",
+ "lib/css/bootstrap/navbar.css",
+ "lib/css/bootstrap/dropdown.css",
+ "lib/css/bootstrap/tooltip.css",
"erpnext/startup/startup.css",
"erpnext/website/css/website.css"
]
@@ -49,20 +52,22 @@
{
"css/all-app.css": [
"lib/css/legacy/body.css",
- "lib/css/legacy/menus.css",
"lib/css/legacy/messages.css",
"lib/css/legacy/forms.css",
"lib/css/legacy/grid.css",
"lib/css/legacy/listing.css",
"lib/css/legacy/report.css",
- "lib/css/legacy/calendar.css",
"lib/css/legacy/autosuggest.css",
"lib/css/legacy/dialog.css",
"lib/css/legacy/tabs.css",
- "lib/css/legacy/bw-icons.css",
"lib/css/legacy/sidebar.css",
- "lib/css/legacy/bootstrap-buttons.css",
- "lib/css/bootstrap/bootstrap-topbar.css",
+ "lib/css/bootstrap/headings.css",
+ "lib/css/bootstrap/buttons.css",
+ "lib/css/bootstrap/navbar.css",
+ "lib/css/bootstrap/dropdown.css",
+ "lib/css/bootstrap/tooltip.css",
+ "lib/css/bootstrap/label.css",
+ "lib/css/bootstrap/icons.css",
"erpnext/startup/startup.css"
]
},
@@ -71,6 +76,8 @@
"js/all-web.js": [
"lib/js/lib/jquery.min.js:concat",
"lib/js/lib/history/history.min.js:concat",
+ "lib/js/lib/bootstrap.min.js:concat",
+ "lib/js/lib/sprintf.js",
"lib/js/core.min.js:concat",
"lib/js/legacy/globals.js",
"lib/js/legacy/utils/datatype.js",
@@ -102,7 +109,6 @@
"lib/js/legacy/webpage/body.js",
"lib/js/legacy/app.js",
"js/app.js",
- "lib/js/bootstrap/bootstrap-dropdown.js:concat",
"erpnext/startup/startup.js",
"erpnext/website/js/topbar.js"
]
@@ -114,6 +120,8 @@
"lib/js/lib/history/history.min.js:concat",
"lib/js/legacy/jquery/jquery-ui.min.js:concat",
"lib/js/legacy/tiny_mce_33/jquery.tinymce.js:concat",
+ "lib/js/lib/bootstrap.min.js:concat",
+ "lib/js/lib/sprintf.js",
"lib/js/core.min.js:concat",
"lib/js/legacy/globals.js",
"lib/js/legacy/utils/datatype.js",
@@ -148,7 +156,6 @@
"lib/js/legacy/wn/widgets/footer.js",
"lib/js/legacy/model/local_data.js",
"lib/js/legacy/model/doclist.js",
- "lib/js/bootstrap/bootstrap-dropdown.js:concat",
"lib/js/wn/ui/toolbar.min.js:concat",
"lib/js/legacy/webpage/body.js",
"lib/js/legacy/widgets/form/fields.js",
@@ -169,9 +176,9 @@
"lib/js/legacy/app.js",
"js/app.js",
"erpnext/startup/startup.js",
- "erpnext/startup/modules.js",
- "erpnext/startup/toolbar.js",
- "erpnext/startup/feature_setup.js"
+ "erpnext/startup/js/modules.js",
+ "erpnext/startup/js/toolbar.js",
+ "erpnext/startup/js/feature_setup.js"
]
}
diff --git a/css/all-app.css b/css/all-app.css
index 5ee09bf..f3a07ec 100644
--- a/css/all-app.css
+++ b/css/all-app.css
@@ -12,68 +12,7 @@
font-family: Arial, Helvetica, Sans;
font-size: 12px;
color: #000;
-}
-
-/* heading from bootstrap */
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- margin: 0;
- font-weight: bold;
- color: #333333;
- text-rendering: optimizelegibility;
- margin-bottom: 0.3em;
-}
-h1 small,
-h2 small,
-h3 small,
-h4 small,
-h5 small,
-h6 small {
- font-weight: normal;
- color: #999999;
-}
-h1 {
- font-size: 30px;
- line-height: 36px;
-}
-h1 small {
- font-size: 18px;
-}
-h2 {
- font-size: 24px;
- line-height: 36px;
-}
-h2 small {
- font-size: 18px;
-}
-h3 {
- line-height: 27px;
- font-size: 18px;
-}
-h3 small {
- font-size: 14px;
-}
-h4, h5, h6 {
- line-height: 18px;
-}
-h4 {
- font-size: 14px;
-}
-h4 small {
- font-size: 12px;
-}
-h5 {
- font-size: 12px;
-}
-h6 {
- font-size: 11px;
- color: #999999;
- text-transform: uppercase;
+ background-color: #e2e2e2;
}
pre { margin: 0px; padding: 0px; }
@@ -126,8 +65,30 @@
border-bottom: 1px solid #ffffff;
}
+/* links */
+
a:active { outline:none; }
+a {
+ color: #0088cc;
+ text-decoration: none;
+}
+a:hover {
+ color: #005580;
+ text-decoration: underline;
+}
+
+.link_type {
+ padding:2px;
+ color: #0088cc;
+ cursor: pointer;
+}
+
+.link_type:hover {
+ color: #005580;
+ text-decoration: underline;
+}
+
:focus { -moz-outline-style:none; }
table.simpletable { border-collapse: collapse; margin-bottom: 10px;}
@@ -142,8 +103,19 @@
div#body_div {
position: relative;
display: none;
- margin-top: 56px;
padding-right: 7px;
+ width: 900px;
+ margin: auto;
+ margin-top: 56px;
+}
+
+footer {
+ width: 900px;
+ margin: auto;
+}
+header .container {
+ width: 900px;
+ margin: auto;
}
div.no_script {
@@ -163,24 +135,6 @@
border: 1px solid #FF4;
}
-
-div#head_div { background-color: #FFF; }
-
-#head_banner { background-color: #FFF; }
-
-.link_type {
- padding:2px;
- color: #00b;
- text-decoration: underline;
- cursor: pointer;
-}
-
-.link_type:hover {
- color: #fff !important;
- background-color: #07b;
- text-decoration: none;
-}
-
div.std-footer {
margin: 13px 0px;
border-top: 1px solid #AAA;
@@ -213,24 +167,37 @@
background: linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* W3C */
}
-.header-gradient {
- background: #84827c; /* Old browsers */
- background: -moz-linear-gradient(top, #84827c 0%, #27211c 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#84827c), color-stop(100%,#27211c)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #84827c 0%,#27211c 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #84827c 0%,#27211c 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #84827c 0%,#27211c 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#84827c', endColorstr='#27211c',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #84827c 0%,#27211c 100%); /* W3C */
- color: #FFF;
+.layout_wrapper, .layout-wrapper {
+ -moz-box-shadow: 1px 1px 8px #555;
+ -webkit-box-shadow: 1px 1px 8px #555;
+ box-shadow: 1px 1px 8px #555;
+ background-color: #fff;
+ padding: 15px;
}
-.layout_wrapper {
+.layout-wrapper-background {
+ background-color: #f2f2f2 !important;
+ padding: 0px;
+}
+
+.layout-main-section {
+ width: 71%;
+ float: left;
padding: 15px;
- -moz-box-shadow: 1px 1px 6px #AAA;
- -webkit-box-shadow: 1px 1px 6px #AAA;
- box-shadow: 1px 1px 6px #AAA;
background-color: #FFF;
+ min-height: 450px;
+ -moz-box-shadow: 7px 0px 6px -2px #ddd;
+ -webkit-box-shadow: 7px 0px 6px -2px #ddd;
+ box-shadow: 7px 0px 6px -2px #ddd;
+}
+
+.layout-side-section {
+ width: 22%;
+ /*float: right;*/
+ color: #606060;
+ overflow-x: hidden;
+ padding: 15px;
+ min-height: 450px;
}
/* from bootstrap */
@@ -248,59 +215,31 @@
clear: both;
}
-/*
- * lib/css/legacy/menus.css
- */
-/******** Menus - menu.js ************/
-
-ul.menu_toolbar {
- z-index: 30;
- padding: 0px;
- margin: 0px;
- margin-top: 1px;
+.well {
+ min-height: 20px;
+ padding: 19px;
+ margin-bottom: 20px;
+ background-color: #f5f5f5;
+ border: 1px solid #eee;
+ border: 1px solid rgba(0, 0, 0, 0.05);
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}
-ul.menu_toolbar li {
- list-style: none;
- margin: 0px;
- float: left;
+.avatar-small {
+ display: inline-block;
+ min-width: 29px;
+}
+.avatar-small img {
+ height: 24px;
+ margin-bottom: -7px;
+ max-width: 24px;
}
-.top_menu {
- margin: 0px;
- padding: 4px;
- cursor: pointer;
- color: #FFF;
- margin-right: 8px;
-}
-
-.top_menu_mo {
- background-color: #000;
-
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-
-div.menu_toolbar_dropdown {
- position: absolute;
- margin-top: 4px;
- margin-left: 8px;
- width: 140px;
- background-color: #FFF;
- color: #000;
- display: none;
- border: 2px solid #333;
- z-index: 31;
- overflow-y: auto;
- overflow-x: hidden;
-}
-
-div.dd_item {
- cursor: pointer;
- padding: 4px;
- background-color: #FFF;
-}
-div.dd_item_mo { background-color: #FE8; }
/*
* lib/css/legacy/messages.css
*/
@@ -940,180 +879,6 @@
padding: 2px;
}
/*
- * lib/css/legacy/calendar.css
- *//**** CALENDAR ****/
-
-.caldiv {
- position:absolute;
- visibility:hidden;
- background-color:white;
- width: 144px;
- z-index: 301; /* always on top(?) */
-}
-
-
-
-div.cal_wrapper { }
-div.cal_body {
- margin: 16px;
- background-color: #DDD;
- position: relative;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-
-div.cal_head {
- margin: 16px;
- margin-bottom: 0px;
-}
-div.cal_head div {
- font-size: 18px;
- color: #666;
- padding-top: 8px;
-}
-
-div.cal_view_body {
- margin: 16px;
-}
-
-div.cal_view_body_plain {
- margin: 16px;
-}
-
-div.cal_month_head {
-}
-
-div.cal_month_body {
- border-top: 1px solid #888;
-}
-
-.cal_month_headtable {
- /*table-layout:fixed;*/
- width: 100%;
-}
-
-.cal_month_name {
- width: 100%;
- color: #888;
- font-size: 14px;
- font-weight: bold;
- text-align: center;
- padding: 4px;
-}
-
-.cal_month_headtable tr td{
- font-size: 12px;
- font-weight: bold;
- text-align: center;
- padding: 4px;
-}
-
-table.cal_month_table {
- border-collapse: collapse;
- /*table-layout:fixed;*/
- height: 100%;
- width: 100%;
-}
-
-table.cal_month_table td {
- width: 14.29%;
- height: 20%;
- /*overflow:hidden;*/
- padding:0px;
-}
-
-div.cal_month_date {
- width:100%;
- height:25%;
- font-size: 10px;
- overflow:hidden;
- /*background-color: #EEF;*/
-}
-
-div.cal_month_date_holiday {
- /*background-color: #FFF;*/
-}
-
-div.cal_month_unit {
- width:100%;
- height:75%;
- overflow:hidden;
- cursor:pointer;
- /*background-color:#FFF;*/
-}
-
-div.cal_vu_disabled {
- background-color:#FFF;
- cursor:default;
-}
-
-table.cal_day_table {
- border-collapse: collapse;
- width: 100%;
-}
-
-table.cal_day_table td {
-}
-
-div.cal_day_body {
- width: 100%;
- height: 80%;
- overflow-y: auto;
- overflow-x: hidden;
- border-top: 1px solid #AAA;
-}
-
-div.cal_day_unit{
- width:100%;
- cursor:pointer;
-}
-
-table.cal_week_table {
- border-collapse: collapse;
- width: 100%;
-}
-
-table.cal_week_table td {
- width: 12.5%;
-}
-
-div.cal_week_body {
- width: 100%;
- height: 80%;
- overflow-y: auto;
- overflow-x: hidden;
- border-top: 1px solid #888;
-}
-
-div.cal_week_unit{
- width: 100%;
- cursor:pointer;
-}
-
-div.cal_event {
- width: 100%;
- height: 12px;
- overflow: hidden;
- font-size: 11px;
- color: #00B;
- margin-bottom: 2px;
- text-decoration: underline;
-}
-
-div.cal_event_Public {
- color: GREEN;
-}
-
-div.cal_event_Private {
- color: BLUE;
-}
-
-div.cal_event_hover {
- text-decoration: underline;
-}
-
-/*
* lib/css/legacy/autosuggest.css
*//*
================================================
@@ -1235,7 +1000,7 @@
}
div.dialog_body {
- padding: 8px 4px 16px 4px;
+ padding: 8px 8px 16px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
@@ -1320,17 +1085,16 @@
cursor: pointer;
}
-ul.box_tabs a {
+ul.box_tabs li a {
display:block;
padding:3px 15px 3px 6px;
- text-decoration:none;
+ text-decoration: none;
}
ul.box_tabs li.box_tab_mouseover {
background-color: #BBB;
}
-
ul.box_tabs li.box_tab_selected {
background-color: #777;
@@ -1342,402 +1106,142 @@
}
ul.box_tabs li.box_tab_selected a {
-
+ color: #fff;
}
-
-/*
- * lib/css/legacy/bw-icons.css
- */
-/** general icons **/
-
-.wn-icon { background: url('../lib/images/icons/icons.png'); width: 16px; height: 16px; cursor: pointer; }
-.ic-2x2_grid { background-position: 0 0; }
-.ic-3x3_grid { background-position: 0 -36px; }
-.ic-3x3_grid_2 { background-position: 0 -72px; }
-.ic-air_signal { background-position: 0 -108px; }
-.ic-align_center { background-position: 0 -144px; }
-.ic-align_just { background-position: 0 -180px; }
-.ic-align_left { background-position: 0 -216px; }
-.ic-align_right { background-position: 0 -252px; }
-.ic-app_window { background-position: 0 -288px; }
-.ic-arrow_bottom { background-position: 0 -324px; }
-.ic-arrow_bottom_left { background-position: 0 -360px; }
-.ic-arrow_bottom_right { background-position: 0 -396px; }
-.ic-arrow_l { background-position: 0 -432px; }
-.ic-arrow_left { background-position: 0 -468px; }
-.ic-arrow_r { background-position: 0 -504px; }
-.ic-arrow_right { background-position: 0 -540px; }
-.ic-arrow_top { background-position: 0 -576px; }
-.ic-arrow_top_left { background-position: 0 -612px; }
-.ic-arrow_top_right { background-position: 0 -648px; }
-.ic-arrow_two_head { background-position: 0 -684px; }
-.ic-arrow_two_head_2 { background-position: 0 -720px; }
-.ic-attention { background-position: 0 -756px; }
-.ic-battery { background-position: 0 -792px; }
-.ic-bell { background-position: 0 -828px; }
-.ic-book { background-position: 0 -864px; }
-.ic-bookmark_1 { background-position: 0 -900px; }
-.ic-bookmark_2 { background-position: 0 -936px; }
-.ic-box { background-position: 0 -972px; }
-.ic-br_down { background-position: 0 -1008px; }
-.ic-br_next { background-position: 0 -1044px; }
-.ic-br_prev { background-position: 0 -1080px; }
-.ic-br_up { background-position: 0 -1116px; }
-.ic-brackets { background-position: 0 -1152px; }
-.ic-browser { background-position: 0 -1188px; }
-.ic-brush { background-position: 0 -1224px; }
-.ic-bug { background-position: 0 -1260px; }
-.ic-burst { background-position: 0 -1296px; }
-.ic-calc { background-position: 0 -1332px; }
-.ic-calendar_1 { background-position: 0 -1368px; }
-.ic-calendar_2 { background-position: 0 -1404px; }
-.ic-cancel { background-position: 0 -1440px; }
-.ic-case { background-position: 0 -1476px; }
-.ic-cc { background-position: 0 -1512px; }
-.ic-cert { background-position: 0 -1548px; }
-.ic-chart_bar { background-position: 0 -1584px; }
-.ic-chart_line { background-position: 0 -1620px; }
-.ic-chart_line_2 { background-position: 0 -1656px; }
-.ic-chart_pie { background-position: 0 -1692px; }
-.ic-checkbox_checked { background-position: 0 -1728px; }
-.ic-checkbox_unchecked { background-position: 0 -1764px; }
-.ic-checkmark { background-position: 0 -1800px; }
-.ic-clip { background-position: 0 -1836px; }
-.ic-clipboard_copy { background-position: 0 -1872px; }
-.ic-clipboard_cut { background-position: 0 -1908px; }
-.ic-clipboard_past { background-position: 0 -1944px; }
-.ic-clock { background-position: -36px 0; }
-.ic-cloud { background-position: -36px -36px; }
-.ic-cloud_rain { background-position: -36px -72px; }
-.ic-cog { background-position: -36px -108px; }
-.ic-comp { background-position: -36px -144px; }
-.ic-compass { background-position: -36px -180px; }
-.ic-contact_card { background-position: -36px -216px; }
-.ic-cube { background-position: -36px -252px; }
-.ic-cur_bp { background-position: -36px -288px; }
-.ic-cur_dollar { background-position: -36px -324px; }
-.ic-cur_euro { background-position: -36px -360px; }
-.ic-cur_yen { background-position: -36px -396px; }
-.ic-cursor_H_split { background-position: -36px -432px; }
-.ic-cursor_V_split { background-position: -36px -468px; }
-.ic-cursor_arrow { background-position: -36px -504px; }
-.ic-cursor_drag_arrow { background-position: -36px -540px; }
-.ic-cursor_drag_arrow_2 { background-position: -36px -576px; }
-.ic-cursor_drag_hand { background-position: -36px -612px; }
-.ic-cursor_hand { background-position: -36px -648px; }
-.ic-db { background-position: -36px -684px; }
-.ic-delete { background-position: -36px -720px; }
-.ic-doc_delete { background-position: -36px -756px; }
-.ic-doc_edit { background-position: -36px -792px; }
-.ic-doc_empty { background-position: -36px -828px; }
-.ic-doc_export { background-position: -36px -864px; }
-.ic-doc_import { background-position: -36px -900px; }
-.ic-doc_lines { background-position: -36px -936px; }
-.ic-doc_lines_stright { background-position: -36px -972px; }
-.ic-doc_minus { background-position: -36px -1008px; }
-.ic-doc_new { background-position: -36px -1044px; }
-.ic-doc_plus { background-position: -36px -1080px; }
-.ic-document { background-position: -36px -1116px; }
-.ic-download { background-position: -36px -1152px; }
-.ic-emotion_sad { background-position: -36px -1188px; }
-.ic-emotion_smile { background-position: -36px -1224px; }
-.ic-expand { background-position: -36px -1260px; }
-.ic-eye { background-position: -36px -1296px; }
-.ic-eye_inv { background-position: -36px -1332px; }
-.ic-facebook { background-position: -36px -1368px; }
-.ic-filter { background-position: -36px -1404px; }
-.ic-fire { background-position: -36px -1440px; }
-.ic-flag { background-position: -36px -1476px; }
-.ic-folder { background-position: -36px -1512px; }
-.ic-folder_arrow { background-position: -36px -1548px; }
-.ic-folder_delete { background-position: -36px -1584px; }
-.ic-folder_minus { background-position: -36px -1620px; }
-.ic-folder_open { background-position: -36px -1656px; }
-.ic-folder_plus { background-position: -36px -1692px; }
-.ic-font_bold { background-position: -36px -1728px; }
-.ic-font_italic { background-position: -36px -1764px; }
-.ic-font_size { background-position: -36px -1800px; }
-.ic-font_strokethrough { background-position: -36px -1836px; }
-.ic-font_underline { background-position: -36px -1872px; }
-.ic-game_pad { background-position: -36px -1908px; }
-.ic-globe_1 { background-position: -36px -1944px; }
-.ic-globe_2 { background-position: -72px 0; }
-.ic-globe_3 { background-position: -72px -36px; }
-.ic-google { background-position: -72px -72px; }
-.ic-hand_1 { background-position: -72px -108px; }
-.ic-hand_2 { background-position: -72px -144px; }
-.ic-hand_contra { background-position: -72px -180px; }
-.ic-hand_pro { background-position: -72px -216px; }
-.ic-headphones { background-position: -72px -252px; }
-.ic-heart { background-position: -72px -288px; }
-.ic-heart_empty { background-position: -72px -324px; }
-.ic-home { background-position: -72px -360px; }
-.ic-image_text { background-position: -72px -396px; }
-.ic-inbox { background-position: -72px -432px; }
-.ic-indent_decrease { background-position: -72px -468px; }
-.ic-indent_increase { background-position: -72px -504px; }
-.ic-info { background-position: -72px -540px; }
-.ic-iphone { background-position: -72px -576px; }
-.ic-key { background-position: -72px -612px; }
-.ic-layers_1 { background-position: -72px -648px; }
-.ic-layers_2 { background-position: -72px -684px; }
-.ic-lightbulb { background-position: -72px -720px; }
-.ic-lighting { background-position: -72px -756px; }
-.ic-link { background-position: -72px -792px; }
-.ic-list_bullets { background-position: -72px -828px; }
-.ic-list_num { background-position: -72px -864px; }
-.ic-magic_wand { background-position: -72px -900px; }
-.ic-mail { background-position: -72px -936px; }
-.ic-mail_2 { background-position: -72px -972px; }
-.ic-mic { background-position: -72px -1008px; }
-.ic-monitor { background-position: -72px -1044px; }
-.ic-movie { background-position: -72px -1080px; }
-.ic-music { background-position: -72px -1116px; }
-.ic-net_comp { background-position: -72px -1152px; }
-.ic-network { background-position: -72px -1188px; }
-.ic-notepad { background-position: -72px -1224px; }
-.ic-notepad_2 { background-position: -72px -1260px; }
-.ic-on-off { background-position: -72px -1296px; }
-.ic-openid { background-position: -72px -1332px; }
-.ic-padlock_closed { background-position: -72px -1368px; }
-.ic-padlock_open { background-position: -72px -1404px; }
-.ic-page_layout { background-position: -72px -1440px; }
-.ic-paragraph { background-position: -72px -1476px; }
-.ic-pencil { background-position: -72px -1512px; }
-.ic-phone { background-position: -72px -1548px; }
-.ic-phone_1 { background-position: -72px -1584px; }
-.ic-phone_2 { background-position: -72px -1620px; }
-.ic-phone_touch { background-position: -72px -1656px; }
-.ic-photo { background-position: -72px -1692px; }
-.ic-picture { background-position: -72px -1728px; }
-.ic-pin { background-position: -72px -1764px; }
-.ic-pin_2 { background-position: -72px -1800px; }
-.ic-pin_map { background-position: -72px -1836px; }
-.ic-pin_map_down { background-position: -72px -1872px; }
-.ic-pin_map_left { background-position: -72px -1908px; }
-.ic-pin_map_right { background-position: -72px -1944px; }
-.ic-pin_map_top { background-position: -108px 0; }
-.ic-pin_sq_down { background-position: -108px -36px; }
-.ic-pin_sq_left { background-position: -108px -72px; }
-.ic-pin_sq_right { background-position: -108px -108px; }
-.ic-pin_sq_top { background-position: -108px -144px; }
-.ic-playback_ff { background-position: -108px -180px; }
-.ic-playback_next { background-position: -108px -216px; }
-.ic-playback_pause { background-position: -108px -252px; }
-.ic-playback_play { background-position: -108px -288px; }
-.ic-playback_prev { background-position: -108px -324px; }
-.ic-playback_rec { background-position: -108px -360px; }
-.ic-playback_reload { background-position: -108px -396px; }
-.ic-playback_rew { background-position: -108px -432px; }
-.ic-playback_stop { background-position: -108px -468px; }
-.ic-preso { background-position: -108px -504px; }
-.ic-print { background-position: -108px -540px; }
-.ic-question { background-position: -108px -576px; }
-.ic-redo { background-position: -108px -612px; }
-.ic-rnd_br_down { background-position: -108px -648px; }
-.ic-rnd_br_first { background-position: -108px -684px; }
-.ic-rnd_br_last { background-position: -108px -720px; }
-.ic-rnd_br_next { background-position: -108px -756px; }
-.ic-rnd_br_prev { background-position: -108px -792px; }
-.ic-rnd_br_up { background-position: -108px -828px; }
-.ic-round { background-position: -108px -864px; }
-.ic-round_and_up { background-position: -108px -900px; }
-.ic-round_arrow_left { background-position: -108px -936px; }
-.ic-round_arrow_right { background-position: -108px -972px; }
-.ic-round_checkmark { background-position: -108px -1008px; }
-.ic-round_delete { background-position: -108px -1044px; }
-.ic-round_minus { background-position: -108px -1080px; }
-.ic-round_plus { background-position: -108px -1116px; }
-.ic-rss { background-position: -108px -1152px; }
-.ic-rss_sq { background-position: -108px -1188px; }
-.ic-sand { background-position: -108px -1224px; }
-.ic-sat_dish { background-position: -108px -1260px; }
-.ic-save { background-position: -108px -1296px; }
-.ic-server { background-position: -108px -1332px; }
-.ic-share { background-position: -108px -1368px; }
-.ic-shop_cart { background-position: -108px -1404px; }
-.ic-sound_high { background-position: -108px -1440px; }
-.ic-sound_low { background-position: -108px -1476px; }
-.ic-sound_mute { background-position: -108px -1512px; }
-.ic-spechbubble { background-position: -108px -1548px; }
-.ic-spechbubble_2 { background-position: -108px -1584px; }
-.ic-spechbubble_sq { background-position: -108px -1620px; }
-.ic-spechbubble_sq_line { background-position: -108px -1656px; }
-.ic-sq_br_down { background-position: -108px -1692px; }
-.ic-sq_br_first { background-position: -108px -1728px; }
-.ic-sq_br_last { background-position: -108px -1764px; }
-.ic-sq_br_next { background-position: -108px -1800px; }
-.ic-sq_br_prev { background-position: -108px -1836px; }
-.ic-sq_br_up { background-position: -108px -1872px; }
-.ic-sq_down { background-position: -108px -1908px; }
-.ic-sq_minus { background-position: -108px -1944px; }
-.ic-sq_next { background-position: -144px 0; }
-.ic-sq_plus { background-position: -144px -36px; }
-.ic-sq_prev { background-position: -144px -72px; }
-.ic-sq_up { background-position: -144px -108px; }
-.ic-square_shape { background-position: -144px -144px; }
-.ic-star { background-position: -144px -180px; }
-.ic-star_fav { background-position: -144px -216px; }
-.ic-star_fav_empty { background-position: -144px -252px; }
-.ic-sun { background-position: -144px -288px; }
-.ic-tag { background-position: -144px -324px; }
-.ic-tape { background-position: -144px -360px; }
-.ic-target { background-position: -144px -396px; }
-.ic-text_curstor { background-position: -144px -432px; }
-.ic-text_letter_t { background-position: -144px -468px; }
-.ic-top_right_expand { background-position: -144px -504px; }
-.ic-trash { background-position: -144px -540px; }
-.ic-twitter { background-position: -144px -576px; }
-.ic-twitter_2 { background-position: -144px -612px; }
-.ic-undo { background-position: -144px -648px; }
-.ic-user { background-position: -144px -684px; }
-.ic-users { background-position: -144px -720px; }
-.ic-wrench { background-position: -144px -756px; }
-.ic-wrench_plus { background-position: -144px -792px; }
-.ic-wrench_plus_2 { background-position: -144px -828px; }
-.ic-zoom { background-position: -144px -864px; }
-
-
/*
* lib/css/legacy/sidebar.css
- */div.psidebar-wrapper {
- margin: 0px 8px;
+ */div.psidebar {
}
-div.psidebar-head {
+div.psidebar div.head {
font-size: 14px;
font-weight: bold;
color: #555;
margin-bottom: 12px;
}
-div.psidebar-section {
- background-color: #fff;
- border: 1px solid #b2b2b7;
+div.psidebar div.section {
margin-bottom: 11px;
overflow: hidden;
}
-div.psidebar-section-head {
+div.psidebar div.section-head {
font-size: 12px;
padding: 5px 11px;
- background: #eeeeee; /* Old browsers */
- background: -moz-linear-gradient(top, #eeeeee 0%, #cccccc 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eeeeee), color-stop(100%,#cccccc)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* Opera 11.10+ */
- background: -ms-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* IE10+ */
- background: linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* W3C */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */
+ border-bottom: 2px solid #444;
}
-div.psidebar-section-body {
+div.psidebar div.section-body {
margin: 7px 11px 11px 11px;
}
-div.psidebar-section-item {
+div.psidebar div.section-item {
margin-bottom: 7px;
}
-.psidebar-section-link {
+div.psidebar div.section-item, div.psidebar .section-link {
font-size: 11px;
color: #666;
}
-
-div.follower-list {
- color: #666;
- margin-top: 7px;
- font-size: 11px;
-}
/*
- * lib/css/legacy/bootstrap-buttons.css
- */.btn.danger,
-.alert-message.danger,
-.btn.danger:hover,
-.alert-message.danger:hover,
-.btn.error,
-.alert-message.error,
-.btn.error:hover,
-.alert-message.error:hover,
-.btn.success,
-.alert-message.success,
-.btn.success:hover,
-.alert-message.success:hover,
-.btn.info,
-.alert-message.info,
-.btn.info:hover,
-.alert-message.info:hover {
- color: #ffffff;
+ * lib/css/bootstrap/headings.css
+ *//* heading from bootstrap */
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ margin: 0;
+ font-weight: bold;
+ color: #333333;
+ text-rendering: optimizelegibility;
+ margin-bottom: 0.3em;
}
-.btn .close, .alert-message .close {
- font-family: Arial, sans-serif;
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small {
+ font-weight: normal;
+ color: #999999;
+}
+h1 {
+ font-size: 30px;
+ line-height: 36px;
+}
+h1 small {
+ font-size: 18px;
+}
+h2 {
+ font-size: 24px;
+ line-height: 36px;
+}
+h2 small {
+ font-size: 18px;
+}
+h3 {
+ line-height: 27px;
+ font-size: 18px;
+}
+h3 small {
+ font-size: 14px;
+}
+h4, h5, h6 {
line-height: 18px;
}
-.btn.danger,
-.alert-message.danger,
-.btn.error,
-.alert-message.error {
- background-color: #c43c35;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
- background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
- background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: linear-gradient(top, #ee5f5b, #c43c35);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #c43c35 #c43c35 #882a25;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+h4 {
+ font-size: 14px;
}
-.btn.success, .alert-message.success {
- background-color: #57a957;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));
- background-image: -moz-linear-gradient(top, #62c462, #57a957);
- background-image: -ms-linear-gradient(top, #62c462, #57a957);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));
- background-image: -webkit-linear-gradient(top, #62c462, #57a957);
- background-image: -o-linear-gradient(top, #62c462, #57a957);
- background-image: linear-gradient(top, #62c462, #57a957);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #57a957 #57a957 #3d773d;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+h4 small {
+ font-size: 12px;
}
-.btn.info, .alert-message.info {
- background-color: #339bb9;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));
- background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
- background-image: -ms-linear-gradient(top, #5bc0de, #339bb9);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));
- background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
- background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
- background-image: linear-gradient(top, #5bc0de, #339bb9);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #339bb9 #339bb9 #22697d;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+h5 {
+ font-size: 12px;
+}
+h6 {
+ font-size: 11px;
+ color: #999999;
+ text-transform: uppercase;
+}
+/*
+ * lib/css/bootstrap/buttons.css
+ */.close {
+ float: right;
+ font-size: 20px;
+ font-weight: bold;
+ line-height: 18px;
+ color: #000000;
+ text-shadow: 0 1px 0 #ffffff;
+ opacity: 0.2;
+ filter: alpha(opacity=20);
+}
+.close:hover {
+ color: #000000;
+ text-decoration: none;
+ opacity: 0.4;
+ filter: alpha(opacity=40);
+ cursor: pointer;
}
.btn {
- cursor: pointer;
display: inline-block;
- background-color: #e6e6e6;
- background-repeat: no-repeat;
+ padding: 4px 10px 4px;
+ font-size: 13px;
+ line-height: 18px;
+ color: #333333;
+ text-align: center;
+ text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+ background-color: #fafafa;
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+ background-repeat: no-repeat;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
- padding: 5px 14px 6px;
- text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
- color: #333;
- font-size: 11px;
- line-height: normal;
border: 1px solid #ccc;
border-bottom-color: #bbb;
-webkit-border-radius: 4px;
@@ -1746,454 +1250,803 @@
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- -webkit-transition: 0.1s linear all;
- -moz-transition: 0.1s linear all;
- -ms-transition: 0.1s linear all;
- -o-transition: 0.1s linear all;
- transition: 0.1s linear all;
+ cursor: pointer;
+ *margin-left: .3em;
+}
+.btn:first-child {
+ *margin-left: 0;
}
.btn:hover {
- background-position: 0 -15px;
- color: #333;
+ color: #333333;
text-decoration: none;
+ background-color: #e6e6e6;
+ background-position: 0 -15px;
+ -webkit-transition: background-position 0.1s linear;
+ -moz-transition: background-position 0.1s linear;
+ -ms-transition: background-position 0.1s linear;
+ -o-transition: background-position 0.1s linear;
+ transition: background-position 0.1s linear;
}
.btn:focus {
- outline: 1px dotted #666;
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
}
-.btn.primary {
- color: #ffffff;
- background-color: #0064cd;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
- background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
- background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
- background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
- background-image: -o-linear-gradient(top, #049cdb, #0064cd);
- background-image: linear-gradient(top, #049cdb, #0064cd);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #0064cd #0064cd #003f81;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+.btn.active, .btn:active {
+ background-image: none;
+ -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ background-color: #e6e6e6;
+ background-color: #d9d9d9 \9;
+ color: rgba(0, 0, 0, 0.5);
+ outline: 0;
}
-.btn.active, .btn :active {
- -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-.btn.disabled {
+.btn.disabled, .btn[disabled] {
cursor: default;
background-image: none;
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- filter: alpha(opacity=65);
- -khtml-opacity: 0.65;
- -moz-opacity: 0.65;
+ background-color: #e6e6e6;
opacity: 0.65;
+ filter: alpha(opacity=65);
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
-.btn[disabled] {
- cursor: default;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- filter: alpha(opacity=65);
- -khtml-opacity: 0.65;
- -moz-opacity: 0.65;
- opacity: 0.65;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-.btn.large {
+.btn-large {
+ padding: 9px 14px;
font-size: 15px;
line-height: normal;
- padding: 9px 14px 9px;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
}
-.btn.small {
- padding: 5px 7px 5px;
+.btn-large .icon {
+ margin-top: 1px;
+}
+.btn-small {
+ padding: 5px 9px;
font-size: 11px;
+ line-height: 16px;
}
-:root .alert-message, :root .btn {
- border-radius: 0 \0;
+.btn-small .icon {
+ margin-top: -1px;
}
-button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
+.btn-primary,
+.btn-primary:hover,
+.btn-warning,
+.btn-warning:hover,
+.btn-danger,
+.btn-danger:hover,
+.btn-success,
+.btn-success:hover,
+.btn-info,
+.btn-info:hover {
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+ color: #ffffff;
+}
+.btn-primary.active,
+.btn-warning.active,
+.btn-danger.active,
+.btn-success.active,
+.btn-info.active {
+ color: rgba(255, 255, 255, 0.75);
+}
+.btn-primary {
+ background-color: #006dcc;
+ background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
+ background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
+ background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
+ background-image: -o-linear-gradient(top, #0088cc, #0044cc);
+ background-image: linear-gradient(top, #0088cc, #0044cc);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
+ border-color: #0044cc #0044cc #002a80;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-primary:hover,
+.btn-primary:active,
+.btn-primary.active,
+.btn-primary.disabled,
+.btn-primary[disabled] {
+ background-color: #0044cc;
+}
+.btn-primary:active, .btn-primary.active {
+ background-color: #003399 \9;
+}
+.btn-warning {
+ background-color: #faa732;
+ background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+ background-image: -ms-linear-gradient(top, #fbb450, #f89406);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
+ background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
+ background-image: -o-linear-gradient(top, #fbb450, #f89406);
+ background-image: linear-gradient(top, #fbb450, #f89406);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);
+ border-color: #f89406 #f89406 #ad6704;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-warning:hover,
+.btn-warning:active,
+.btn-warning.active,
+.btn-warning.disabled,
+.btn-warning[disabled] {
+ background-color: #f89406;
+}
+.btn-warning:active, .btn-warning.active {
+ background-color: #c67605 \9;
+}
+.btn-danger {
+ background-color: #da4f49;
+ background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
+ background-image: -ms-linear-gradient(top, #ee5f5b, #bd362f);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
+ background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
+ background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
+ background-image: linear-gradient(top, #ee5f5b, #bd362f);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);
+ border-color: #bd362f #bd362f #802420;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-danger:hover,
+.btn-danger:active,
+.btn-danger.active,
+.btn-danger.disabled,
+.btn-danger[disabled] {
+ background-color: #bd362f;
+}
+.btn-danger:active, .btn-danger.active {
+ background-color: #942a25 \9;
+}
+.btn-success {
+ background-color: #5bb75b;
+ background-image: -moz-linear-gradient(top, #62c462, #51a351);
+ background-image: -ms-linear-gradient(top, #62c462, #51a351);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
+ background-image: -webkit-linear-gradient(top, #62c462, #51a351);
+ background-image: -o-linear-gradient(top, #62c462, #51a351);
+ background-image: linear-gradient(top, #62c462, #51a351);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);
+ border-color: #51a351 #51a351 #387038;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-success:hover,
+.btn-success:active,
+.btn-success.active,
+.btn-success.disabled,
+.btn-success[disabled] {
+ background-color: #51a351;
+}
+.btn-success:active, .btn-success.active {
+ background-color: #408140 \9;
+}
+.btn-info {
+ background-color: #49afcd;
+ background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
+ background-image: -ms-linear-gradient(top, #5bc0de, #2f96b4);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
+ background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
+ background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
+ background-image: linear-gradient(top, #5bc0de, #2f96b4);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);
+ border-color: #2f96b4 #2f96b4 #1f6377;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-info:hover,
+.btn-info:active,
+.btn-info.active,
+.btn-info.disabled,
+.btn-info[disabled] {
+ background-color: #2f96b4;
+}
+.btn-info:active, .btn-info.active {
+ background-color: #24748c \9;
+}
+button.btn, input[type="submit"].btn {
+ *padding-top: 2px;
+ *padding-bottom: 2px;
+}
+button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner {
padding: 0;
border: 0;
}
-
-/* CLose */
-
-.close {
- float: right;
- color: #000000;
- font-size: 15px;
- font-weight: bold;
- line-height: 13.5px;
- margin-bottom: -2px;
- text-shadow: 0 1px 0 #ffffff;
- filter: alpha(opacity=25);
- -khtml-opacity: 0.25;
- -moz-opacity: 0.25;
- opacity: 0.25;
- text-decoration: none;
+button.btn.large, input[type="submit"].btn.large {
+ *padding-top: 7px;
+ *padding-bottom: 7px;
}
-.close:hover {
- color: #000000;
- text-decoration: none;
- filter: alpha(opacity=40);
- -khtml-opacity: 0.4;
- -moz-opacity: 0.4;
- opacity: 0.4;
- cursor: pointer;
- font-weight: bold;
+button.btn.small, input[type="submit"].btn.small {
+ *padding-top: 3px;
+ *padding-bottom: 3px;
+}
+.btn-group {
+ position: relative;
+ *zoom: 1;
+ *margin-left: .3em;
+}
+.btn-group:before, .btn-group:after {
+ display: table;
+ content: "";
+}
+.btn-group:after {
+ clear: both;
+}
+.btn-group:first-child {
+ *margin-left: 0;
+}
+.btn-group + .btn-group {
+ margin-left: 5px;
+}
+.btn-toolbar {
+ margin-top: 9px;
+ margin-bottom: 9px;
+}
+.btn-toolbar .btn-group {
+ display: inline-block;
+ *display: inline;
+ /* IE7 inline-block hack */
+
+ *zoom: 1;
+}
+.btn-group .btn {
+ position: relative;
+ float: left;
+ margin-left: -1px;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+.btn-group .btn:first-child {
+ margin-left: 0;
+ -webkit-border-top-left-radius: 4px;
+ -moz-border-radius-topleft: 4px;
+ border-top-left-radius: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomleft: 4px;
+ border-bottom-left-radius: 4px;
+}
+.btn-group .btn:last-child, .btn-group .dropdown-toggle {
+ -webkit-border-top-right-radius: 4px;
+ -moz-border-radius-topright: 4px;
+ border-top-right-radius: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ border-bottom-right-radius: 4px;
+}
+.btn-group .btn.large:first-child {
+ margin-left: 0;
+ -webkit-border-top-left-radius: 6px;
+ -moz-border-radius-topleft: 6px;
+ border-top-left-radius: 6px;
+ -webkit-border-bottom-left-radius: 6px;
+ -moz-border-radius-bottomleft: 6px;
+ border-bottom-left-radius: 6px;
+}
+.btn-group .btn.large:last-child, .btn-group .large.dropdown-toggle {
+ -webkit-border-top-right-radius: 6px;
+ -moz-border-radius-topright: 6px;
+ border-top-right-radius: 6px;
+ -webkit-border-bottom-right-radius: 6px;
+ -moz-border-radius-bottomright: 6px;
+ border-bottom-right-radius: 6px;
+}
+.btn-group .btn:hover,
+.btn-group .btn:focus,
+.btn-group .btn:active,
+.btn-group .btn.active {
+ z-index: 2;
+}
+.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle {
+ outline: 0;
+}
+.btn-group .dropdown-toggle {
+ padding-left: 8px;
+ padding-right: 8px;
+ -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ *padding-top: 5px;
+ *padding-bottom: 5px;
+}
+.btn-group.open {
+ *z-index: 1000;
+}
+.btn-group.open .dropdown-menu {
+ display: block;
+ margin-top: 1px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+.btn-group.open .dropdown-toggle {
+ background-image: none;
+ -webkit-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+.btn .caret {
+ margin-top: 7px;
+ margin-left: 0;
+}
+.btn:hover .caret, .open.btn-group .caret {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+.btn-primary .caret,
+.btn-danger .caret,
+.btn-info .caret,
+.btn-success .caret {
+ border-top-color: #ffffff;
+ opacity: 0.75;
+ filter: alpha(opacity=75);
+}
+.btn-small .caret {
+ margin-top: 4px;
}
/*
- * lib/css/bootstrap/bootstrap-topbar.css
- */.topbar {
- height: 40px;
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- z-index: 10000;
- overflow: visible;
+ * lib/css/bootstrap/navbar.css
+ */.nav {
+ margin-left: 0;
+ margin-bottom: 18px;
+ list-style: none;
}
-.topbar a {
- color: #bfbfbf;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- text-decoration: none;
-}
-.topbar h3 a:hover, .topbar .brand:hover, .topbar ul .active > a {
- background-color: #333;
- background-color: rgba(255, 255, 255, 0.05);
- color: #ffffff;
- text-decoration: none;
-}
-.topbar h3 {
- position: relative;
-}
-.topbar h3 a, .topbar .brand {
- float: left;
+.nav > li > a {
display: block;
- padding: 8px 20px 12px;
- margin-left: -20px;
+}
+.nav > li > a:hover {
+ text-decoration: none;
+ background-color: #eeeeee;
+}
+.nav-list {
+ padding-left: 14px;
+ padding-right: 14px;
+ margin-bottom: 0;
+}
+.nav-list > li > a, .nav-list .nav-header {
+ display: block;
+ padding: 3px 15px;
+ margin-left: -15px;
+ margin-right: -15px;
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+}
+.nav-list .nav-header {
+ font-size: 11px;
+ font-weight: bold;
+ line-height: 18px;
+ color: #999999;
+ text-transform: uppercase;
+}
+.nav-list > li + .nav-header {
+ margin-top: 9px;
+}
+.nav-list .active > a, .nav-list .active > a:hover {
color: #ffffff;
- font-size: 20px;
- font-weight: 200;
- line-height: 1;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
+ background-color: #0088cc;
}
-.topbar p {
- margin: 0;
- line-height: 40px;
+.nav-list [class^="icon-"] {
+ margin-right: 2px;
}
-.topbar p a:hover {
- background-color: transparent;
- color: #ffffff;
+.nav-tabs, .nav-pills {
+ *zoom: 1;
}
-.topbar form {
+.nav-tabs:before,
+.nav-pills:before,
+.nav-tabs:after,
+.nav-pills:after {
+ display: table;
+ content: "";
+}
+.nav-tabs:after, .nav-pills:after {
+ clear: both;
+}
+.nav-tabs > li, .nav-pills > li {
float: left;
- margin: 5px 0 0 0;
- position: relative;
- filter: alpha(opacity=100);
- -khtml-opacity: 1;
- -moz-opacity: 1;
- opacity: 1;
}
-.topbar form.pull-right {
- float: right;
+.nav-tabs > li > a, .nav-pills > li > a {
+ padding-right: 12px;
+ padding-left: 12px;
+ margin-right: 2px;
+ line-height: 14px;
}
-.topbar input {
- background-color: #444;
- background-color: rgba(255, 255, 255, 0.3);
- font-family: inherit;
- font-size: normal;
- font-weight: 13px;
- line-height: 1;
- padding: 4px 9px;
+.nav-tabs {
+ border-bottom: 1px solid #ddd;
+}
+.nav-tabs > li {
+ margin-bottom: -1px;
+}
+.nav-tabs > li > a {
+ padding-top: 9px;
+ padding-bottom: 9px;
+ border: 1px solid transparent;
+ -webkit-border-radius: 4px 4px 0 0;
+ -moz-border-radius: 4px 4px 0 0;
+ border-radius: 4px 4px 0 0;
+}
+.nav-tabs > li > a:hover {
+ border-color: #eeeeee #eeeeee #dddddd;
+}
+.nav-tabs > .active > a, .nav-tabs > .active > a:hover {
+ color: #555555;
+ background-color: #ffffff;
+ border: 1px solid #ddd;
+ border-bottom-color: transparent;
+ cursor: default;
+}
+.nav-pills > li > a {
+ padding-top: 8px;
+ padding-bottom: 8px;
+ margin-top: 2px;
+ margin-bottom: 2px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+.nav-pills .active > a, .nav-pills .active > a:hover {
color: #ffffff;
- color: rgba(255, 255, 255, 0.75);
- border: 1px solid #111;
+ background-color: #0088cc;
+}
+.nav-stacked > li {
+ float: none;
+}
+.nav-stacked > li > a {
+ margin-right: 0;
+}
+.nav-tabs.nav-stacked {
+ border-bottom: 0;
+}
+.nav-tabs.nav-stacked > li > a {
+ border: 1px solid #ddd;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+.nav-tabs.nav-stacked > li:first-child > a {
+ -webkit-border-radius: 4px 4px 0 0;
+ -moz-border-radius: 4px 4px 0 0;
+ border-radius: 4px 4px 0 0;
+}
+.nav-tabs.nav-stacked > li:last-child > a {
+ -webkit-border-radius: 0 0 4px 4px;
+ -moz-border-radius: 0 0 4px 4px;
+ border-radius: 0 0 4px 4px;
+}
+.nav-tabs.nav-stacked > li > a:hover {
+ border-color: #ddd;
+ z-index: 2;
+}
+.nav-pills.nav-stacked > li > a {
+ margin-bottom: 3px;
+}
+.nav-pills.nav-stacked > li:last-child > a {
+ margin-bottom: 1px;
+}
+.nav-tabs .dropdown-menu, .nav-pills .dropdown-menu {
+ margin-top: 1px;
+ border-width: 1px;
+}
+.nav-pills .dropdown-menu {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.25);
- -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.25);
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.25);
+}
+.nav-tabs .dropdown-toggle .caret, .nav-pills .dropdown-toggle .caret {
+ border-top-color: #0088cc;
+ margin-top: 6px;
+}
+.nav-tabs .dropdown-toggle:hover .caret, .nav-pills .dropdown-toggle:hover .caret {
+ border-top-color: #005580;
+}
+.nav-tabs .active .dropdown-toggle .caret, .nav-pills .active .dropdown-toggle .caret {
+ border-top-color: #333333;
+}
+.nav > .dropdown.active > a:hover {
+ color: #000000;
+ cursor: pointer;
+}
+.nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > .open.active > a:hover {
+ color: #ffffff;
+ background-color: #999999;
+ border-color: #999999;
+}
+.nav .open .caret, .nav .open.active .caret, .nav .open a:hover .caret {
+ border-top-color: #ffffff;
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+
+.navbar {
+ overflow: visible;
+ margin-bottom: 18px;
+}
+.navbar-inner {
+ padding-left: 20px;
+ padding-right: 20px;
+ background-color: #2c2c2c;
+ background-image: -moz-linear-gradient(top, #333333, #222222);
+ background-image: -ms-linear-gradient(top, #333333, #222222);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));
+ background-image: -webkit-linear-gradient(top, #333333, #222222);
+ background-image: -o-linear-gradient(top, #333333, #222222);
+ background-image: linear-gradient(top, #333333, #222222);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+}
+.btn-navbar {
+ display: none;
+ float: right;
+ padding: 7px 10px;
+ margin-left: 5px;
+ margin-right: 5px;
+ background-color: #2c2c2c;
+ background-image: -moz-linear-gradient(top, #333333, #222222);
+ background-image: -ms-linear-gradient(top, #333333, #222222);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));
+ background-image: -webkit-linear-gradient(top, #333333, #222222);
+ background-image: -o-linear-gradient(top, #333333, #222222);
+ background-image: linear-gradient(top, #333333, #222222);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+ border-color: #222222 #222222 #000000;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+ -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+}
+.btn-navbar:hover,
+.btn-navbar:active,
+.btn-navbar.active,
+.btn-navbar.disabled,
+.btn-navbar[disabled] {
+ background-color: #222222;
+}
+.btn-navbar:active, .btn-navbar.active {
+ background-color: #080808 \9;
+}
+.btn-navbar .icon-bar {
+ display: block;
+ width: 18px;
+ height: 2px;
+ background-color: #f5f5f5;
+ -webkit-border-radius: 1px;
+ -moz-border-radius: 1px;
+ border-radius: 1px;
+ -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+ -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+}
+.btn-navbar .icon-bar + .icon-bar {
+ margin-top: 3px;
+}
+.nav-collapse.collapse {
+ height: auto;
+}
+.navbar .brand:hover {
+ text-decoration: none;
+}
+.navbar .brand {
+ float: left;
+ display: block;
+ padding: 8px 20px 12px;
+ font-size: 20px;
+ font-weight: 200;
+ line-height: 1;
+ color: #ffffff;
+}
+.navbar .navbar-text {
+ margin-bottom: 0;
+ line-height: 40px;
+ color: #999999;
+}
+.navbar .navbar-text a:hover {
+ color: #ffffff;
+ background-color: transparent;
+}
+.navbar .btn, .navbar .btn-group {
+ margin-top: 5px;
+}
+.navbar .btn-group .btn {
+ margin-top: 0;
+}
+.navbar-form {
+ margin-bottom: 0;
+ *zoom: 1;
+}
+.navbar-form:before, .navbar-form:after {
+ display: table;
+ content: "";
+}
+.navbar-form:after {
+ clear: both;
+}
+.navbar-form input, .navbar-form select {
+ display: inline-block;
+ margin-top: 5px;
+ margin-bottom: 0;
+}
+.navbar-form .radio, .navbar-form .checkbox {
+ margin-top: 5px;
+}
+.navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] {
+ margin-top: 3px;
+}
+.navbar-search {
+ position: relative;
+ float: left;
+ margin-top: 6px;
+ margin-bottom: 0;
+}
+.navbar-search .search-query {
+ padding: 4px 9px;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ font-weight: normal;
+ line-height: 1;
+ color: #ffffff;
+ color: rgba(255, 255, 255, 0.75);
+ background: #666;
+ background: rgba(255, 255, 255, 0.3);
+ border: 1px solid #111;
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
+ -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
-webkit-transition: none;
-moz-transition: none;
-ms-transition: none;
-o-transition: none;
transition: none;
}
-.topbar input:-moz-placeholder {
- color: #e6e6e6;
+.navbar-search .search-query :-moz-placeholder {
+ color: #eeeeee;
}
-.topbar input::-webkit-input-placeholder {
- color: #e6e6e6;
+.navbar-search .search-query::-webkit-input-placeholder {
+ color: #eeeeee;
}
-.topbar input:hover {
- background-color: #bfbfbf;
- background-color: rgba(255, 255, 255, 0.5);
+.navbar-search .search-query:hover {
color: #ffffff;
+ background-color: #999999;
+ background-color: rgba(255, 255, 255, 0.5);
}
-.topbar input:focus, .topbar input.focused {
- outline: 0;
- background-color: #ffffff;
- color: #404040;
- text-shadow: 0 1px 0 #ffffff;
- border: 0;
+.navbar-search .search-query:focus, .navbar-search .search-query.focused {
padding: 5px 10px;
+ color: #333333;
+ text-shadow: 0 1px 0 #ffffff;
+ background-color: #ffffff;
+ border: 0;
-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+ outline: 0;
}
-.topbar-inner, .topbar .fill {
- background-color: #222;
- background-color: #222222;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
- background-image: -moz-linear-gradient(top, #333333, #222222);
- background-image: -ms-linear-gradient(top, #333333, #222222);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));
- background-image: -webkit-linear-gradient(top, #333333, #222222);
- background-image: -o-linear-gradient(top, #333333, #222222);
- background-image: linear-gradient(top, #333333, #222222);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
- -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
- -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+.navbar-fixed-top {
+ position: fixed;
+ top: 0;
+ right: 0;
+ left: 0;
+ z-index: 1030;
}
-.topbar div > ul, .nav {
+.navbar-fixed-top .navbar-inner {
+ padding-left: 0;
+ padding-right: 0;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+.navbar .nav {
+ position: relative;
+ left: 0;
display: block;
float: left;
margin: 0 10px 0 0;
- position: relative;
- left: 0;
}
-.topbar div > ul > li, .nav > li {
+.navbar .nav.pull-right {
+ float: right;
+}
+.navbar .nav > li {
display: block;
float: left;
}
-.topbar div > ul a, .nav a {
- display: block;
+.navbar .nav > li > a {
float: none;
padding: 10px 10px 11px;
line-height: 19px;
+ color: #999999;
text-decoration: none;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
-.topbar div > ul a:hover, .nav a:hover {
+.navbar .nav > li > a:hover {
+ background-color: transparent;
color: #ffffff;
text-decoration: none;
}
-.topbar div > ul .active > a, .nav .active > a {
- background-color: #222;
+.navbar .nav .active > a, .navbar .nav .active > a:hover {
+ color: #ffffff;
+ text-decoration: none;
+ background-color: #222222;
background-color: rgba(0, 0, 0, 0.5);
}
-.topbar div > ul.secondary-nav, .nav.secondary-nav {
- float: right;
+.navbar .divider-vertical {
+ height: 40px;
+ width: 1px;
+ margin: 0 9px;
+ overflow: hidden;
+ background-color: #222222;
+ border-right: 1px solid #333333;
+}
+.navbar .nav.pull-right {
margin-left: 10px;
margin-right: 0;
}
-.topbar div > ul.secondary-nav .menu-dropdown,
-.nav.secondary-nav .menu-dropdown,
-.topbar div > ul.secondary-nav .dropdown-menu,
-.nav.secondary-nav .dropdown-menu {
- right: 0;
- border: 0;
+.navbar .dropdown-menu {
+ margin-top: 1px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
}
-.topbar div > ul a.menu:hover,
-.nav a.menu:hover,
-.topbar div > ul li.open .menu,
-.nav li.open .menu,
-.topbar div > ul .dropdown-toggle:hover,
-.nav .dropdown-toggle:hover,
-.topbar div > ul .dropdown.open .dropdown-toggle,
-.nav .dropdown.open .dropdown-toggle {
- background: #444;
- background: rgba(255, 255, 255, 0.05);
-}
-.topbar div > ul .menu-dropdown,
-.nav .menu-dropdown,
-.topbar div > ul .dropdown-menu,
-.nav .dropdown-menu {
- background-color: #333;
-}
-.topbar div > ul .menu-dropdown a.menu,
-.nav .menu-dropdown a.menu,
-.topbar div > ul .dropdown-menu a.menu,
-.nav .dropdown-menu a.menu,
-.topbar div > ul .menu-dropdown .dropdown-toggle,
-.nav .menu-dropdown .dropdown-toggle,
-.topbar div > ul .dropdown-menu .dropdown-toggle,
-.nav .dropdown-menu .dropdown-toggle {
- color: #ffffff;
-}
-.topbar div > ul .menu-dropdown a.menu.open,
-.nav .menu-dropdown a.menu.open,
-.topbar div > ul .dropdown-menu a.menu.open,
-.nav .dropdown-menu a.menu.open,
-.topbar div > ul .menu-dropdown .dropdown-toggle.open,
-.nav .menu-dropdown .dropdown-toggle.open,
-.topbar div > ul .dropdown-menu .dropdown-toggle.open,
-.nav .dropdown-menu .dropdown-toggle.open {
- background: #444;
- background: rgba(255, 255, 255, 0.05);
-}
-.topbar div > ul .menu-dropdown li a,
-.nav .menu-dropdown li a,
-.topbar div > ul .dropdown-menu li a,
-.nav .dropdown-menu li a {
- color: #999;
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
-}
-.topbar div > ul .menu-dropdown li a:hover,
-.nav .menu-dropdown li a:hover,
-.topbar div > ul .dropdown-menu li a:hover,
-.nav .dropdown-menu li a:hover {
- background-color: #191919;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#292929), to(#191919));
- background-image: -moz-linear-gradient(top, #292929, #191919);
- background-image: -ms-linear-gradient(top, #292929, #191919);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #292929), color-stop(100%, #191919));
- background-image: -webkit-linear-gradient(top, #292929, #191919);
- background-image: -o-linear-gradient(top, #292929, #191919);
- background-image: linear-gradient(top, #292929, #191919);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#292929', endColorstr='#191919', GradientType=0);
- color: #ffffff;
-}
-.topbar div > ul .menu-dropdown .active a,
-.nav .menu-dropdown .active a,
-.topbar div > ul .dropdown-menu .active a,
-.nav .dropdown-menu .active a {
- color: #ffffff;
-}
-.topbar div > ul .menu-dropdown .divider,
-.nav .menu-dropdown .divider,
-.topbar div > ul .dropdown-menu .divider,
-.nav .dropdown-menu .divider {
- background-color: #222;
- border-color: #444;
-}
-.topbar ul .menu-dropdown li a, .topbar ul .dropdown-menu li a {
- padding: 4px 15px;
-}
-li.menu, .dropdown {
- position: relative;
-}
-a.menu:after, .dropdown-toggle:after {
- width: 0;
- height: 0;
+.navbar .dropdown-menu:before {
+ content: '';
display: inline-block;
- content: "↓";
- text-indent: -99999px;
- vertical-align: top;
- margin-top: 8px;
- margin-left: 4px;
- border-left: 4px solid transparent;
- border-right: 4px solid transparent;
- border-top: 4px solid #ffffff;
- filter: alpha(opacity=50);
- -khtml-opacity: 0.5;
- -moz-opacity: 0.5;
- opacity: 0.5;
-}
-.menu-dropdown, .dropdown-menu {
- background-color: #ffffff;
- float: left;
- display: none;
+ border-left: 7px solid transparent;
+ border-right: 7px solid transparent;
+ border-bottom: 7px solid #ccc;
+ border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
- top: 40px;
- z-index: 900;
- min-width: 160px;
- max-width: 220px;
- _width: 160px;
- margin-left: 0;
- margin-right: 0;
- padding: 6px 0;
- zoom: 1;
- border-color: #999;
- border-color: rgba(0, 0, 0, 0.2);
- border-style: solid;
- border-width: 0 1px 1px;
- -webkit-border-radius: 0 0 6px 6px;
- -moz-border-radius: 0 0 6px 6px;
- border-radius: 0 0 6px 6px;
- -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
- -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
- -webkit-background-clip: padding-box;
- -moz-background-clip: padding-box;
- background-clip: padding-box;
+ top: -7px;
+ left: 9px;
}
-.menu-dropdown li, .dropdown-menu li {
- float: none;
- display: block;
- background-color: none;
+.navbar .dropdown-menu:after {
+ content: '';
+ display: inline-block;
+ border-left: 6px solid transparent;
+ border-right: 6px solid transparent;
+ border-bottom: 6px solid #ffffff;
+ position: absolute;
+ top: -6px;
+ left: 10px;
}
-.menu-dropdown .divider, .dropdown-menu .divider {
- height: 1px;
- margin: 5px 0;
- overflow: hidden;
- background-color: #eee;
- border-bottom: 1px solid #ffffff;
+.navbar .nav .dropdown-toggle .caret, .navbar .nav .open.dropdown .caret {
+ border-top-color: #ffffff;
}
-.topbar .dropdown-menu a, .dropdown-menu a {
- display: block;
- padding: 4px 15px;
- clear: both;
- font-weight: normal;
- line-height: 18px;
- color: #808080;
- text-shadow: 0 1px 0 #ffffff;
+.navbar .nav .active .caret {
+ opacity: 1;
+ filter: alpha(opacity=100);
}
-.topbar .dropdown-menu a:hover,
-.dropdown-menu a:hover,
-.topbar .dropdown-menu a.hover,
-.dropdown-menu a.hover {
- background-color: #dddddd;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#eeeeee), to(#dddddd));
- background-image: -moz-linear-gradient(top, #eeeeee, #dddddd);
- background-image: -ms-linear-gradient(top, #eeeeee, #dddddd);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #dddddd));
- background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd);
- background-image: -o-linear-gradient(top, #eeeeee, #dddddd);
- background-image: linear-gradient(top, #eeeeee, #dddddd);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd', GradientType=0);
- color: #404040;
- text-decoration: none;
- -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
- -moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
- box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
+.navbar .nav .open > .dropdown-toggle, .navbar .nav .active > .dropdown-toggle, .navbar .nav .open.active > .dropdown-toggle {
+ background-color: transparent;
}
-.open .menu,
-.dropdown.open .menu,
-.open .dropdown-toggle,
-.dropdown.open .dropdown-toggle {
+.navbar .nav .active > .dropdown-toggle:hover {
color: #ffffff;
- background: #ccc;
- background: rgba(0, 0, 0, 0.3);
}
-.open .menu-dropdown,
-.dropdown.open .menu-dropdown,
-.open .dropdown-menu,
-.dropdown.open .dropdown-menu {
- display: block;
+.navbar .nav.pull-right .dropdown-menu {
+ left: auto;
+ right: 0;
}
-
-/*extra size menus for recent*/
-.dropdown-menu#toolbar-recent, .dropdown-menu#toolbar-options, .dropdown-menu#toolbar-help{
- width: 260px !important;
- max-width: 260px !important;
+.navbar .nav.pull-right .dropdown-menu:before {
+ left: auto;
+ right: 12px;
+}
+.navbar .nav.pull-right .dropdown-menu:after {
+ left: auto;
+ right: 13px;
}
/* ajax spinner */
-.topbar #spinner {
+.navbar #spinner {
display: block;
float: right;
width: 20px;
@@ -2202,9 +2055,700 @@
visibility: hidden;
}
-.topbar-inner {
+.navbar-inner {
padding: 0px 20px;
}
+
+/*
+ * lib/css/bootstrap/dropdown.css
+ */.dropdown {
+ position: relative;
+}
+.dropdown-toggle {
+ *margin-bottom: -3px;
+}
+.dropdown-toggle:active, .open .dropdown-toggle {
+ outline: 0;
+}
+.caret {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ text-indent: -99999px;
+ *text-indent: 0;
+ vertical-align: top;
+ border-left: 4px solid transparent;
+ border-right: 4px solid transparent;
+ border-top: 4px solid #000000;
+ opacity: 0.3;
+ filter: alpha(opacity=30);
+ content: "\2193";
+}
+.dropdown .caret {
+ margin-top: 8px;
+ margin-left: 2px;
+}
+.dropdown:hover .caret, .open.dropdown .caret {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+.dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: 1000;
+ float: left;
+ display: none;
+ min-width: 160px;
+ max-width: 220px;
+ _width: 160px;
+ padding: 4px 0;
+ margin: 0;
+ list-style: none;
+ background-color: #ffffff;
+ border-color: #ccc;
+ border-color: rgba(0, 0, 0, 0.2);
+ border-style: solid;
+ border-width: 1px;
+ -webkit-border-radius: 0 0 5px 5px;
+ -moz-border-radius: 0 0 5px 5px;
+ border-radius: 0 0 5px 5px;
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+ *border-right-width: 2px;
+ *border-bottom-width: 2px;
+}
+.dropdown-menu.bottom-up {
+ top: auto;
+ bottom: 100%;
+ margin-bottom: 2px;
+}
+.dropdown-menu .divider {
+ height: 1px;
+ margin: 5px 1px;
+ overflow: hidden;
+ background-color: #e5e5e5;
+ border-bottom: 1px solid #ffffff;
+ *width: 100%;
+ *margin: -5px 0 5px;
+}
+.dropdown-menu a {
+ display: block;
+ padding: 3px 15px;
+ clear: both;
+ font-weight: normal;
+ line-height: 18px;
+ color: #555555;
+ white-space: nowrap;
+}
+.dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover {
+ color: #ffffff;
+ text-decoration: none;
+ background-color: #0088cc;
+}
+.dropdown.open {
+ *z-index: 1000;
+}
+.dropdown.open .dropdown-toggle {
+ color: #ffffff;
+ background: #ccc;
+ background: rgba(0, 0, 0, 0.3);
+}
+.dropdown.open .dropdown-menu {
+ display: block;
+}
+/*
+ * lib/css/bootstrap/tooltip.css
+ */.tooltip {
+ position: absolute;
+ z-index: 1020;
+ display: block;
+ visibility: visible;
+ padding: 5px;
+ font-size: 11px;
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+.tooltip.in {
+ opacity: 0.8;
+ filter: alpha(opacity=80);
+}
+.tooltip.top {
+ margin-top: -2px;
+}
+.tooltip.right {
+ margin-left: 2px;
+}
+.tooltip.bottom {
+ margin-top: 2px;
+}
+.tooltip.left {
+ margin-left: -2px;
+}
+.tooltip.top .tooltip-arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-top: 5px solid #000000;
+}
+.tooltip.left .tooltip-arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid #000000;
+}
+.tooltip.bottom .tooltip-arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid #000000;
+}
+.tooltip.right .tooltip-arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-right: 5px solid #000000;
+}
+.tooltip-inner {
+ max-width: 200px;
+ padding: 3px 8px;
+ color: #ffffff;
+ text-align: center;
+ text-decoration: none;
+ background-color: #000000;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.tooltip-arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+}
+.popover {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1010;
+ display: none;
+ padding: 5px;
+}
+.popover.top {
+ margin-top: -5px;
+}
+.popover.right {
+ margin-left: 5px;
+}
+.popover.bottom {
+ margin-top: 5px;
+}
+.popover.left {
+ margin-left: -5px;
+}
+.popover.top .arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-top: 5px solid #000000;
+}
+.popover.right .arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-right: 5px solid #000000;
+}
+.popover.bottom .arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid #000000;
+}
+.popover.left .arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid #000000;
+}
+.popover .arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+}
+.popover-inner {
+ padding: 3px;
+ width: 280px;
+ overflow: hidden;
+ background: #000000;
+ background: rgba(0, 0, 0, 0.8);
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+ -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+}
+.popover-title {
+ padding: 9px 15px;
+ line-height: 1;
+ background-color: #f5f5f5;
+ border-bottom: 1px solid #eee;
+ -webkit-border-radius: 3px 3px 0 0;
+ -moz-border-radius: 3px 3px 0 0;
+ border-radius: 3px 3px 0 0;
+}
+.popover-content {
+ padding: 14px;
+ background-color: #ffffff;
+ -webkit-border-radius: 0 0 3px 3px;
+ -moz-border-radius: 0 0 3px 3px;
+ border-radius: 0 0 3px 3px;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding-box;
+ background-clip: padding-box;
+}
+.popover-content p, .popover-content ul, .popover-content ol {
+ margin-bottom: 0;
+}
+/*
+ * lib/css/bootstrap/label.css
+ */.label {
+ padding: 2px 4px 3px;
+ font-size: 11.049999999999999px;
+ font-weight: bold;
+ color: #ffffff;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+ background-color: #999999;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+.label:hover {
+ color: #ffffff;
+ text-decoration: none;
+}
+.label-important {
+ background-color: #b94a48;
+}
+.label-important:hover {
+ background-color: #953b39;
+}
+.label-warning {
+ background-color: #f89406;
+}
+.label-warning:hover {
+ background-color: #c67605;
+}
+.label-success {
+ background-color: #468847;
+}
+.label-success:hover {
+ background-color: #356635;
+}
+.label-info {
+ background-color: #3a87ad;
+}
+.label-info:hover {
+ background-color: #2d6987;
+}
+/*
+ * lib/css/bootstrap/icons.css
+ */[class^="icon-"], [class*=" icon-"] {
+ display: inline-block;
+ width: 14px;
+ height: 14px;
+ line-height: 14px;
+ vertical-align: text-top;
+ background-image: url("../lib/images/icons/glyphicons-halflings.png");
+ background-position: 14px 14px;
+ background-repeat: no-repeat;
+ *margin-right: .3em;
+}
+[class^="icon-"]:last-child, [class*=" icon-"]:last-child {
+ *margin-left: 0;
+}
+.icon-white {
+ background-image: url("../lib/images/icons/glyphicons-halflings-white.png");
+}
+.icon-glass {
+ background-position: 0 0;
+}
+.icon-music {
+ background-position: -24px 0;
+}
+.icon-search {
+ background-position: -48px 0;
+}
+.icon-envelope {
+ background-position: -72px 0;
+}
+.icon-heart {
+ background-position: -96px 0;
+}
+.icon-star {
+ background-position: -120px 0;
+}
+.icon-star-empty {
+ background-position: -144px 0;
+}
+.icon-user {
+ background-position: -168px 0;
+}
+.icon-film {
+ background-position: -192px 0;
+}
+.icon-th-large {
+ background-position: -216px 0;
+}
+.icon-th {
+ background-position: -240px 0;
+}
+.icon-th-list {
+ background-position: -264px 0;
+}
+.icon-ok {
+ background-position: -288px 0;
+}
+.icon-remove {
+ background-position: -312px 0;
+}
+.icon-zoom-in {
+ background-position: -336px 0;
+}
+.icon-zoom-out {
+ background-position: -360px 0;
+}
+.icon-off {
+ background-position: -384px 0;
+}
+.icon-signal {
+ background-position: -408px 0;
+}
+.icon-cog {
+ background-position: -432px 0;
+}
+.icon-trash {
+ background-position: -456px 0;
+}
+.icon-home {
+ background-position: 0 -24px;
+}
+.icon-file {
+ background-position: -24px -24px;
+}
+.icon-time {
+ background-position: -48px -24px;
+}
+.icon-road {
+ background-position: -72px -24px;
+}
+.icon-download-alt {
+ background-position: -96px -24px;
+}
+.icon-download {
+ background-position: -120px -24px;
+}
+.icon-upload {
+ background-position: -144px -24px;
+}
+.icon-inbox {
+ background-position: -168px -24px;
+}
+.icon-play-circle {
+ background-position: -192px -24px;
+}
+.icon-repeat {
+ background-position: -216px -24px;
+}
+.icon-refresh {
+ background-position: -240px -24px;
+}
+.icon-list-alt {
+ background-position: -264px -24px;
+}
+.icon-lock {
+ background-position: -287px -24px;
+}
+.icon-flag {
+ background-position: -312px -24px;
+}
+.icon-headphones {
+ background-position: -336px -24px;
+}
+.icon-volume-off {
+ background-position: -360px -24px;
+}
+.icon-volume-down {
+ background-position: -384px -24px;
+}
+.icon-volume-up {
+ background-position: -408px -24px;
+}
+.icon-qrcode {
+ background-position: -432px -24px;
+}
+.icon-barcode {
+ background-position: -456px -24px;
+}
+.icon-tag {
+ background-position: 0 -48px;
+}
+.icon-tags {
+ background-position: -25px -48px;
+}
+.icon-book {
+ background-position: -48px -48px;
+}
+.icon-bookmark {
+ background-position: -72px -48px;
+}
+.icon-print {
+ background-position: -96px -48px;
+}
+.icon-camera {
+ background-position: -120px -48px;
+}
+.icon-font {
+ background-position: -144px -48px;
+}
+.icon-bold {
+ background-position: -167px -48px;
+}
+.icon-italic {
+ background-position: -192px -48px;
+}
+.icon-text-height {
+ background-position: -216px -48px;
+}
+.icon-text-width {
+ background-position: -240px -48px;
+}
+.icon-align-left {
+ background-position: -264px -48px;
+}
+.icon-align-center {
+ background-position: -288px -48px;
+}
+.icon-align-right {
+ background-position: -312px -48px;
+}
+.icon-align-justify {
+ background-position: -336px -48px;
+}
+.icon-list {
+ background-position: -360px -48px;
+}
+.icon-indent-left {
+ background-position: -384px -48px;
+}
+.icon-indent-right {
+ background-position: -408px -48px;
+}
+.icon-facetime-video {
+ background-position: -432px -48px;
+}
+.icon-picture {
+ background-position: -456px -48px;
+}
+.icon-pencil {
+ background-position: 0 -72px;
+}
+.icon-map-marker {
+ background-position: -24px -72px;
+}
+.icon-adjust {
+ background-position: -48px -72px;
+}
+.icon-tint {
+ background-position: -72px -72px;
+}
+.icon-edit {
+ background-position: -96px -72px;
+}
+.icon-share {
+ background-position: -120px -72px;
+}
+.icon-check {
+ background-position: -144px -72px;
+}
+.icon-move {
+ background-position: -168px -72px;
+}
+.icon-step-backward {
+ background-position: -192px -72px;
+}
+.icon-fast-backward {
+ background-position: -216px -72px;
+}
+.icon-backward {
+ background-position: -240px -72px;
+}
+.icon-play {
+ background-position: -264px -72px;
+}
+.icon-pause {
+ background-position: -288px -72px;
+}
+.icon-stop {
+ background-position: -312px -72px;
+}
+.icon-forward {
+ background-position: -336px -72px;
+}
+.icon-fast-forward {
+ background-position: -360px -72px;
+}
+.icon-step-forward {
+ background-position: -384px -72px;
+}
+.icon-eject {
+ background-position: -408px -72px;
+}
+.icon-chevron-left {
+ background-position: -432px -72px;
+}
+.icon-chevron-right {
+ background-position: -456px -72px;
+}
+.icon-plus-sign {
+ background-position: 0 -96px;
+}
+.icon-minus-sign {
+ background-position: -24px -96px;
+}
+.icon-remove-sign {
+ background-position: -48px -96px;
+}
+.icon-ok-sign {
+ background-position: -72px -96px;
+}
+.icon-question-sign {
+ background-position: -96px -96px;
+}
+.icon-info-sign {
+ background-position: -120px -96px;
+}
+.icon-screenshot {
+ background-position: -144px -96px;
+}
+.icon-remove-circle {
+ background-position: -168px -96px;
+}
+.icon-ok-circle {
+ background-position: -192px -96px;
+}
+.icon-ban-circle {
+ background-position: -216px -96px;
+}
+.icon-arrow-left {
+ background-position: -240px -96px;
+}
+.icon-arrow-right {
+ background-position: -264px -96px;
+}
+.icon-arrow-up {
+ background-position: -289px -96px;
+}
+.icon-arrow-down {
+ background-position: -312px -96px;
+}
+.icon-share-alt {
+ background-position: -336px -96px;
+}
+.icon-resize-full {
+ background-position: -360px -96px;
+}
+.icon-resize-small {
+ background-position: -384px -96px;
+}
+.icon-plus {
+ background-position: -408px -96px;
+}
+.icon-minus {
+ background-position: -433px -96px;
+}
+.icon-asterisk {
+ background-position: -456px -96px;
+}
+.icon-exclamation-sign {
+ background-position: 0 -120px;
+}
+.icon-gift {
+ background-position: -24px -120px;
+}
+.icon-leaf {
+ background-position: -48px -120px;
+}
+.icon-fire {
+ background-position: -72px -120px;
+}
+.icon-eye-open {
+ background-position: -96px -120px;
+}
+.icon-eye-close {
+ background-position: -120px -120px;
+}
+.icon-warning-sign {
+ background-position: -144px -120px;
+}
+.icon-plane {
+ background-position: -168px -120px;
+}
+.icon-calendar {
+ background-position: -192px -120px;
+}
+.icon-random {
+ background-position: -216px -120px;
+}
+.icon-comment {
+ background-position: -240px -120px;
+}
+.icon-magnet {
+ background-position: -264px -120px;
+}
+.icon-chevron-up {
+ background-position: -288px -120px;
+}
+.icon-chevron-down {
+ background-position: -313px -119px;
+}
+.icon-retweet {
+ background-position: -336px -120px;
+}
+.icon-shopping-cart {
+ background-position: -360px -120px;
+}
+.icon-folder-close {
+ background-position: -384px -120px;
+}
+.icon-folder-open {
+ background-position: -408px -120px;
+}
+.icon-resize-vertical {
+ background-position: -432px -119px;
+}
+.icon-resize-horizontal {
+ background-position: -456px -118px;
+}
/*
* erpnext/startup/startup.css
*/h1, h2, h3, h4, h5 {
@@ -2222,19 +2766,13 @@
}
body {
- background-color: #e2e2e2;
}
.erpnext-footer {
- margin: 3px auto;
- color: #888;
+ margin: 11px auto;
text-align: center;
}
-.erpnext-footer a, .erpnext-footer a:hover, .erpnext-footer a:visited {
- color: #666;
-}
-
.module-icons {
background: url(../images/module-icons.png) no-repeat top left;
width:16px;
@@ -2254,14 +2792,45 @@
.module-icons-stock{ background-position: 0 -660px; }
.module-icons-support{ background-position: 0 -726px; }
-.topbar-new-comments {
+.navbar-new-comments {
margin: -3px 0px;
padding: 2px;
- font-size: 14px;
- color: #fff;
- background-color: #B00D07;
min-width: 20px;
text-align: center;
display: inline-block;
border-radius: 2px;
+ color: #999999;
+ background-color: #333131;
+}
+
+.navbar-new-comments:hover,
+.navbar-new-comments:active,
+.navbar-new-comments:focus {
+ color: #fff;
+}
+
+
+.navbar-new-comments-true {
+ color: #fff;
+ background-color: #B00D07;
+}
+
+.navbar-icon-home {
+ vertical-align: middle;
+ opacity:0.4;
+ Filter:alpha(opacity=40); /* For IE8 and earlier */
+}
+
+.navbar-icon-home:hover,
+.navbar-icon-home:focus,
+.navbar-icon-home:active,
+.navbar-icon-home-hover{
+ opacity:1;
+ Filter:alpha(opacity=100); /* For IE8 and earlier */
+}
+
+/*extra size menus for recent*/
+.dropdown-menu#toolbar-recent, .dropdown-menu#toolbar-options, .dropdown-menu#toolbar-help{
+ min-width: 160px !important;
+ max-width: 260px !important;
}
diff --git a/css/all-web.css b/css/all-web.css
index 13ea802..967c32b 100644
--- a/css/all-web.css
+++ b/css/all-web.css
@@ -12,68 +12,7 @@
font-family: Arial, Helvetica, Sans;
font-size: 12px;
color: #000;
-}
-
-/* heading from bootstrap */
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- margin: 0;
- font-weight: bold;
- color: #333333;
- text-rendering: optimizelegibility;
- margin-bottom: 0.3em;
-}
-h1 small,
-h2 small,
-h3 small,
-h4 small,
-h5 small,
-h6 small {
- font-weight: normal;
- color: #999999;
-}
-h1 {
- font-size: 30px;
- line-height: 36px;
-}
-h1 small {
- font-size: 18px;
-}
-h2 {
- font-size: 24px;
- line-height: 36px;
-}
-h2 small {
- font-size: 18px;
-}
-h3 {
- line-height: 27px;
- font-size: 18px;
-}
-h3 small {
- font-size: 14px;
-}
-h4, h5, h6 {
- line-height: 18px;
-}
-h4 {
- font-size: 14px;
-}
-h4 small {
- font-size: 12px;
-}
-h5 {
- font-size: 12px;
-}
-h6 {
- font-size: 11px;
- color: #999999;
- text-transform: uppercase;
+ background-color: #e2e2e2;
}
pre { margin: 0px; padding: 0px; }
@@ -126,8 +65,30 @@
border-bottom: 1px solid #ffffff;
}
+/* links */
+
a:active { outline:none; }
+a {
+ color: #0088cc;
+ text-decoration: none;
+}
+a:hover {
+ color: #005580;
+ text-decoration: underline;
+}
+
+.link_type {
+ padding:2px;
+ color: #0088cc;
+ cursor: pointer;
+}
+
+.link_type:hover {
+ color: #005580;
+ text-decoration: underline;
+}
+
:focus { -moz-outline-style:none; }
table.simpletable { border-collapse: collapse; margin-bottom: 10px;}
@@ -142,8 +103,19 @@
div#body_div {
position: relative;
display: none;
- margin-top: 56px;
padding-right: 7px;
+ width: 900px;
+ margin: auto;
+ margin-top: 56px;
+}
+
+footer {
+ width: 900px;
+ margin: auto;
+}
+header .container {
+ width: 900px;
+ margin: auto;
}
div.no_script {
@@ -163,24 +135,6 @@
border: 1px solid #FF4;
}
-
-div#head_div { background-color: #FFF; }
-
-#head_banner { background-color: #FFF; }
-
-.link_type {
- padding:2px;
- color: #00b;
- text-decoration: underline;
- cursor: pointer;
-}
-
-.link_type:hover {
- color: #fff !important;
- background-color: #07b;
- text-decoration: none;
-}
-
div.std-footer {
margin: 13px 0px;
border-top: 1px solid #AAA;
@@ -213,24 +167,37 @@
background: linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* W3C */
}
-.header-gradient {
- background: #84827c; /* Old browsers */
- background: -moz-linear-gradient(top, #84827c 0%, #27211c 100%); /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#84827c), color-stop(100%,#27211c)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #84827c 0%,#27211c 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #84827c 0%,#27211c 100%); /* Opera11.10+ */
- background: -ms-linear-gradient(top, #84827c 0%,#27211c 100%); /* IE10+ */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#84827c', endColorstr='#27211c',GradientType=0 ); /* IE6-9 */
- background: linear-gradient(top, #84827c 0%,#27211c 100%); /* W3C */
- color: #FFF;
+.layout_wrapper, .layout-wrapper {
+ -moz-box-shadow: 1px 1px 8px #555;
+ -webkit-box-shadow: 1px 1px 8px #555;
+ box-shadow: 1px 1px 8px #555;
+ background-color: #fff;
+ padding: 15px;
}
-.layout_wrapper {
+.layout-wrapper-background {
+ background-color: #f2f2f2 !important;
+ padding: 0px;
+}
+
+.layout-main-section {
+ width: 71%;
+ float: left;
padding: 15px;
- -moz-box-shadow: 1px 1px 6px #AAA;
- -webkit-box-shadow: 1px 1px 6px #AAA;
- box-shadow: 1px 1px 6px #AAA;
background-color: #FFF;
+ min-height: 450px;
+ -moz-box-shadow: 7px 0px 6px -2px #ddd;
+ -webkit-box-shadow: 7px 0px 6px -2px #ddd;
+ box-shadow: 7px 0px 6px -2px #ddd;
+}
+
+.layout-side-section {
+ width: 22%;
+ /*float: right;*/
+ color: #606060;
+ overflow-x: hidden;
+ padding: 15px;
+ min-height: 450px;
}
/* from bootstrap */
@@ -248,59 +215,31 @@
clear: both;
}
-/*
- * lib/css/legacy/menus.css
- */
-/******** Menus - menu.js ************/
-
-ul.menu_toolbar {
- z-index: 30;
- padding: 0px;
- margin: 0px;
- margin-top: 1px;
+.well {
+ min-height: 20px;
+ padding: 19px;
+ margin-bottom: 20px;
+ background-color: #f5f5f5;
+ border: 1px solid #eee;
+ border: 1px solid rgba(0, 0, 0, 0.05);
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}
-ul.menu_toolbar li {
- list-style: none;
- margin: 0px;
- float: left;
+.avatar-small {
+ display: inline-block;
+ min-width: 29px;
+}
+.avatar-small img {
+ height: 24px;
+ margin-bottom: -7px;
+ max-width: 24px;
}
-.top_menu {
- margin: 0px;
- padding: 4px;
- cursor: pointer;
- color: #FFF;
- margin-right: 8px;
-}
-
-.top_menu_mo {
- background-color: #000;
-
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-
-div.menu_toolbar_dropdown {
- position: absolute;
- margin-top: 4px;
- margin-left: 8px;
- width: 140px;
- background-color: #FFF;
- color: #000;
- display: none;
- border: 2px solid #333;
- z-index: 31;
- overflow-y: auto;
- overflow-x: hidden;
-}
-
-div.dd_item {
- cursor: pointer;
- padding: 4px;
- background-color: #FFF;
-}
-div.dd_item_mo { background-color: #FE8; }
/*
* lib/css/legacy/messages.css
*/
@@ -380,7 +319,7 @@
}
div.dialog_body {
- padding: 8px 4px 16px 4px;
+ padding: 8px 8px 16px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
@@ -433,94 +372,104 @@
}
/*
- * lib/css/legacy/bootstrap-buttons.css
- */.btn.danger,
-.alert-message.danger,
-.btn.danger:hover,
-.alert-message.danger:hover,
-.btn.error,
-.alert-message.error,
-.btn.error:hover,
-.alert-message.error:hover,
-.btn.success,
-.alert-message.success,
-.btn.success:hover,
-.alert-message.success:hover,
-.btn.info,
-.alert-message.info,
-.btn.info:hover,
-.alert-message.info:hover {
- color: #ffffff;
+ * lib/css/bootstrap/headings.css
+ *//* heading from bootstrap */
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ margin: 0;
+ font-weight: bold;
+ color: #333333;
+ text-rendering: optimizelegibility;
+ margin-bottom: 0.3em;
}
-.btn .close, .alert-message .close {
- font-family: Arial, sans-serif;
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small {
+ font-weight: normal;
+ color: #999999;
+}
+h1 {
+ font-size: 30px;
+ line-height: 36px;
+}
+h1 small {
+ font-size: 18px;
+}
+h2 {
+ font-size: 24px;
+ line-height: 36px;
+}
+h2 small {
+ font-size: 18px;
+}
+h3 {
+ line-height: 27px;
+ font-size: 18px;
+}
+h3 small {
+ font-size: 14px;
+}
+h4, h5, h6 {
line-height: 18px;
}
-.btn.danger,
-.alert-message.danger,
-.btn.error,
-.alert-message.error {
- background-color: #c43c35;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
- background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
- background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
- background-image: linear-gradient(top, #ee5f5b, #c43c35);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #c43c35 #c43c35 #882a25;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+h4 {
+ font-size: 14px;
}
-.btn.success, .alert-message.success {
- background-color: #57a957;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));
- background-image: -moz-linear-gradient(top, #62c462, #57a957);
- background-image: -ms-linear-gradient(top, #62c462, #57a957);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));
- background-image: -webkit-linear-gradient(top, #62c462, #57a957);
- background-image: -o-linear-gradient(top, #62c462, #57a957);
- background-image: linear-gradient(top, #62c462, #57a957);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #57a957 #57a957 #3d773d;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+h4 small {
+ font-size: 12px;
}
-.btn.info, .alert-message.info {
- background-color: #339bb9;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));
- background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
- background-image: -ms-linear-gradient(top, #5bc0de, #339bb9);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));
- background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
- background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
- background-image: linear-gradient(top, #5bc0de, #339bb9);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #339bb9 #339bb9 #22697d;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+h5 {
+ font-size: 12px;
+}
+h6 {
+ font-size: 11px;
+ color: #999999;
+ text-transform: uppercase;
+}
+/*
+ * lib/css/bootstrap/buttons.css
+ */.close {
+ float: right;
+ font-size: 20px;
+ font-weight: bold;
+ line-height: 18px;
+ color: #000000;
+ text-shadow: 0 1px 0 #ffffff;
+ opacity: 0.2;
+ filter: alpha(opacity=20);
+}
+.close:hover {
+ color: #000000;
+ text-decoration: none;
+ opacity: 0.4;
+ filter: alpha(opacity=40);
+ cursor: pointer;
}
.btn {
- cursor: pointer;
display: inline-block;
- background-color: #e6e6e6;
- background-repeat: no-repeat;
+ padding: 4px 10px 4px;
+ font-size: 13px;
+ line-height: 18px;
+ color: #333333;
+ text-align: center;
+ text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+ background-color: #fafafa;
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+ background-repeat: no-repeat;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
- padding: 5px 14px 6px;
- text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
- color: #333;
- font-size: 11px;
- line-height: normal;
border: 1px solid #ccc;
border-bottom-color: #bbb;
-webkit-border-radius: 4px;
@@ -529,454 +478,803 @@
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
- -webkit-transition: 0.1s linear all;
- -moz-transition: 0.1s linear all;
- -ms-transition: 0.1s linear all;
- -o-transition: 0.1s linear all;
- transition: 0.1s linear all;
+ cursor: pointer;
+ *margin-left: .3em;
+}
+.btn:first-child {
+ *margin-left: 0;
}
.btn:hover {
- background-position: 0 -15px;
- color: #333;
+ color: #333333;
text-decoration: none;
+ background-color: #e6e6e6;
+ background-position: 0 -15px;
+ -webkit-transition: background-position 0.1s linear;
+ -moz-transition: background-position 0.1s linear;
+ -ms-transition: background-position 0.1s linear;
+ -o-transition: background-position 0.1s linear;
+ transition: background-position 0.1s linear;
}
.btn:focus {
- outline: 1px dotted #666;
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
}
-.btn.primary {
- color: #ffffff;
- background-color: #0064cd;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
- background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
- background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
- background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
- background-image: -o-linear-gradient(top, #049cdb, #0064cd);
- background-image: linear-gradient(top, #049cdb, #0064cd);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- border-color: #0064cd #0064cd #003f81;
- border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+.btn.active, .btn:active {
+ background-image: none;
+ -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ background-color: #e6e6e6;
+ background-color: #d9d9d9 \9;
+ color: rgba(0, 0, 0, 0.5);
+ outline: 0;
}
-.btn.active, .btn :active {
- -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
- -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
- box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-.btn.disabled {
+.btn.disabled, .btn[disabled] {
cursor: default;
background-image: none;
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- filter: alpha(opacity=65);
- -khtml-opacity: 0.65;
- -moz-opacity: 0.65;
+ background-color: #e6e6e6;
opacity: 0.65;
+ filter: alpha(opacity=65);
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
-.btn[disabled] {
- cursor: default;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- filter: alpha(opacity=65);
- -khtml-opacity: 0.65;
- -moz-opacity: 0.65;
- opacity: 0.65;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
-}
-.btn.large {
+.btn-large {
+ padding: 9px 14px;
font-size: 15px;
line-height: normal;
- padding: 9px 14px 9px;
- -webkit-border-radius: 6px;
- -moz-border-radius: 6px;
- border-radius: 6px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
}
-.btn.small {
- padding: 5px 7px 5px;
+.btn-large .icon {
+ margin-top: 1px;
+}
+.btn-small {
+ padding: 5px 9px;
font-size: 11px;
+ line-height: 16px;
}
-:root .alert-message, :root .btn {
- border-radius: 0 \0;
+.btn-small .icon {
+ margin-top: -1px;
}
-button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
+.btn-primary,
+.btn-primary:hover,
+.btn-warning,
+.btn-warning:hover,
+.btn-danger,
+.btn-danger:hover,
+.btn-success,
+.btn-success:hover,
+.btn-info,
+.btn-info:hover {
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+ color: #ffffff;
+}
+.btn-primary.active,
+.btn-warning.active,
+.btn-danger.active,
+.btn-success.active,
+.btn-info.active {
+ color: rgba(255, 255, 255, 0.75);
+}
+.btn-primary {
+ background-color: #006dcc;
+ background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
+ background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
+ background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
+ background-image: -o-linear-gradient(top, #0088cc, #0044cc);
+ background-image: linear-gradient(top, #0088cc, #0044cc);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
+ border-color: #0044cc #0044cc #002a80;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-primary:hover,
+.btn-primary:active,
+.btn-primary.active,
+.btn-primary.disabled,
+.btn-primary[disabled] {
+ background-color: #0044cc;
+}
+.btn-primary:active, .btn-primary.active {
+ background-color: #003399 \9;
+}
+.btn-warning {
+ background-color: #faa732;
+ background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+ background-image: -ms-linear-gradient(top, #fbb450, #f89406);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
+ background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
+ background-image: -o-linear-gradient(top, #fbb450, #f89406);
+ background-image: linear-gradient(top, #fbb450, #f89406);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);
+ border-color: #f89406 #f89406 #ad6704;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-warning:hover,
+.btn-warning:active,
+.btn-warning.active,
+.btn-warning.disabled,
+.btn-warning[disabled] {
+ background-color: #f89406;
+}
+.btn-warning:active, .btn-warning.active {
+ background-color: #c67605 \9;
+}
+.btn-danger {
+ background-color: #da4f49;
+ background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
+ background-image: -ms-linear-gradient(top, #ee5f5b, #bd362f);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
+ background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
+ background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
+ background-image: linear-gradient(top, #ee5f5b, #bd362f);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);
+ border-color: #bd362f #bd362f #802420;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-danger:hover,
+.btn-danger:active,
+.btn-danger.active,
+.btn-danger.disabled,
+.btn-danger[disabled] {
+ background-color: #bd362f;
+}
+.btn-danger:active, .btn-danger.active {
+ background-color: #942a25 \9;
+}
+.btn-success {
+ background-color: #5bb75b;
+ background-image: -moz-linear-gradient(top, #62c462, #51a351);
+ background-image: -ms-linear-gradient(top, #62c462, #51a351);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
+ background-image: -webkit-linear-gradient(top, #62c462, #51a351);
+ background-image: -o-linear-gradient(top, #62c462, #51a351);
+ background-image: linear-gradient(top, #62c462, #51a351);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);
+ border-color: #51a351 #51a351 #387038;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-success:hover,
+.btn-success:active,
+.btn-success.active,
+.btn-success.disabled,
+.btn-success[disabled] {
+ background-color: #51a351;
+}
+.btn-success:active, .btn-success.active {
+ background-color: #408140 \9;
+}
+.btn-info {
+ background-color: #49afcd;
+ background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
+ background-image: -ms-linear-gradient(top, #5bc0de, #2f96b4);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
+ background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
+ background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
+ background-image: linear-gradient(top, #5bc0de, #2f96b4);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);
+ border-color: #2f96b4 #2f96b4 #1f6377;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-info:hover,
+.btn-info:active,
+.btn-info.active,
+.btn-info.disabled,
+.btn-info[disabled] {
+ background-color: #2f96b4;
+}
+.btn-info:active, .btn-info.active {
+ background-color: #24748c \9;
+}
+button.btn, input[type="submit"].btn {
+ *padding-top: 2px;
+ *padding-bottom: 2px;
+}
+button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner {
padding: 0;
border: 0;
}
-
-/* CLose */
-
-.close {
- float: right;
- color: #000000;
- font-size: 15px;
- font-weight: bold;
- line-height: 13.5px;
- margin-bottom: -2px;
- text-shadow: 0 1px 0 #ffffff;
- filter: alpha(opacity=25);
- -khtml-opacity: 0.25;
- -moz-opacity: 0.25;
- opacity: 0.25;
- text-decoration: none;
+button.btn.large, input[type="submit"].btn.large {
+ *padding-top: 7px;
+ *padding-bottom: 7px;
}
-.close:hover {
- color: #000000;
- text-decoration: none;
- filter: alpha(opacity=40);
- -khtml-opacity: 0.4;
- -moz-opacity: 0.4;
- opacity: 0.4;
- cursor: pointer;
- font-weight: bold;
+button.btn.small, input[type="submit"].btn.small {
+ *padding-top: 3px;
+ *padding-bottom: 3px;
+}
+.btn-group {
+ position: relative;
+ *zoom: 1;
+ *margin-left: .3em;
+}
+.btn-group:before, .btn-group:after {
+ display: table;
+ content: "";
+}
+.btn-group:after {
+ clear: both;
+}
+.btn-group:first-child {
+ *margin-left: 0;
+}
+.btn-group + .btn-group {
+ margin-left: 5px;
+}
+.btn-toolbar {
+ margin-top: 9px;
+ margin-bottom: 9px;
+}
+.btn-toolbar .btn-group {
+ display: inline-block;
+ *display: inline;
+ /* IE7 inline-block hack */
+
+ *zoom: 1;
+}
+.btn-group .btn {
+ position: relative;
+ float: left;
+ margin-left: -1px;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+.btn-group .btn:first-child {
+ margin-left: 0;
+ -webkit-border-top-left-radius: 4px;
+ -moz-border-radius-topleft: 4px;
+ border-top-left-radius: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomleft: 4px;
+ border-bottom-left-radius: 4px;
+}
+.btn-group .btn:last-child, .btn-group .dropdown-toggle {
+ -webkit-border-top-right-radius: 4px;
+ -moz-border-radius-topright: 4px;
+ border-top-right-radius: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ border-bottom-right-radius: 4px;
+}
+.btn-group .btn.large:first-child {
+ margin-left: 0;
+ -webkit-border-top-left-radius: 6px;
+ -moz-border-radius-topleft: 6px;
+ border-top-left-radius: 6px;
+ -webkit-border-bottom-left-radius: 6px;
+ -moz-border-radius-bottomleft: 6px;
+ border-bottom-left-radius: 6px;
+}
+.btn-group .btn.large:last-child, .btn-group .large.dropdown-toggle {
+ -webkit-border-top-right-radius: 6px;
+ -moz-border-radius-topright: 6px;
+ border-top-right-radius: 6px;
+ -webkit-border-bottom-right-radius: 6px;
+ -moz-border-radius-bottomright: 6px;
+ border-bottom-right-radius: 6px;
+}
+.btn-group .btn:hover,
+.btn-group .btn:focus,
+.btn-group .btn:active,
+.btn-group .btn.active {
+ z-index: 2;
+}
+.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle {
+ outline: 0;
+}
+.btn-group .dropdown-toggle {
+ padding-left: 8px;
+ padding-right: 8px;
+ -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ *padding-top: 5px;
+ *padding-bottom: 5px;
+}
+.btn-group.open {
+ *z-index: 1000;
+}
+.btn-group.open .dropdown-menu {
+ display: block;
+ margin-top: 1px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+.btn-group.open .dropdown-toggle {
+ background-image: none;
+ -webkit-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+.btn .caret {
+ margin-top: 7px;
+ margin-left: 0;
+}
+.btn:hover .caret, .open.btn-group .caret {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+.btn-primary .caret,
+.btn-danger .caret,
+.btn-info .caret,
+.btn-success .caret {
+ border-top-color: #ffffff;
+ opacity: 0.75;
+ filter: alpha(opacity=75);
+}
+.btn-small .caret {
+ margin-top: 4px;
}
/*
- * lib/css/bootstrap/bootstrap-topbar.css
- */.topbar {
- height: 40px;
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- z-index: 10000;
- overflow: visible;
+ * lib/css/bootstrap/navbar.css
+ */.nav {
+ margin-left: 0;
+ margin-bottom: 18px;
+ list-style: none;
}
-.topbar a {
- color: #bfbfbf;
- text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- text-decoration: none;
-}
-.topbar h3 a:hover, .topbar .brand:hover, .topbar ul .active > a {
- background-color: #333;
- background-color: rgba(255, 255, 255, 0.05);
- color: #ffffff;
- text-decoration: none;
-}
-.topbar h3 {
- position: relative;
-}
-.topbar h3 a, .topbar .brand {
- float: left;
+.nav > li > a {
display: block;
- padding: 8px 20px 12px;
- margin-left: -20px;
+}
+.nav > li > a:hover {
+ text-decoration: none;
+ background-color: #eeeeee;
+}
+.nav-list {
+ padding-left: 14px;
+ padding-right: 14px;
+ margin-bottom: 0;
+}
+.nav-list > li > a, .nav-list .nav-header {
+ display: block;
+ padding: 3px 15px;
+ margin-left: -15px;
+ margin-right: -15px;
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+}
+.nav-list .nav-header {
+ font-size: 11px;
+ font-weight: bold;
+ line-height: 18px;
+ color: #999999;
+ text-transform: uppercase;
+}
+.nav-list > li + .nav-header {
+ margin-top: 9px;
+}
+.nav-list .active > a, .nav-list .active > a:hover {
color: #ffffff;
- font-size: 20px;
- font-weight: 200;
- line-height: 1;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
+ background-color: #0088cc;
}
-.topbar p {
- margin: 0;
- line-height: 40px;
+.nav-list [class^="icon-"] {
+ margin-right: 2px;
}
-.topbar p a:hover {
- background-color: transparent;
- color: #ffffff;
+.nav-tabs, .nav-pills {
+ *zoom: 1;
}
-.topbar form {
+.nav-tabs:before,
+.nav-pills:before,
+.nav-tabs:after,
+.nav-pills:after {
+ display: table;
+ content: "";
+}
+.nav-tabs:after, .nav-pills:after {
+ clear: both;
+}
+.nav-tabs > li, .nav-pills > li {
float: left;
- margin: 5px 0 0 0;
- position: relative;
- filter: alpha(opacity=100);
- -khtml-opacity: 1;
- -moz-opacity: 1;
- opacity: 1;
}
-.topbar form.pull-right {
- float: right;
+.nav-tabs > li > a, .nav-pills > li > a {
+ padding-right: 12px;
+ padding-left: 12px;
+ margin-right: 2px;
+ line-height: 14px;
}
-.topbar input {
- background-color: #444;
- background-color: rgba(255, 255, 255, 0.3);
- font-family: inherit;
- font-size: normal;
- font-weight: 13px;
- line-height: 1;
- padding: 4px 9px;
+.nav-tabs {
+ border-bottom: 1px solid #ddd;
+}
+.nav-tabs > li {
+ margin-bottom: -1px;
+}
+.nav-tabs > li > a {
+ padding-top: 9px;
+ padding-bottom: 9px;
+ border: 1px solid transparent;
+ -webkit-border-radius: 4px 4px 0 0;
+ -moz-border-radius: 4px 4px 0 0;
+ border-radius: 4px 4px 0 0;
+}
+.nav-tabs > li > a:hover {
+ border-color: #eeeeee #eeeeee #dddddd;
+}
+.nav-tabs > .active > a, .nav-tabs > .active > a:hover {
+ color: #555555;
+ background-color: #ffffff;
+ border: 1px solid #ddd;
+ border-bottom-color: transparent;
+ cursor: default;
+}
+.nav-pills > li > a {
+ padding-top: 8px;
+ padding-bottom: 8px;
+ margin-top: 2px;
+ margin-bottom: 2px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+.nav-pills .active > a, .nav-pills .active > a:hover {
color: #ffffff;
- color: rgba(255, 255, 255, 0.75);
- border: 1px solid #111;
+ background-color: #0088cc;
+}
+.nav-stacked > li {
+ float: none;
+}
+.nav-stacked > li > a {
+ margin-right: 0;
+}
+.nav-tabs.nav-stacked {
+ border-bottom: 0;
+}
+.nav-tabs.nav-stacked > li > a {
+ border: 1px solid #ddd;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+.nav-tabs.nav-stacked > li:first-child > a {
+ -webkit-border-radius: 4px 4px 0 0;
+ -moz-border-radius: 4px 4px 0 0;
+ border-radius: 4px 4px 0 0;
+}
+.nav-tabs.nav-stacked > li:last-child > a {
+ -webkit-border-radius: 0 0 4px 4px;
+ -moz-border-radius: 0 0 4px 4px;
+ border-radius: 0 0 4px 4px;
+}
+.nav-tabs.nav-stacked > li > a:hover {
+ border-color: #ddd;
+ z-index: 2;
+}
+.nav-pills.nav-stacked > li > a {
+ margin-bottom: 3px;
+}
+.nav-pills.nav-stacked > li:last-child > a {
+ margin-bottom: 1px;
+}
+.nav-tabs .dropdown-menu, .nav-pills .dropdown-menu {
+ margin-top: 1px;
+ border-width: 1px;
+}
+.nav-pills .dropdown-menu {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.25);
- -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.25);
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.25);
+}
+.nav-tabs .dropdown-toggle .caret, .nav-pills .dropdown-toggle .caret {
+ border-top-color: #0088cc;
+ margin-top: 6px;
+}
+.nav-tabs .dropdown-toggle:hover .caret, .nav-pills .dropdown-toggle:hover .caret {
+ border-top-color: #005580;
+}
+.nav-tabs .active .dropdown-toggle .caret, .nav-pills .active .dropdown-toggle .caret {
+ border-top-color: #333333;
+}
+.nav > .dropdown.active > a:hover {
+ color: #000000;
+ cursor: pointer;
+}
+.nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > .open.active > a:hover {
+ color: #ffffff;
+ background-color: #999999;
+ border-color: #999999;
+}
+.nav .open .caret, .nav .open.active .caret, .nav .open a:hover .caret {
+ border-top-color: #ffffff;
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+
+.navbar {
+ overflow: visible;
+ margin-bottom: 18px;
+}
+.navbar-inner {
+ padding-left: 20px;
+ padding-right: 20px;
+ background-color: #2c2c2c;
+ background-image: -moz-linear-gradient(top, #333333, #222222);
+ background-image: -ms-linear-gradient(top, #333333, #222222);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));
+ background-image: -webkit-linear-gradient(top, #333333, #222222);
+ background-image: -o-linear-gradient(top, #333333, #222222);
+ background-image: linear-gradient(top, #333333, #222222);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+}
+.btn-navbar {
+ display: none;
+ float: right;
+ padding: 7px 10px;
+ margin-left: 5px;
+ margin-right: 5px;
+ background-color: #2c2c2c;
+ background-image: -moz-linear-gradient(top, #333333, #222222);
+ background-image: -ms-linear-gradient(top, #333333, #222222);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));
+ background-image: -webkit-linear-gradient(top, #333333, #222222);
+ background-image: -o-linear-gradient(top, #333333, #222222);
+ background-image: linear-gradient(top, #333333, #222222);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+ border-color: #222222 #222222 #000000;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+ -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+}
+.btn-navbar:hover,
+.btn-navbar:active,
+.btn-navbar.active,
+.btn-navbar.disabled,
+.btn-navbar[disabled] {
+ background-color: #222222;
+}
+.btn-navbar:active, .btn-navbar.active {
+ background-color: #080808 \9;
+}
+.btn-navbar .icon-bar {
+ display: block;
+ width: 18px;
+ height: 2px;
+ background-color: #f5f5f5;
+ -webkit-border-radius: 1px;
+ -moz-border-radius: 1px;
+ border-radius: 1px;
+ -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+ -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+}
+.btn-navbar .icon-bar + .icon-bar {
+ margin-top: 3px;
+}
+.nav-collapse.collapse {
+ height: auto;
+}
+.navbar .brand:hover {
+ text-decoration: none;
+}
+.navbar .brand {
+ float: left;
+ display: block;
+ padding: 8px 20px 12px;
+ font-size: 20px;
+ font-weight: 200;
+ line-height: 1;
+ color: #ffffff;
+}
+.navbar .navbar-text {
+ margin-bottom: 0;
+ line-height: 40px;
+ color: #999999;
+}
+.navbar .navbar-text a:hover {
+ color: #ffffff;
+ background-color: transparent;
+}
+.navbar .btn, .navbar .btn-group {
+ margin-top: 5px;
+}
+.navbar .btn-group .btn {
+ margin-top: 0;
+}
+.navbar-form {
+ margin-bottom: 0;
+ *zoom: 1;
+}
+.navbar-form:before, .navbar-form:after {
+ display: table;
+ content: "";
+}
+.navbar-form:after {
+ clear: both;
+}
+.navbar-form input, .navbar-form select {
+ display: inline-block;
+ margin-top: 5px;
+ margin-bottom: 0;
+}
+.navbar-form .radio, .navbar-form .checkbox {
+ margin-top: 5px;
+}
+.navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] {
+ margin-top: 3px;
+}
+.navbar-search {
+ position: relative;
+ float: left;
+ margin-top: 6px;
+ margin-bottom: 0;
+}
+.navbar-search .search-query {
+ padding: 4px 9px;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ font-weight: normal;
+ line-height: 1;
+ color: #ffffff;
+ color: rgba(255, 255, 255, 0.75);
+ background: #666;
+ background: rgba(255, 255, 255, 0.3);
+ border: 1px solid #111;
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
+ -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
-webkit-transition: none;
-moz-transition: none;
-ms-transition: none;
-o-transition: none;
transition: none;
}
-.topbar input:-moz-placeholder {
- color: #e6e6e6;
+.navbar-search .search-query :-moz-placeholder {
+ color: #eeeeee;
}
-.topbar input::-webkit-input-placeholder {
- color: #e6e6e6;
+.navbar-search .search-query::-webkit-input-placeholder {
+ color: #eeeeee;
}
-.topbar input:hover {
- background-color: #bfbfbf;
- background-color: rgba(255, 255, 255, 0.5);
+.navbar-search .search-query:hover {
color: #ffffff;
+ background-color: #999999;
+ background-color: rgba(255, 255, 255, 0.5);
}
-.topbar input:focus, .topbar input.focused {
- outline: 0;
- background-color: #ffffff;
- color: #404040;
- text-shadow: 0 1px 0 #ffffff;
- border: 0;
+.navbar-search .search-query:focus, .navbar-search .search-query.focused {
padding: 5px 10px;
+ color: #333333;
+ text-shadow: 0 1px 0 #ffffff;
+ background-color: #ffffff;
+ border: 0;
-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+ outline: 0;
}
-.topbar-inner, .topbar .fill {
- background-color: #222;
- background-color: #222222;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
- background-image: -moz-linear-gradient(top, #333333, #222222);
- background-image: -ms-linear-gradient(top, #333333, #222222);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));
- background-image: -webkit-linear-gradient(top, #333333, #222222);
- background-image: -o-linear-gradient(top, #333333, #222222);
- background-image: linear-gradient(top, #333333, #222222);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
- -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
- -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+.navbar-fixed-top {
+ position: fixed;
+ top: 0;
+ right: 0;
+ left: 0;
+ z-index: 1030;
}
-.topbar div > ul, .nav {
+.navbar-fixed-top .navbar-inner {
+ padding-left: 0;
+ padding-right: 0;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+.navbar .nav {
+ position: relative;
+ left: 0;
display: block;
float: left;
margin: 0 10px 0 0;
- position: relative;
- left: 0;
}
-.topbar div > ul > li, .nav > li {
+.navbar .nav.pull-right {
+ float: right;
+}
+.navbar .nav > li {
display: block;
float: left;
}
-.topbar div > ul a, .nav a {
- display: block;
+.navbar .nav > li > a {
float: none;
padding: 10px 10px 11px;
line-height: 19px;
+ color: #999999;
text-decoration: none;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
-.topbar div > ul a:hover, .nav a:hover {
+.navbar .nav > li > a:hover {
+ background-color: transparent;
color: #ffffff;
text-decoration: none;
}
-.topbar div > ul .active > a, .nav .active > a {
- background-color: #222;
+.navbar .nav .active > a, .navbar .nav .active > a:hover {
+ color: #ffffff;
+ text-decoration: none;
+ background-color: #222222;
background-color: rgba(0, 0, 0, 0.5);
}
-.topbar div > ul.secondary-nav, .nav.secondary-nav {
- float: right;
+.navbar .divider-vertical {
+ height: 40px;
+ width: 1px;
+ margin: 0 9px;
+ overflow: hidden;
+ background-color: #222222;
+ border-right: 1px solid #333333;
+}
+.navbar .nav.pull-right {
margin-left: 10px;
margin-right: 0;
}
-.topbar div > ul.secondary-nav .menu-dropdown,
-.nav.secondary-nav .menu-dropdown,
-.topbar div > ul.secondary-nav .dropdown-menu,
-.nav.secondary-nav .dropdown-menu {
- right: 0;
- border: 0;
+.navbar .dropdown-menu {
+ margin-top: 1px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
}
-.topbar div > ul a.menu:hover,
-.nav a.menu:hover,
-.topbar div > ul li.open .menu,
-.nav li.open .menu,
-.topbar div > ul .dropdown-toggle:hover,
-.nav .dropdown-toggle:hover,
-.topbar div > ul .dropdown.open .dropdown-toggle,
-.nav .dropdown.open .dropdown-toggle {
- background: #444;
- background: rgba(255, 255, 255, 0.05);
-}
-.topbar div > ul .menu-dropdown,
-.nav .menu-dropdown,
-.topbar div > ul .dropdown-menu,
-.nav .dropdown-menu {
- background-color: #333;
-}
-.topbar div > ul .menu-dropdown a.menu,
-.nav .menu-dropdown a.menu,
-.topbar div > ul .dropdown-menu a.menu,
-.nav .dropdown-menu a.menu,
-.topbar div > ul .menu-dropdown .dropdown-toggle,
-.nav .menu-dropdown .dropdown-toggle,
-.topbar div > ul .dropdown-menu .dropdown-toggle,
-.nav .dropdown-menu .dropdown-toggle {
- color: #ffffff;
-}
-.topbar div > ul .menu-dropdown a.menu.open,
-.nav .menu-dropdown a.menu.open,
-.topbar div > ul .dropdown-menu a.menu.open,
-.nav .dropdown-menu a.menu.open,
-.topbar div > ul .menu-dropdown .dropdown-toggle.open,
-.nav .menu-dropdown .dropdown-toggle.open,
-.topbar div > ul .dropdown-menu .dropdown-toggle.open,
-.nav .dropdown-menu .dropdown-toggle.open {
- background: #444;
- background: rgba(255, 255, 255, 0.05);
-}
-.topbar div > ul .menu-dropdown li a,
-.nav .menu-dropdown li a,
-.topbar div > ul .dropdown-menu li a,
-.nav .dropdown-menu li a {
- color: #999;
- text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
-}
-.topbar div > ul .menu-dropdown li a:hover,
-.nav .menu-dropdown li a:hover,
-.topbar div > ul .dropdown-menu li a:hover,
-.nav .dropdown-menu li a:hover {
- background-color: #191919;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#292929), to(#191919));
- background-image: -moz-linear-gradient(top, #292929, #191919);
- background-image: -ms-linear-gradient(top, #292929, #191919);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #292929), color-stop(100%, #191919));
- background-image: -webkit-linear-gradient(top, #292929, #191919);
- background-image: -o-linear-gradient(top, #292929, #191919);
- background-image: linear-gradient(top, #292929, #191919);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#292929', endColorstr='#191919', GradientType=0);
- color: #ffffff;
-}
-.topbar div > ul .menu-dropdown .active a,
-.nav .menu-dropdown .active a,
-.topbar div > ul .dropdown-menu .active a,
-.nav .dropdown-menu .active a {
- color: #ffffff;
-}
-.topbar div > ul .menu-dropdown .divider,
-.nav .menu-dropdown .divider,
-.topbar div > ul .dropdown-menu .divider,
-.nav .dropdown-menu .divider {
- background-color: #222;
- border-color: #444;
-}
-.topbar ul .menu-dropdown li a, .topbar ul .dropdown-menu li a {
- padding: 4px 15px;
-}
-li.menu, .dropdown {
- position: relative;
-}
-a.menu:after, .dropdown-toggle:after {
- width: 0;
- height: 0;
+.navbar .dropdown-menu:before {
+ content: '';
display: inline-block;
- content: "↓";
- text-indent: -99999px;
- vertical-align: top;
- margin-top: 8px;
- margin-left: 4px;
- border-left: 4px solid transparent;
- border-right: 4px solid transparent;
- border-top: 4px solid #ffffff;
- filter: alpha(opacity=50);
- -khtml-opacity: 0.5;
- -moz-opacity: 0.5;
- opacity: 0.5;
-}
-.menu-dropdown, .dropdown-menu {
- background-color: #ffffff;
- float: left;
- display: none;
+ border-left: 7px solid transparent;
+ border-right: 7px solid transparent;
+ border-bottom: 7px solid #ccc;
+ border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
- top: 40px;
- z-index: 900;
- min-width: 160px;
- max-width: 220px;
- _width: 160px;
- margin-left: 0;
- margin-right: 0;
- padding: 6px 0;
- zoom: 1;
- border-color: #999;
- border-color: rgba(0, 0, 0, 0.2);
- border-style: solid;
- border-width: 0 1px 1px;
- -webkit-border-radius: 0 0 6px 6px;
- -moz-border-radius: 0 0 6px 6px;
- border-radius: 0 0 6px 6px;
- -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
- -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
- -webkit-background-clip: padding-box;
- -moz-background-clip: padding-box;
- background-clip: padding-box;
+ top: -7px;
+ left: 9px;
}
-.menu-dropdown li, .dropdown-menu li {
- float: none;
- display: block;
- background-color: none;
+.navbar .dropdown-menu:after {
+ content: '';
+ display: inline-block;
+ border-left: 6px solid transparent;
+ border-right: 6px solid transparent;
+ border-bottom: 6px solid #ffffff;
+ position: absolute;
+ top: -6px;
+ left: 10px;
}
-.menu-dropdown .divider, .dropdown-menu .divider {
- height: 1px;
- margin: 5px 0;
- overflow: hidden;
- background-color: #eee;
- border-bottom: 1px solid #ffffff;
+.navbar .nav .dropdown-toggle .caret, .navbar .nav .open.dropdown .caret {
+ border-top-color: #ffffff;
}
-.topbar .dropdown-menu a, .dropdown-menu a {
- display: block;
- padding: 4px 15px;
- clear: both;
- font-weight: normal;
- line-height: 18px;
- color: #808080;
- text-shadow: 0 1px 0 #ffffff;
+.navbar .nav .active .caret {
+ opacity: 1;
+ filter: alpha(opacity=100);
}
-.topbar .dropdown-menu a:hover,
-.dropdown-menu a:hover,
-.topbar .dropdown-menu a.hover,
-.dropdown-menu a.hover {
- background-color: #dddddd;
- background-repeat: repeat-x;
- background-image: -khtml-gradient(linear, left top, left bottom, from(#eeeeee), to(#dddddd));
- background-image: -moz-linear-gradient(top, #eeeeee, #dddddd);
- background-image: -ms-linear-gradient(top, #eeeeee, #dddddd);
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #dddddd));
- background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd);
- background-image: -o-linear-gradient(top, #eeeeee, #dddddd);
- background-image: linear-gradient(top, #eeeeee, #dddddd);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd', GradientType=0);
- color: #404040;
- text-decoration: none;
- -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
- -moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
- box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
+.navbar .nav .open > .dropdown-toggle, .navbar .nav .active > .dropdown-toggle, .navbar .nav .open.active > .dropdown-toggle {
+ background-color: transparent;
}
-.open .menu,
-.dropdown.open .menu,
-.open .dropdown-toggle,
-.dropdown.open .dropdown-toggle {
+.navbar .nav .active > .dropdown-toggle:hover {
color: #ffffff;
- background: #ccc;
- background: rgba(0, 0, 0, 0.3);
}
-.open .menu-dropdown,
-.dropdown.open .menu-dropdown,
-.open .dropdown-menu,
-.dropdown.open .dropdown-menu {
- display: block;
+.navbar .nav.pull-right .dropdown-menu {
+ left: auto;
+ right: 0;
}
-
-/*extra size menus for recent*/
-.dropdown-menu#toolbar-recent, .dropdown-menu#toolbar-options, .dropdown-menu#toolbar-help{
- width: 260px !important;
- max-width: 260px !important;
+.navbar .nav.pull-right .dropdown-menu:before {
+ left: auto;
+ right: 12px;
+}
+.navbar .nav.pull-right .dropdown-menu:after {
+ left: auto;
+ right: 13px;
}
/* ajax spinner */
-.topbar #spinner {
+.navbar #spinner {
display: block;
float: right;
width: 20px;
@@ -985,9 +1283,280 @@
visibility: hidden;
}
-.topbar-inner {
+.navbar-inner {
padding: 0px 20px;
}
+
+/*
+ * lib/css/bootstrap/dropdown.css
+ */.dropdown {
+ position: relative;
+}
+.dropdown-toggle {
+ *margin-bottom: -3px;
+}
+.dropdown-toggle:active, .open .dropdown-toggle {
+ outline: 0;
+}
+.caret {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ text-indent: -99999px;
+ *text-indent: 0;
+ vertical-align: top;
+ border-left: 4px solid transparent;
+ border-right: 4px solid transparent;
+ border-top: 4px solid #000000;
+ opacity: 0.3;
+ filter: alpha(opacity=30);
+ content: "\2193";
+}
+.dropdown .caret {
+ margin-top: 8px;
+ margin-left: 2px;
+}
+.dropdown:hover .caret, .open.dropdown .caret {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+.dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: 1000;
+ float: left;
+ display: none;
+ min-width: 160px;
+ max-width: 220px;
+ _width: 160px;
+ padding: 4px 0;
+ margin: 0;
+ list-style: none;
+ background-color: #ffffff;
+ border-color: #ccc;
+ border-color: rgba(0, 0, 0, 0.2);
+ border-style: solid;
+ border-width: 1px;
+ -webkit-border-radius: 0 0 5px 5px;
+ -moz-border-radius: 0 0 5px 5px;
+ border-radius: 0 0 5px 5px;
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+ *border-right-width: 2px;
+ *border-bottom-width: 2px;
+}
+.dropdown-menu.bottom-up {
+ top: auto;
+ bottom: 100%;
+ margin-bottom: 2px;
+}
+.dropdown-menu .divider {
+ height: 1px;
+ margin: 5px 1px;
+ overflow: hidden;
+ background-color: #e5e5e5;
+ border-bottom: 1px solid #ffffff;
+ *width: 100%;
+ *margin: -5px 0 5px;
+}
+.dropdown-menu a {
+ display: block;
+ padding: 3px 15px;
+ clear: both;
+ font-weight: normal;
+ line-height: 18px;
+ color: #555555;
+ white-space: nowrap;
+}
+.dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover {
+ color: #ffffff;
+ text-decoration: none;
+ background-color: #0088cc;
+}
+.dropdown.open {
+ *z-index: 1000;
+}
+.dropdown.open .dropdown-toggle {
+ color: #ffffff;
+ background: #ccc;
+ background: rgba(0, 0, 0, 0.3);
+}
+.dropdown.open .dropdown-menu {
+ display: block;
+}
+/*
+ * lib/css/bootstrap/tooltip.css
+ */.tooltip {
+ position: absolute;
+ z-index: 1020;
+ display: block;
+ visibility: visible;
+ padding: 5px;
+ font-size: 11px;
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+.tooltip.in {
+ opacity: 0.8;
+ filter: alpha(opacity=80);
+}
+.tooltip.top {
+ margin-top: -2px;
+}
+.tooltip.right {
+ margin-left: 2px;
+}
+.tooltip.bottom {
+ margin-top: 2px;
+}
+.tooltip.left {
+ margin-left: -2px;
+}
+.tooltip.top .tooltip-arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-top: 5px solid #000000;
+}
+.tooltip.left .tooltip-arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid #000000;
+}
+.tooltip.bottom .tooltip-arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid #000000;
+}
+.tooltip.right .tooltip-arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-right: 5px solid #000000;
+}
+.tooltip-inner {
+ max-width: 200px;
+ padding: 3px 8px;
+ color: #ffffff;
+ text-align: center;
+ text-decoration: none;
+ background-color: #000000;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.tooltip-arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+}
+.popover {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1010;
+ display: none;
+ padding: 5px;
+}
+.popover.top {
+ margin-top: -5px;
+}
+.popover.right {
+ margin-left: 5px;
+}
+.popover.bottom {
+ margin-top: 5px;
+}
+.popover.left {
+ margin-left: -5px;
+}
+.popover.top .arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-top: 5px solid #000000;
+}
+.popover.right .arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-right: 5px solid #000000;
+}
+.popover.bottom .arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid #000000;
+}
+.popover.left .arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid #000000;
+}
+.popover .arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+}
+.popover-inner {
+ padding: 3px;
+ width: 280px;
+ overflow: hidden;
+ background: #000000;
+ background: rgba(0, 0, 0, 0.8);
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+ -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+ box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+}
+.popover-title {
+ padding: 9px 15px;
+ line-height: 1;
+ background-color: #f5f5f5;
+ border-bottom: 1px solid #eee;
+ -webkit-border-radius: 3px 3px 0 0;
+ -moz-border-radius: 3px 3px 0 0;
+ border-radius: 3px 3px 0 0;
+}
+.popover-content {
+ padding: 14px;
+ background-color: #ffffff;
+ -webkit-border-radius: 0 0 3px 3px;
+ -moz-border-radius: 0 0 3px 3px;
+ border-radius: 0 0 3px 3px;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding-box;
+ background-clip: padding-box;
+}
+.popover-content p, .popover-content ul, .popover-content ol {
+ margin-bottom: 0;
+}
/*
* erpnext/startup/startup.css
*/h1, h2, h3, h4, h5 {
@@ -1005,19 +1574,13 @@
}
body {
- background-color: #e2e2e2;
}
.erpnext-footer {
- margin: 3px auto;
- color: #888;
+ margin: 11px auto;
text-align: center;
}
-.erpnext-footer a, .erpnext-footer a:hover, .erpnext-footer a:visited {
- color: #666;
-}
-
.module-icons {
background: url(../images/module-icons.png) no-repeat top left;
width:16px;
@@ -1037,26 +1600,52 @@
.module-icons-stock{ background-position: 0 -660px; }
.module-icons-support{ background-position: 0 -726px; }
-.topbar-new-comments {
+.navbar-new-comments {
margin: -3px 0px;
padding: 2px;
- font-size: 14px;
- color: #fff;
- background-color: #B00D07;
min-width: 20px;
text-align: center;
display: inline-block;
border-radius: 2px;
+ color: #999999;
+ background-color: #333131;
+}
+
+.navbar-new-comments:hover,
+.navbar-new-comments:active,
+.navbar-new-comments:focus {
+ color: #fff;
+}
+
+
+.navbar-new-comments-true {
+ color: #fff;
+ background-color: #B00D07;
+}
+
+.navbar-icon-home {
+ vertical-align: middle;
+ opacity:0.4;
+ Filter:alpha(opacity=40); /* For IE8 and earlier */
+}
+
+.navbar-icon-home:hover,
+.navbar-icon-home:focus,
+.navbar-icon-home:active,
+.navbar-icon-home-hover{
+ opacity:1;
+ Filter:alpha(opacity=100); /* For IE8 and earlier */
+}
+
+/*extra size menus for recent*/
+.dropdown-menu#toolbar-recent, .dropdown-menu#toolbar-options, .dropdown-menu#toolbar-help{
+ min-width: 160px !important;
+ max-width: 260px !important;
}
/*
* erpnext/website/css/website.css
- */#body_div {
- width: 900px;
- margin: auto;
-}
-
-.layout_wrapper {
+ */.layout_wrapper {
padding: 20px;
}
@@ -1083,15 +1672,6 @@
margin-bottom: 9px;
}
-footer {
- width: 900px;
- margin: auto;
-}
-header .topbar .container {
- width: 900px;
- margin: auto;
-}
-
.web-content input[type="text"], .web-content input[type="password"], .web-content select {
min-width: 180px;
}
diff --git a/erpnext/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt b/erpnext/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt
index c628e83..510e922 100644
--- a/erpnext/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt
+++ b/erpnext/accounts/Print Format/Sales Invoice Classic/Sales Invoice Classic.txt
@@ -3,26 +3,26 @@
# These values are common in all dictionaries
{
- 'creation': '2011-12-21 11:02:04',
+ 'creation': '2012-01-13 11:41:18',
'docstatus': 0,
- 'modified': '2012-01-06 14:17:57',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-03-01 13:36:06',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all Print Format
{
- 'doc_type': 'Receivable Voucher',
+ 'doc_type': u'Receivable Voucher',
'doctype': 'Print Format',
- 'html': '<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: "Georgia", serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t\tline-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: "Georgia", serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table thead {\n\t\tborder-bottom: 1px solid black;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px 0px;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t\'Receivable Voucher\',\n\t\t\t\tdoc.name,\n\t\t\t\t\'entries\',\n\t\t\t\t\'RV Detail\',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t\'SR\', \'item_name\', \'description\', \'qty\', \'stock_uom\',\n\t\t\t\t\t\'export_rate\', \'export_amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t\'Sr\', \'Item Name\', \'Description\', \'Qty\',\n\t\t\t\t\t\'UoM\', \'Basic Rate\', \'Amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t\'3%\', \'20%\', \'37%\', \'5%\',\n\t\t\t\t\t\'5%\', \'15%\', \'15%\'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t\'description\' : function(data_row) {\n\t\t\t\t\t\tif(data_row.adj_rate) {\n\t\t\t\t\t\t\tvar to_append = \'<div style="padding-left: 15px;"><i>Discount: \' + \n\t\t\t\t\t\t\t\tdata_row.adj_rate + \'% on \' + doc.currency + \' \' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + \'</i></div>\';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = \'\';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t\'<div style = "page-break-after: always;" \\\n\t\t\t\t\t\tclass = "page_break"></div>\\\n\t\t\t\t\t\t<div class="page-settings"></div>\';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren(\'RV Tax Detail\', doc.name, \'other_charges\');\n\t\t\tvar rows = \'<table width=100%>\\n\';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t\'<tr>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td>\' + oc[i].description + \'</td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td></td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td width=38%>\' + fmt_money(oc[i].tax_amount) + \'</td>\\n\' +\n\t\t\t\t\t\t\'</tr>\\n\';\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rows + \'</table>\\n\';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class=\'common page-header\'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class=\'header-table\' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td><script>\'<h1>\' + (doc.select_print_heading || \'Invoice\') + \'</h1>\'</script></td></tr>\n\t\t\t<tr><td><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.voucher_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class=\'common page-body\'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class=\'common page-footer\'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class=\'footer-table\' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style=\'padding-right: 10px;\'>\n\t\t\t\t\t<b>Terms, Conditions & Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style=\'font-weight: bold\'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n',
- 'module': 'Accounts',
+ 'html': u'<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: "Georgia", serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t\tline-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: "Georgia", serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table thead {\n\t\tborder-bottom: 1px solid black;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px 0px;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t\'Receivable Voucher\',\n\t\t\t\tdoc.name,\n\t\t\t\t\'entries\',\n\t\t\t\t\'RV Detail\',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t\'SR\', \'item_name\', \'description\', \'qty\', \'stock_uom\',\n\t\t\t\t\t\'export_rate\', \'export_amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t\'Sr\', \'Item Name\', \'Description\', \'Qty\',\n\t\t\t\t\t\'UoM\', \'Basic Rate\', \'Amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t\'3%\', \'20%\', \'37%\', \'5%\',\n\t\t\t\t\t\'5%\', \'15%\', \'15%\'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t\'description\' : function(data_row) {\n\t\t\t\t\t\tif(data_row.adj_rate) {\n\t\t\t\t\t\t\tvar to_append = \'<div style="padding-left: 15px;"><i>Discount: \' + \n\t\t\t\t\t\t\t\tdata_row.adj_rate + \'% on \' + doc.currency + \' \' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + \'</i></div>\';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = \'\';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t\'<div style = "page-break-after: always;" \\\n\t\t\t\t\t\tclass = "page_break"></div>\\\n\t\t\t\t\t\t<div class="page-settings"></div>\';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren(\'RV Tax Detail\', doc.name, \'other_charges\');\n\t\t\tvar rows = \'<table width=100%>\\n\';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t\'<tr>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td>\' + oc[i].description + \'</td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td></td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td width=38%>\' + fmt_money(oc[i].tax_amount) + \'</td>\\n\' +\n\t\t\t\t\t\t\'</tr>\\n\';\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rows + \'</table>\\n\';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class=\'common page-header\'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class=\'header-table\' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td><script>\'<h1>\' + (doc.select_print_heading || \'Invoice\') + \'</h1>\'</script></td></tr>\n\t\t\t<tr><td><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.posting_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class=\'common page-body\'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class=\'common page-footer\'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class=\'footer-table\' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style=\'padding-right: 10px;\'>\n\t\t\t\t\t<b>Terms, Conditions & Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style=\'font-weight: bold\'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n',
+ 'module': u'Accounts',
'name': '__common__',
- 'standard': 'Yes'
+ 'standard': u'Yes'
},
# Print Format, Sales Invoice Classic
{
'doctype': 'Print Format',
- 'name': 'Sales Invoice Classic'
+ 'name': u'Sales Invoice Classic'
}
]
\ No newline at end of file
diff --git a/erpnext/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt b/erpnext/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt
index 0b4c15c..3c44fc7 100644
--- a/erpnext/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt
+++ b/erpnext/accounts/Print Format/Sales Invoice Modern/Sales Invoice Modern.txt
@@ -3,26 +3,26 @@
# These values are common in all dictionaries
{
- 'creation': '2011-12-21 11:02:04',
+ 'creation': '2012-01-13 11:41:18',
'docstatus': 0,
- 'modified': '2012-01-06 14:18:11',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-03-01 13:36:24',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all Print Format
{
- 'doc_type': 'Receivable Voucher',
+ 'doc_type': u'Receivable Voucher',
'doctype': 'Print Format',
- 'html': '<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: "Helvetica", "Arial", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t\tline-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: "Helvetica", "Arial", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t\tborder-style: none !important;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t\tborder-style: none !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h1 {\n\t\ttext-transform: uppercase;\n\t\tcolor: white;\n\t\tfont-size: 55px;\n\t\tfont-style: italic;\n\t}\n\n\ttable.header-table thead tr:nth-child(1) div {\n\t\theight: 24px;\n\t\tbackground-color: #696969;\n\t\tvertical-align: middle;\n\t\tpadding: 12px 0px 0px 0px;\n\t\twidth: 100%;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body table tr td {\n\t\tbackground-color: #DCDCDC !important;\n\t}\n\n\tdiv.page-body table tr:nth-child(1) td {\n\t\tbackground-color: #696969 !important;\n\t\tcolor: white !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table tfoot td {\n\t\tbackground-color: #696969;\n\t\theight: 10px;\n\t}\n\n\t.imp-details {\n\t\tbackground-color: #DCDCDC;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t\'Receivable Voucher\',\n\t\t\t\tdoc.name,\n\t\t\t\t\'entries\',\n\t\t\t\t\'RV Detail\',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t\'SR\', \'item_name\', \'description\', \'qty\', \'stock_uom\',\n\t\t\t\t\t\'export_rate\', \'export_amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t\'Sr\', \'Item Name\', \'Description\', \'Qty\',\n\t\t\t\t\t\'UoM\', \'Basic Rate\', \'Amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t\'3%\', \'20%\', \'37%\', \'5%\',\n\t\t\t\t\t\'5%\', \'15%\', \'15%\'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t\'description\' : function(data_row) {\n\t\t\t\t\t\tif(data_row.adj_rate) {\n\t\t\t\t\t\t\tvar to_append = \'<div style="padding-left: 15px;"><i>Discount: \' + \n\t\t\t\t\t\t\t\tdata_row.adj_rate + \'% on \' + doc.currency + \' \' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + \'</i></div>\';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = \'\';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t\'<div style = "page-break-after: always;" \\\n\t\t\t\t\t\tclass = "page_break"></div>\\\n\t\t\t\t\t\t<div class="page-settings"></div>\';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren(\'RV Tax Detail\', doc.name, \'other_charges\');\n\t\t\tvar rows = \'<table width=100%>\\n\';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t\'<tr>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td>\' + oc[i].description + \'</td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td></td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td width=38%>\' + fmt_money(oc[i].tax_amount) + \'</td>\\n\' +\n\t\t\t\t\t\t\'</tr>\\n\';\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rows + \'</table>\\n\';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class=\'common page-header\'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class=\'header-table\' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><div><script>\'<h1>\' + (doc.select_print_heading || \'Invoice\') + \'</h1>\'</script></div></td></tr>\n\t\t\t<tr><td colspan=2><div style="height:15px"></div></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr class=\'imp-details\'>\n\t\t\t\t\t\t<td><b>Invoice No.</b></td>\n\t\t\t\t\t\t<td><script>cur_frm.docname</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.voucher_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class=\'common page-body\'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class=\'common page-footer\'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class=\'footer-table\' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style=\'padding-right: 10px;\'>\n\t\t\t\t\t<b>Terms, Conditions & Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style=\'font-weight: bold\' class=\'imp-details\'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\t<tr><td colspan=2><div></div></td><tr>\n\t\t</tfoot>\n\t</table>\n</div>\n',
- 'module': 'Accounts',
+ 'html': u'<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: "Helvetica", "Arial", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t\tline-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: "Helvetica", "Arial", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 10px 0px;\n\t}\n\n\ttable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t\tvertical-align: top;\n\t\tborder-style: none !important;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t\tborder-style: none !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h1 {\n\t\ttext-transform: uppercase;\n\t\tcolor: white;\n\t\tfont-size: 55px;\n\t\tfont-style: italic;\n\t}\n\n\ttable.header-table thead tr:nth-child(1) div {\n\t\theight: 24px;\n\t\tbackground-color: #696969;\n\t\tvertical-align: middle;\n\t\tpadding: 12px 0px 0px 0px;\n\t\twidth: 100%;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body table tr td {\n\t\tbackground-color: #DCDCDC !important;\n\t}\n\n\tdiv.page-body table tr:nth-child(1) td {\n\t\tbackground-color: #696969 !important;\n\t\tcolor: white !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n\n\ttable.footer-table tfoot td {\n\t\tbackground-color: #696969;\n\t\theight: 10px;\n\t}\n\n\t.imp-details {\n\t\tbackground-color: #DCDCDC;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t\'Receivable Voucher\',\n\t\t\t\tdoc.name,\n\t\t\t\t\'entries\',\n\t\t\t\t\'RV Detail\',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t\'SR\', \'item_name\', \'description\', \'qty\', \'stock_uom\',\n\t\t\t\t\t\'export_rate\', \'export_amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t\'Sr\', \'Item Name\', \'Description\', \'Qty\',\n\t\t\t\t\t\'UoM\', \'Basic Rate\', \'Amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t\'3%\', \'20%\', \'37%\', \'5%\',\n\t\t\t\t\t\'5%\', \'15%\', \'15%\'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t\'description\' : function(data_row) {\n\t\t\t\t\t\tif(data_row.adj_rate) {\n\t\t\t\t\t\t\tvar to_append = \'<div style="padding-left: 15px;"><i>Discount: \' + \n\t\t\t\t\t\t\t\tdata_row.adj_rate + \'% on \' + doc.currency + \' \' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + \'</i></div>\';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = \'\';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t\'<div style = "page-break-after: always;" \\\n\t\t\t\t\t\tclass = "page_break"></div>\\\n\t\t\t\t\t\t<div class="page-settings"></div>\';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren(\'RV Tax Detail\', doc.name, \'other_charges\');\n\t\t\tvar rows = \'<table width=100%>\\n\';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t\'<tr>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td>\' + oc[i].description + \'</td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td></td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td width=38%>\' + fmt_money(oc[i].tax_amount) + \'</td>\\n\' +\n\t\t\t\t\t\t\'</tr>\\n\';\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rows + \'</table>\\n\';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class=\'common page-header\'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class=\'header-table\' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><div><script>\'<h1>\' + (doc.select_print_heading || \'Invoice\') + \'</h1>\'</script></div></td></tr>\n\t\t\t<tr><td colspan=2><div style="height:15px"></div></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr class=\'imp-details\'>\n\t\t\t\t\t\t<td><b>Invoice No.</b></td>\n\t\t\t\t\t\t<td><script>cur_frm.docname</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.posting_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class=\'common page-body\'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class=\'common page-footer\'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class=\'footer-table\' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style=\'padding-right: 10px;\'>\n\t\t\t\t\t<b>Terms, Conditions & Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style=\'font-weight: bold\' class=\'imp-details\'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\t<tr><td colspan=2><div></div></td><tr>\n\t\t</tfoot>\n\t</table>\n</div>\n',
+ 'module': u'Accounts',
'name': '__common__',
- 'standard': 'Yes'
+ 'standard': u'Yes'
},
# Print Format, Sales Invoice Modern
{
'doctype': 'Print Format',
- 'name': 'Sales Invoice Modern'
+ 'name': u'Sales Invoice Modern'
}
]
\ No newline at end of file
diff --git a/erpnext/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt b/erpnext/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt
index dc85a5f..b91f5cd 100644
--- a/erpnext/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt
+++ b/erpnext/accounts/Print Format/Sales Invoice Spartan/Sales Invoice Spartan.txt
@@ -3,26 +3,26 @@
# These values are common in all dictionaries
{
- 'creation': '2011-12-21 11:02:04',
+ 'creation': '2012-01-13 11:41:18',
'docstatus': 0,
- 'modified': '2012-01-06 14:18:25',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-03-01 13:36:52',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all Print Format
{
- 'doc_type': 'Receivable Voucher',
+ 'doc_type': u'Receivable Voucher',
'doctype': 'Print Format',
- 'html': '<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: "Arial", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t\tline-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: "Arial", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 0px;\n\t}\n\n\ttable {\n\t\twidth: 100% !important;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\n\ttable, td {\n\t\tborder-collapse: collapse !important;\n\t\tpadding: 0px;\n\t\tmargin: 0px !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px;\n\t}\n\n\ttable.header-table > thead,\n\ttable.header-table > tbody > tr > td,\n\ttable.footer-table > tbody > tr > td {\n\t\tborder: 1px solid black;\n\t\tpadding: 5px;\n\t}\n\n\ttable.footer-table > tbody,\n\ttable.header-table > thead {\n\t\tborder-bottom: 3px solid black;\n\t}\n\n\ttable.header-table > thead {\n\t\tborder-top: 3px solid black;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body td {\n\t\tbackground-color: white !important;\n\t\tborder: 1px solid black !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t\'Receivable Voucher\',\n\t\t\t\tdoc.name,\n\t\t\t\t\'entries\',\n\t\t\t\t\'RV Detail\',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t\'SR\', \'item_name\', \'description\', \'qty\', \'stock_uom\',\n\t\t\t\t\t\'export_rate\', \'export_amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t\'Sr\', \'Item Name\', \'Description\', \'Qty\',\n\t\t\t\t\t\'UoM\', \'Basic Rate\', \'Amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t\'3%\', \'20%\', \'37%\', \'5%\',\n\t\t\t\t\t\'5%\', \'15%\', \'15%\'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t\'description\' : function(data_row) {\n\t\t\t\t\t\tif(data_row.adj_rate) {\n\t\t\t\t\t\t\tvar to_append = \'<div style="padding-left: 15px;"><i>Discount: \' + \n\t\t\t\t\t\t\t\tdata_row.adj_rate + \'% on \' + doc.currency + \' \' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + \'</i></div>\';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = \'\';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t\'<div style = "page-break-after: always;" \\\n\t\t\t\t\t\tclass = "page_break"></div>\\\n\t\t\t\t\t\t<div class="page-settings"></div>\';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren(\'RV Tax Detail\', doc.name, \'other_charges\');\n\t\t\tvar rows = \'<table width=100%>\\n\';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t\'<tr>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td>\' + oc[i].description + \'</td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td></td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td width=38%>\' + fmt_money(oc[i].tax_amount) + \'</td>\\n\' +\n\t\t\t\t\t\t\'</tr>\\n\';\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rows + \'</table>\\n\';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class=\'common page-header\'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class=\'header-table\' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><script>\'<h1>\' + (doc.select_print_heading || \'Invoice\') + \'</h1>\'</script></td></tr>\n\t\t\t<tr><td colspan=2><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.voucher_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class=\'common page-body\'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class=\'common page-footer\'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class=\'footer-table\' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style=\'padding-right: 10px;\'>\n\t\t\t\t\t<b>Terms, Conditions & Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style=\'font-weight: bold\'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n',
- 'module': 'Accounts',
+ 'html': u'<!--\n\tSample Print Format for ERPNext\n\tPlease use at your own discretion\n\tFor suggestions and contributions:\n\t\thttps://github.com/webnotes/erpnext-print-templates\n\n\tFreely usable under MIT license\n-->\n\n<!-- Style Settings -->\n<style>\n\t/*\n\t\tcommon style for whole page\n\t\tThis should include:\n\t\t+ page size related settings\n\t\t+ font family settings\n\t\t+ line spacing settings\n\t*/\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 8.3in;\n\t\t}\n\t}\n\n\thtml, body, div, span, td {\n\t\tfont-family: "Arial", sans-serif;\n\t\tfont-size: 12px;\n\t}\n\n\tbody {\n\t\tpadding: 10px;\n\t\tmargin: auto;\n\t\tfont-size: 12px;\n\t\tline-height: 150%;\n\t}\n\n\t.common {\n\t\tfont-family: "Arial", sans-serif !important;\n\t\tfont-size: 12px;\n\t\tpadding: 0px;\n\t}\n\n\ttable {\n\t\twidth: 100% !important;\n\t\tvertical-align: top;\n\t}\n\n\ttable td {\n\t\tpadding: 2px 0px;\n\t}\n\n\ttable, td {\n\t\tborder-collapse: collapse !important;\n\t\tpadding: 0px;\n\t\tmargin: 0px !important;\n\t}\n\t\n\ttable h1, h2, h3, h4, h5, h6 {\n\t\tpadding: 0px;\n\t\tmargin: 0px;\n\t}\n\n\ttable.header-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.header-table h3 {\n\t\tcolor: gray;\n\t}\n\n\ttable.header-table thead td {\n\t\tpadding: 5px;\n\t}\n\n\ttable.header-table > thead,\n\ttable.header-table > tbody > tr > td,\n\ttable.footer-table > tbody > tr > td {\n\t\tborder: 1px solid black;\n\t\tpadding: 5px;\n\t}\n\n\ttable.footer-table > tbody,\n\ttable.header-table > thead {\n\t\tborder-bottom: 3px solid black;\n\t}\n\n\ttable.header-table > thead {\n\t\tborder-top: 3px solid black;\n\t}\n\n\tdiv.page-body table td:nth-child(6),\n\tdiv.page-body table td:nth-child(7) {\n\t\ttext-align: right;\n\t}\n\n\tdiv.page-body td {\n\t\tbackground-color: white !important;\n\t\tborder: 1px solid black !important;\n\t}\n\n\ttable.footer-table td {\n\t\tvertical-align: top;\n\t}\n\n\ttable.footer-table td table td:nth-child(2),\n\ttable.footer-table td table td:nth-child(3) {\n\t\ttext-align: right;\n\t}\n</style>\n\n\n<!-- Javascript -->\n<script>\n\tsi_std = {\n\t\tprint_item_table: function() {\n\t\t\tvar table = print_table(\n\t\t\t\t\'Receivable Voucher\',\n\t\t\t\tdoc.name,\n\t\t\t\t\'entries\',\n\t\t\t\t\'RV Detail\',\n\t\t\t\t[// Here specify the table columns to be displayed\n\t\t\t\t\t\'SR\', \'item_name\', \'description\', \'qty\', \'stock_uom\',\n\t\t\t\t\t\'export_rate\', \'export_amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the labels of column headings\n\t\t\t\t\t\'Sr\', \'Item Name\', \'Description\', \'Qty\',\n\t\t\t\t\t\'UoM\', \'Basic Rate\', \'Amount\'\n\t\t\t\t],\n\t\t\t\t[// Here specify the column widths\n\t\t\t\t\t\'3%\', \'20%\', \'37%\', \'5%\',\n\t\t\t\t\t\'5%\', \'15%\', \'15%\'\n\t\t\t\t],\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t{\n\t\t\t\t\t\'description\' : function(data_row) {\n\t\t\t\t\t\tif(data_row.adj_rate) {\n\t\t\t\t\t\t\tvar to_append = \'<div style="padding-left: 15px;"><i>Discount: \' + \n\t\t\t\t\t\t\t\tdata_row.adj_rate + \'% on \' + doc.currency + \' \' +\n\t\t\t\t\t\t\t\tfmt_money(data_row.ref_rate) + \'</i></div>\';\n\t\t\t\t\t\t\tif(data_row.description.indexOf(to_append)==-1) {\n\t\t\t\t\t\t\t\treturn data_row.description + to_append;\n\t\t\t\t\t\t\t} else { return data_row.description; }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn data_row.description;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\n\t\t\t// This code takes care of page breaks\n\t\t\tif(table.appendChild) {\n\t\t\t\tout = table.innerHTML;\n\t\t\t} else {\n\t\t\t\tout = \'\';\n\t\t\t\tfor(var i=0; i < (table.length-1); i++) {\n\t\t\t\t\tout += table[i].innerHTML + \n\t\t\t\t\t\t\'<div style = "page-break-after: always;" \\\n\t\t\t\t\t\tclass = "page_break"></div>\\\n\t\t\t\t\t\t<div class="page-settings"></div>\';\n\t\t\t\t}\n\t\t\t\tout += table[table.length-1].innerHTML;\n\t\t\t}\n\t\t\treturn out;\n\t\t},\n\n\n\t\tprint_other_charges: function(parent) {\n\t\t\tvar oc = getchildren(\'RV Tax Detail\', doc.name, \'other_charges\');\n\t\t\tvar rows = \'<table width=100%>\\n\';\n\t\t\tfor(var i=0; i<oc.length; i++) {\n\t\t\t\tif(!oc[i].included_in_print_rate) {\n\t\t\t\t\trows +=\n\t\t\t\t\t\t\'<tr>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td>\' + oc[i].description + \'</td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td></td>\\n\' +\n\t\t\t\t\t\t\t\'\\t<td width=38%>\' + fmt_money(oc[i].tax_amount) + \'</td>\\n\' +\n\t\t\t\t\t\t\'</tr>\\n\';\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rows + \'</table>\\n\';\n\t\t}\n\t};\n</script>\n\n\n<!-- Page Layout Settings -->\n<div class=\'common page-header\'>\n\t<!-- \n\t\tPage Header will contain\n\t\t\t+ table 1\n\t\t\t\t+ table 1a\n\t\t\t\t\t- Name\n\t\t\t\t\t- Address\n\t\t\t\t\t- Contact\n\t\t\t\t\t- Mobile No\n\t\t\t\t+ table 1b\n\t\t\t\t\t- Voucher Date\n\t\t\t\t\t- Due Date\n\t-->\n\t<table class=\'header-table\' cellspacing=0>\n\t\t<thead>\n\t\t\t<tr><td colspan=2><script>\'<h1>\' + (doc.select_print_heading || \'Invoice\') + \'</h1>\'</script></td></tr>\n\t\t\t<tr><td colspan=2><h3><script>cur_frm.docname</script></h3></td></tr>\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60%><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=39%><b>Name</b></td>\n\t\t\t\t\t\t<td><script>doc.customer_name</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Address</b></td>\n\t\t\t\t\t\t<td><script>replace_newlines(doc.address_display)</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Contact</b></td>\n\t\t\t\t\t\t<td><script>doc.contact_display</script></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody></table></td>\n\t\t\t\t<td><table width=100% cellspacing=0><tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=40%><b>Invoice Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.posting_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Due Date</b></td>\n\t\t\t\t\t\t<td><script>date.str_to_user(doc.due_date)</script></td>\n\t\t\t\t\t<tr>\t\t\t\t\t\n\t\t\t\t</tbody></table></td>\n\t\t\t</tr>\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n<div class=\'common page-body\'>\n\t<!-- \n\t\tPage Body will contain\n\t\t\t+ table 2\n\t\t\t\t- Sales Invoice Data\n\t-->\n\t<script>si_std.print_item_table()</script>\n</div>\n<div class=\'common page-footer\'>\n\t<!-- \n\t\tPage Footer will contain\n\t\t\t+ table 3\n\t\t\t\t- Terms and Conditions\n\t\t\t\t- Total Rounded Amount Calculation\n\t\t\t\t- Total Rounded Amount in Words\n\t-->\n\t<table class=\'footer-table\' width=100% cellspacing=0>\n\t\t<thead>\n\t\t\t\n\t\t</thead>\n\t\t<tbody>\n\t\t\t<tr>\n\t\t\t\t<td width=60% style=\'padding-right: 10px;\'>\n\t\t\t\t\t<b>Terms, Conditions & Other Information:</b><br />\n\t\t\t\t\t<script>doc.terms</script>\n\t\t\t\t</td>\n\t\t\t\t<td>\n\t\t\t\t\t<table cellspacing=0 width=100%><tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Net Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td width=38%><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.net_total/doc.conversion_rate)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td colspan=3><script>si_std.print_other_charges()</script></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>Grand Total</td>\n\t\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.grand_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style=\'font-weight: bold\'>\n\t\t\t\t\t\t\t<td>Rounded Total</td>\n\t\t\t\t\t\t\t<td><script>doc.currency</script></td>\n\t\t\t\t\t\t\t<td><script>\n\t\t\t\t\t\t\t\tfmt_money(doc.rounded_total_export)\n\t\t\t\t\t\t\t</script></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody></table>\n\t\t\t\t\t<br /><b>In Words</b><br />\n\t\t\t\t\t<i><script>doc.in_words_export</script></i>\n\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t</tbody>\n\t\t<tfoot>\n\t\t\n\t\t</tfoot>\n\t</table>\n</div>\n',
+ 'module': u'Accounts',
'name': '__common__',
- 'standard': 'Yes'
+ 'standard': u'Yes'
},
# Print Format, Sales Invoice Spartan
{
'doctype': 'Print Format',
- 'name': 'Sales Invoice Spartan'
+ 'name': u'Sales Invoice Spartan'
}
]
\ No newline at end of file
diff --git a/erpnext/accounts/__init__.py b/erpnext/accounts/__init__.py
index 65d0231..44d6aec 100644
--- a/erpnext/accounts/__init__.py
+++ b/erpnext/accounts/__init__.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import flt
from webnotes.model.code import get_obj
diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js
index b07bb9c..32f60c7 100644
--- a/erpnext/accounts/doctype/account/account.js
+++ b/erpnext/accounts/doctype/account/account.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// Fetch parent details
// -----------------------------------------
cur_frm.add_fetch('parent_account', 'debit_or_credit', 'debit_or_credit');
diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py
index 4cfd64d..e3c1977 100644
--- a/erpnext/accounts/doctype/account/account.py
+++ b/erpnext/accounts/doctype/account/account.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
index 5c5dece..73e767b 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc, cdt, cdn){
// add page head
var ph = new PageHeader(cur_frm.fields_dict['Head HTML'].wrapper, 'Bank Reconciliation', '');
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
index 3ba477b..6220535 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/accounts/doctype/budget_control/budget_control.py b/erpnext/accounts/doctype/budget_control/budget_control.py
index ec28bfc..65871c6 100644
--- a/erpnext/accounts/doctype/budget_control/budget_control.py
+++ b/erpnext/accounts/doctype/budget_control/budget_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/accounts/doctype/budget_distribution/budget_distribution.js b/erpnext/accounts/doctype/budget_distribution/budget_distribution.js
index 03e36f7..84726e8 100644
--- a/erpnext/accounts/doctype/budget_distribution/budget_distribution.js
+++ b/erpnext/accounts/doctype/budget_distribution/budget_distribution.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc,cdt,cdn){
if(doc.__islocal){
var callback1 = function(r,rt){
diff --git a/erpnext/accounts/doctype/budget_distribution/budget_distribution.py b/erpnext/accounts/doctype/budget_distribution/budget_distribution.py
index 1ac1b8b..c1cabf9 100644
--- a/erpnext/accounts/doctype/budget_distribution/budget_distribution.py
+++ b/erpnext/accounts/doctype/budget_distribution/budget_distribution.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/accounts/doctype/c_form/c_form.js b/erpnext/accounts/doctype/c_form/c_form.js
index 6629de6..82adf29 100644
--- a/erpnext/accounts/doctype/c_form/c_form.js
+++ b/erpnext/accounts/doctype/c_form/c_form.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//c-form js file
// -----------------------------
cur_frm.fields_dict.invoice_details.grid.get_field("invoice_no").get_query = function(doc) {
diff --git a/erpnext/accounts/doctype/c_form/c_form.py b/erpnext/accounts/doctype/c_form/c_form.py
index 7228f11..367b27a 100644
--- a/erpnext/accounts/doctype/c_form/c_form.py
+++ b/erpnext/accounts/doctype/c_form/c_form.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
from webnotes.utils import add_days, cint, cstr, date_diff, default_fields, flt, getdate, now, nowdate
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.js b/erpnext/accounts/doctype/cost_center/cost_center.js
index 58f39e0..180836a 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.js
+++ b/erpnext/accounts/doctype/cost_center/cost_center.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//Account filtering for cost center
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.py b/erpnext/accounts/doctype/cost_center/cost_center.py
index b97274f..e87756f 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.py
+++ b/erpnext/accounts/doctype/cost_center/cost_center.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.js b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js
new file mode 100644
index 0000000..fdc25fe
--- /dev/null
+++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.js
@@ -0,0 +1,7 @@
+cur_frm.cscript.refresh = function(doc, dt, dn) {
+ if (doc.__islocal) {
+ hide_field(['Repost Account Balances', 'Repost Voucher Outstanding']);
+ set_multiple(dt, dn, {'is_fiscal_year_closed': 'No'});
+ }
+ else unhide_field(['Repost Account Balances', 'Repost Voucher Outstanding']);
+}
diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py
index 74b90cc..84a1c05 100644
--- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py
+++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
@@ -27,10 +43,10 @@
if not in_transaction:
sql("start transaction")
-
+
self.clear_account_balances()
self.create_account_balances()
- self.update_opening()
+ self.update_opening(self.doc.company)
self.post_entries()
sql("commit")
@@ -81,17 +97,17 @@
return periods
# ====================================================================================
- def update_opening(self):
+ def update_opening(self, company):
"""
set opening from last year closing
"""
- abl = sql("select t1.account, t1.balance from `tabAccount Balance` t1, tabAccount t2 where t1.period= '%s' and t2.company= '%s' and ifnull(t2.is_pl_account, 'No') = 'No' and t1.account = t2.name for update" % (self.doc.past_year, self.doc.company))
+ abl = sql("select t1.account, t1.balance from `tabAccount Balance` t1, tabAccount t2 where t1.period= '%s' and t2.company= '%s' and ifnull(t2.is_pl_account, 'No') = 'No' and t1.account = t2.name for update" % (self.doc.past_year, company))
cnt = 0
for ab in abl:
- if cnt % 100 == 0:
+ if cnt % 100 == 0:
sql("commit")
sql("start transaction")
@@ -184,10 +200,19 @@
def create_periods(self):
get_obj('Period Control').generate_periods(self.doc.name)
+ def validate(self):
+ if sql("select name from `tabFiscal Year` where year_start_date < %s", self.doc.year_start_date) and not self.doc.past_year:
+ msgprint("Please enter Past Year", raise_exception=1)
+
+ if not self.doc.is_fiscal_year_closed:
+ self.doc.is_fiscal_year_closed = 'No'
+
+
# on update
def on_update(self):
- if not self.doc.is_fiscal_year_closed:
- self.is_fiscal_year_closed = 'No'
- self.doc.save()
self.create_periods()
self.create_account_balances()
+
+ if self.doc.fields.get('localname', '')[:15] == 'New Fiscal Year':
+ for d in sql("select name from tabCompany"):
+ self.update_opening(d[0])
diff --git a/erpnext/accounts/doctype/form_16a/form_16a.js b/erpnext/accounts/doctype/form_16a/form_16a.js
index 75af394..503681b 100644
--- a/erpnext/accounts/doctype/form_16a/form_16a.js
+++ b/erpnext/accounts/doctype/form_16a/form_16a.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc,cdt,cdn){
if(doc.company)get_server_fields('get_registration_details','','',doc,cdt,cdn,1);
}
diff --git a/erpnext/accounts/doctype/form_16a/form_16a.py b/erpnext/accounts/doctype/form_16a/form_16a.py
index 018b834..4de582d 100644
--- a/erpnext/accounts/doctype/form_16a/form_16a.py
+++ b/erpnext/accounts/doctype/form_16a/form_16a.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/accounts/doctype/gl_control/gl_control.py b/erpnext/accounts/doctype/gl_control/gl_control.py
index 001df84..c64d64e 100644
--- a/erpnext/accounts/doctype/gl_control/gl_control.py
+++ b/erpnext/accounts/doctype/gl_control/gl_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py
index 3892007..49b0593 100644
--- a/erpnext/accounts/doctype/gl_entry/gl_entry.py
+++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
@@ -137,15 +153,16 @@
# amount to debit
amt = flt(self.doc.debit) - flt(self.doc.credit)
if det[0][2] == 'Credit': amt = -amt
+
if cancel:
debit = -1 * flt(self.doc.credit)
credit = -1 * flt(self.doc.debit)
else:
debit = flt(self.doc.debit)
credit = flt(self.doc.credit)
-
+
self.create_new_balances(det)
-
+
# build dict
p = {
'debit': self.doc.is_opening=='No' and flt(debit) or 0
@@ -160,6 +177,7 @@
,'fiscal_year': self.doc.fiscal_year
}
+ # Update account balance for current year
sql("""update `tabAccount Balance` ab, `tabAccount` a
set
ab.debit = ifnull(ab.debit,0) + %(debit)s
@@ -173,6 +191,34 @@
%(end_date_condition)s
and ab.fiscal_year = '%(fiscal_year)s' """ % p)
+ # Future year balances
+ # Update opening only where period_type is Year
+ sql("""update `tabAccount Balance` ab, `tabAccount` a, `tabFiscal Year` fy
+ set
+ ab.opening = ifnull(ab.opening,0) + %(diff)s
+ where
+ a.lft <= %(lft)s
+ and a.rgt >= %(rgt)s
+ and ab.account = a.name
+ and ifnull(a.is_pl_account, 'No') = 'No'
+ and ab.period = ab.fiscal_year
+ and fy.name = ab.fiscal_year
+ and fy.year_start_date > '%(posting_date)s'""" % p)
+
+ # Update balance for all period for future years
+ sql("""update `tabAccount Balance` ab, `tabAccount` a, `tabFiscal Year` fy
+ set
+ ab.balance = ifnull(ab.balance,0) + %(diff)s
+ where
+ a.lft <= %(lft)s
+ and a.rgt >= %(rgt)s
+ and ab.account = a.name
+ and ifnull(a.is_pl_account, 'No') = 'No'
+ and fy.name = ab.fiscal_year
+ and fy.year_start_date > '%(posting_date)s'""" % p)
+
+
+
# Get periods(month and year)
#-----------------------------
diff --git a/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.js b/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.js
index a5ec2b6..4057f7e 100644
--- a/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.js
+++ b/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// Booking Entry Id
// --------------------
diff --git a/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.py b/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.py
index 24a7db5..0ab0e05 100644
--- a/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.py
+++ b/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/accounts/doctype/internal_reconciliation/test_ir.py b/erpnext/accounts/doctype/internal_reconciliation/test_ir.py
index b35af6e..c5aa935 100644
--- a/erpnext/accounts/doctype/internal_reconciliation/test_ir.py
+++ b/erpnext/accounts/doctype/internal_reconciliation/test_ir.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import unittest
import webnotes
diff --git a/erpnext/accounts/doctype/journal_voucher/journal_voucher.js b/erpnext/accounts/doctype/journal_voucher/journal_voucher.js
index 699d17b..771f026 100644
--- a/erpnext/accounts/doctype/journal_voucher/journal_voucher.js
+++ b/erpnext/accounts/doctype/journal_voucher/journal_voucher.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc, cdt, cdn) {
var cp = wn.control_panel;
diff --git a/erpnext/accounts/doctype/journal_voucher/journal_voucher.py b/erpnext/accounts/doctype/journal_voucher/journal_voucher.py
index 5942ca1..a5b2abf 100644
--- a/erpnext/accounts/doctype/journal_voucher/journal_voucher.py
+++ b/erpnext/accounts/doctype/journal_voucher/journal_voucher.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/accounts/doctype/lease_agreement/lease_agreement.js b/erpnext/accounts/doctype/lease_agreement/lease_agreement.js
index 7b90be9..1453528 100644
--- a/erpnext/accounts/doctype/lease_agreement/lease_agreement.js
+++ b/erpnext/accounts/doctype/lease_agreement/lease_agreement.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
$.extend(cur_frm.cscript, {
Generate: function(doc, dt, dn) {
if(doc.installment_amount==''){
diff --git a/erpnext/accounts/doctype/lease_agreement/lease_agreement.py b/erpnext/accounts/doctype/lease_agreement/lease_agreement.py
index dd63c2e..1da2f05 100644
--- a/erpnext/accounts/doctype/lease_agreement/lease_agreement.py
+++ b/erpnext/accounts/doctype/lease_agreement/lease_agreement.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.model.doc import make_autoname, Document, addchild
from webnotes import msgprint
diff --git a/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.js b/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.js
index 0095b03..10b1bc1 100755
--- a/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.js
+++ b/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript['Export Report'] = function(doc, cdt, cdn) {
$c_obj_csv(make_doclist(cdt, cdn), 'get_report_data', '');
}
diff --git a/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.py b/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.py
index e9a9505..b790d06 100755
--- a/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.py
+++ b/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import add_days, cint, cstr, flt, getdate
from webnotes.model.doclist import getlist
diff --git a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js
index 6ffef4a..3cad944 100644
--- a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js
+++ b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/accounts/doctype/payable_voucher/payable_voucher.js b/erpnext/accounts/doctype/payable_voucher/payable_voucher.js
index dee9510..99bd24c 100644
--- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.js
+++ b/erpnext/accounts/doctype/payable_voucher/payable_voucher.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.tname = "PV Detail";
cur_frm.cscript.fname = "entries";
cur_frm.cscript.other_fname = "purchase_tax_details";
@@ -29,11 +45,14 @@
//------------------------
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
var callback = function(doc, dt, dn) {
- if(doc.__islocal && doc.supplier) cur_frm.cscript.supplier(doc,dt,dn);
+ var callback1 = function(doc, dt, dn) {
+ if(doc.__islocal && doc.supplier) cur_frm.cscript.supplier(doc,dt,dn);
+ }
+
+ // defined in purchase_common.js
+ cur_frm.cscript.update_item_details(doc, dt, dn, callback1);
}
-
- // defined in purchase_common.js
- cur_frm.cscript.update_item_details(doc, cdt, cdn, callback);
+ cur_frm.cscript.dynamic_label(doc, dt, dn, callback);
}
// Refresh
@@ -42,6 +61,9 @@
cur_frm.clear_custom_buttons();
+ if (!cur_frm.cscript.is_onload) cur_frm.cscript.dynamic_label(doc, dt, dn);
+
+
// Show / Hide button
if(doc.docstatus==1 && doc.outstanding_amount > 0)
cur_frm.add_custom_button('Make Payment Entry', cur_frm.cscript['Make Bank Voucher']);
diff --git a/erpnext/accounts/doctype/payable_voucher/payable_voucher.py b/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
index 14d5e5e..1a09a45 100644
--- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
+++ b/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
@@ -150,7 +166,8 @@
rate = sql("select tax_rate from `tabAccount` where name='%s'"%(acc))
ret={'add_tax_rate' :rate and flt(rate[0][0]) or 0 }
return ret
-
+
+
# *************************** Server Utility Functions *****************************
# Get Company abbr
diff --git a/erpnext/accounts/doctype/payable_voucher/payable_voucher.txt b/erpnext/accounts/doctype/payable_voucher/payable_voucher.txt
index 93014ec..53466e1 100755
--- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.txt
+++ b/erpnext/accounts/doctype/payable_voucher/payable_voucher.txt
@@ -5,51 +5,51 @@
{
'creation': '2010-08-08 17:09:11',
'docstatus': 0,
- 'modified': '2011-11-24 15:17:14',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-27 18:25:38',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocType
{
- '_last_update': '1321601347',
- 'colour': 'White:FFF',
- 'default_print_format': 'Standard',
+ '_last_update': u'1330345793',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
- 'module': 'Accounts',
+ 'module': u'Accounts',
'name': '__common__',
'read_only_onload': 1,
- 'search_fields': 'posting_date, credit_to, fiscal_year, bill_no, grand_total, outstanding_amount',
- 'section_style': 'Tabbed',
- 'server_code_error': ' ',
+ 'search_fields': u'posting_date, credit_to, fiscal_year, bill_no, grand_total, outstanding_amount',
+ 'section_style': u'Tabbed',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'subject': 'From %(supplier_name)s worth %(grand_total)s due on %(due_date)s | %(outstanding_amount)s outstanding',
- 'version': 522
+ 'subject': u'From %(supplier_name)s worth %(grand_total)s due on %(due_date)s | %(outstanding_amount)s outstanding',
+ 'version': 520
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Payable Voucher',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'Payable Voucher',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'name': '__common__',
- 'parent': 'Payable Voucher',
- 'parentfield': 'permissions',
- 'parenttype': 'DocType',
+ 'parent': u'Payable Voucher',
+ 'parentfield': u'permissions',
+ 'parenttype': u'DocType',
'read': 1
},
# DocType, Payable Voucher
{
'doctype': 'DocType',
- 'name': 'Payable Voucher'
+ 'name': u'Payable Voucher'
},
# DocPerm
@@ -57,9 +57,9 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Accounts Manager',
+ 'role': u'Accounts Manager',
'submit': 0,
'write': 0
},
@@ -69,9 +69,9 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Accounts Manager',
+ 'role': u'Accounts Manager',
'submit': 1,
'write': 1
},
@@ -81,18 +81,18 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Accounts User',
+ 'role': u'Accounts User',
'submit': 0,
'write': 0
},
# DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Purchase User'
+ 'role': u'Purchase User'
},
# DocPerm
@@ -100,9 +100,9 @@
'amend': 0,
'cancel': 0,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Purchase User',
+ 'role': u'Purchase User',
'submit': 0,
'write': 1
},
@@ -112,52 +112,52 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Accounts User',
+ 'role': u'Accounts User',
'submit': 1,
'write': 1
},
# DocPerm
{
- 'doctype': 'DocPerm',
- 'match': 'supplier',
+ 'doctype': u'DocPerm',
+ 'match': u'supplier',
'permlevel': 0,
- 'role': 'Supplier'
+ 'role': u'Supplier'
},
# DocField
{
'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Basic Info',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Basic Info',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'To manage multiple series please go to Setup > Manage Series',
- 'doctype': 'DocField',
- 'fieldname': 'naming_series',
- 'fieldtype': 'Select',
- 'label': 'Series',
+ 'colour': u'White:FFF',
+ 'description': u'To manage multiple series please go to Setup > Manage Series',
+ 'doctype': u'DocField',
+ 'fieldname': u'naming_series',
+ 'fieldtype': u'Select',
+ 'label': u'Series',
'no_copy': 1,
- 'oldfieldname': 'naming_series',
- 'oldfieldtype': 'Select',
- 'options': 'BILL\nBILLJ',
+ 'oldfieldname': u'naming_series',
+ 'oldfieldtype': u'Select',
+ 'options': u'BILL\nBILLJ',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
@@ -166,141 +166,159 @@
# DocField
{
- 'description': 'The account to which you will pay (have paid) the money to.',
- 'doctype': 'DocField',
- 'fieldname': 'credit_to',
- 'fieldtype': 'Link',
+ 'description': u'The account to which you will pay (have paid) the money to.',
+ 'doctype': u'DocField',
+ 'fieldname': u'credit_to',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Credit To',
- 'oldfieldname': 'credit_to',
- 'oldfieldtype': 'Link',
- 'options': 'Account',
+ 'label': u'Credit To',
+ 'oldfieldname': u'credit_to',
+ 'oldfieldtype': u'Link',
+ 'options': u'Account',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'amended_from',
- 'fieldtype': 'Link',
- 'label': 'Amended From',
+ 'doctype': u'DocField',
+ 'fieldname': u'amended_from',
+ 'fieldtype': u'Link',
+ 'label': u'Amended From',
'no_copy': 1,
- 'oldfieldname': 'amended_from',
- 'oldfieldtype': 'Link',
- 'options': 'Payable Voucher',
+ 'oldfieldname': u'amended_from',
+ 'oldfieldtype': u'Link',
+ 'options': u'Payable Voucher',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'supplier',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'supplier',
+ 'fieldtype': u'Link',
'hidden': 0,
- 'label': 'Supplier',
- 'oldfieldname': 'supplier',
- 'oldfieldtype': 'Link',
- 'options': 'Supplier',
+ 'label': u'Supplier',
+ 'oldfieldname': u'supplier',
+ 'oldfieldtype': u'Link',
+ 'options': u'Supplier',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'supplier_address',
- 'fieldtype': 'Link',
- 'label': 'Supplier Address',
+ 'doctype': u'DocField',
+ 'fieldname': u'supplier_address',
+ 'fieldtype': u'Link',
+ 'label': u'Supplier Address',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_person',
- 'fieldtype': 'Link',
- 'label': 'Contact Person',
- 'options': 'Contact',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_person',
+ 'fieldtype': u'Link',
+ 'label': u'Contact Person',
+ 'options': u'Contact',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'supplier_name',
- 'fieldtype': 'Text',
- 'label': 'Name',
- 'oldfieldname': 'supplier_name',
- 'oldfieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'supplier_name',
+ 'fieldtype': u'Text',
+ 'label': u'Name',
+ 'oldfieldname': u'supplier_name',
+ 'oldfieldtype': u'Data',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'address_display',
- 'fieldtype': 'Small Text',
- 'label': 'Address',
+ 'doctype': u'DocField',
+ 'fieldname': u'address_display',
+ 'fieldtype': u'Small Text',
+ 'label': u'Address',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_display',
- 'fieldtype': 'Small Text',
- 'label': 'Contact',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_display',
+ 'fieldtype': u'Small Text',
+ 'label': u'Contact',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_mobile',
- 'fieldtype': 'Text',
- 'label': 'Mobile No',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_mobile',
+ 'fieldtype': u'Text',
+ 'label': u'Mobile No',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_email',
- 'fieldtype': 'Text',
- 'label': 'Contact Email',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_email',
+ 'fieldtype': u'Text',
+ 'label': u'Contact Email',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
'reqd': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'default': 'Today',
- 'doctype': 'DocField',
- 'fieldname': 'voucher_date',
- 'fieldtype': 'Date',
+ 'default': u'Today',
+ 'description': u'The date at which current entry will get or has actually executed.',
+ 'doctype': u'DocField',
+ 'fieldname': u'posting_date',
+ 'fieldtype': u'Date',
'in_filter': 1,
- 'label': 'Voucher Date',
+ 'label': u'Posting Date',
'no_copy': 0,
- 'oldfieldname': 'voucher_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'posting_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 1,
+ 'search_index': 1
+ },
+
+ # DocField
+ {
+ 'default': u'Today',
+ 'doctype': u'DocField',
+ 'fieldname': u'voucher_date',
+ 'fieldtype': u'Date',
+ 'in_filter': 1,
+ 'label': u'Voucher Date',
+ 'no_copy': 0,
+ 'oldfieldname': u'voucher_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'reqd': 1,
'search_index': 1
@@ -308,14 +326,14 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'due_date',
- 'fieldtype': 'Date',
+ 'doctype': u'DocField',
+ 'fieldname': u'due_date',
+ 'fieldtype': u'Date',
'in_filter': 1,
- 'label': 'Due Date',
+ 'label': u'Due Date',
'no_copy': 0,
- 'oldfieldname': 'due_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'due_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 0,
'search_index': 1
@@ -323,16 +341,14 @@
# DocField
{
- 'default': 'Today',
- 'description': 'The date at which current entry will get or has actually executed.',
- 'doctype': 'DocField',
- 'fieldname': 'posting_date',
- 'fieldtype': 'Date',
+ 'description': u'If not applicable please enter: NA',
+ 'doctype': u'DocField',
+ 'fieldname': u'bill_no',
+ 'fieldtype': u'Data',
'in_filter': 1,
- 'label': 'Posting Date',
- 'no_copy': 0,
- 'oldfieldname': 'posting_date',
- 'oldfieldtype': 'Date',
+ 'label': u'Bill No',
+ 'oldfieldname': u'bill_no',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
@@ -341,29 +357,13 @@
# DocField
{
- 'description': 'If not applicable please enter: NA',
- 'doctype': 'DocField',
- 'fieldname': 'bill_no',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'bill_date',
+ 'fieldtype': u'Date',
'in_filter': 1,
- 'label': 'Bill No',
- 'oldfieldname': 'bill_no',
- 'oldfieldtype': 'Data',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1,
- 'search_index': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'bill_date',
- 'fieldtype': 'Date',
- 'in_filter': 1,
- 'label': 'Bill Date',
- 'oldfieldname': 'bill_date',
- 'oldfieldtype': 'Date',
+ 'label': u'Bill Date',
+ 'oldfieldname': u'bill_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
@@ -372,285 +372,286 @@
# DocField
{
- 'description': 'The date at which current entry is corrected in the system.',
- 'doctype': 'DocField',
- 'fieldname': 'amendment_date',
- 'fieldtype': 'Date',
- 'label': 'Amendment Date',
+ 'description': u'The date at which current entry is corrected in the system.',
+ 'doctype': u'DocField',
+ 'fieldname': u'amendment_date',
+ 'fieldtype': u'Date',
+ 'label': u'Amendment Date',
'no_copy': 1,
- 'oldfieldname': 'amendment_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'amendment_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'mode_of_payment',
- 'fieldtype': 'Select',
- 'label': 'Mode of Payment',
- 'oldfieldname': 'mode_of_payment',
- 'oldfieldtype': 'Select',
- 'options': 'link:Mode of Payment',
+ 'doctype': u'DocField',
+ 'fieldname': u'mode_of_payment',
+ 'fieldtype': u'Select',
+ 'label': u'Mode of Payment',
+ 'oldfieldname': u'mode_of_payment',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Mode of Payment',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Items',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Items',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Select Items from Purchase Order',
- 'doctype': 'DocField',
- 'fieldname': 'purchase_order_main',
- 'fieldtype': 'Link',
- 'label': 'Purchase Order',
- 'oldfieldname': 'purchase_order_main',
- 'oldfieldtype': 'Link',
- 'options': 'Purchase Order',
+ 'doctype': u'DocField',
+ 'fieldname': u'currency',
+ 'fieldtype': u'Select',
+ 'label': u'Bill Currency',
+ 'oldfieldname': u'currency',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Currency',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'default': u'1',
+ 'description': u"The rate at which Bill Currency is converted into company's base currency",
+ 'doctype': u'DocField',
+ 'fieldname': u'conversion_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Bill Conversion Rate',
+ 'oldfieldname': u'conversion_rate',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Select Items from Purchase Order',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_order_main',
+ 'fieldtype': u'Link',
+ 'label': u'Purchase Order',
+ 'oldfieldname': u'purchase_order_main',
+ 'oldfieldtype': u'Link',
+ 'options': u'Purchase Order',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Select Items from Purchase Receipt',
- 'doctype': 'DocField',
- 'fieldname': 'purchase_receipt_main',
- 'fieldtype': 'Link',
- 'label': 'Purchase Receipt',
- 'oldfieldname': 'purchase_receipt_main',
- 'oldfieldtype': 'Link',
- 'options': 'Purchase Receipt',
+ 'colour': u'White:FFF',
+ 'description': u'Select Items from Purchase Receipt',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_receipt_main',
+ 'fieldtype': u'Link',
+ 'label': u'Purchase Receipt',
+ 'oldfieldname': u'purchase_receipt_main',
+ 'oldfieldtype': u'Link',
+ 'options': u'Purchase Receipt',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Get Items',
- 'oldfieldtype': 'Button',
- 'options': 'pull_details',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Items',
+ 'oldfieldtype': u'Button',
+ 'options': u'pull_details',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'currency',
- 'fieldtype': 'Select',
- 'label': 'Bill Currency',
- 'oldfieldname': 'currency',
- 'oldfieldtype': 'Select',
- 'options': 'link:Currency',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'default': '1',
- 'doctype': 'DocField',
- 'fieldname': 'conversion_rate',
- 'fieldtype': 'Currency',
- 'label': 'Bill Conversion Rate',
- 'oldfieldname': 'conversion_rate',
- 'oldfieldtype': 'Currency',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'entries',
- 'fieldtype': 'Table',
- 'label': 'Entries',
- 'oldfieldname': 'entries',
- 'oldfieldtype': 'Table',
- 'options': 'PV Detail',
+ 'doctype': u'DocField',
+ 'fieldname': u'entries',
+ 'fieldtype': u'Table',
+ 'label': u'Entries',
+ 'oldfieldname': u'entries',
+ 'oldfieldtype': u'Table',
+ 'options': u'PV Detail',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Recalculate',
- 'oldfieldtype': 'Button',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Recalculate',
+ 'oldfieldtype': u'Button',
'permlevel': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'description': 'Will be calculated automatically when you enter the details',
- 'doctype': 'DocField',
- 'fieldname': 'net_total',
- 'fieldtype': 'Currency',
- 'label': 'Net Total',
- 'oldfieldname': 'net_total',
- 'oldfieldtype': 'Currency',
+ 'description': u'Will be calculated automatically when you enter the details',
+ 'doctype': u'DocField',
+ 'fieldname': u'net_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Net Total',
+ 'oldfieldname': u'net_total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Add / Edit taxes and other charges',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Taxes',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Add / Edit taxes and other charges',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Taxes',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'purchase_other_charges',
- 'fieldtype': 'Link',
- 'label': 'Purchase Other Charges',
- 'oldfieldname': 'purchase_other_charges',
- 'oldfieldtype': 'Link',
- 'options': 'Purchase Other Charges',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_other_charges',
+ 'fieldtype': u'Link',
+ 'label': u'Purchase Other Charges',
+ 'oldfieldname': u'purchase_other_charges',
+ 'oldfieldtype': u'Link',
+ 'options': u'Purchase Other Charges',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Get Tax Detail',
- 'oldfieldtype': 'Button',
- 'options': 'get_purchase_tax_details',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Tax Detail',
+ 'oldfieldtype': u'Button',
+ 'options': u'get_purchase_tax_details',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'purchase_tax_details',
- 'fieldtype': 'Table',
- 'label': 'Purchase Tax Details',
- 'oldfieldname': 'purchase_tax_details',
- 'oldfieldtype': 'Table',
- 'options': 'Purchase Tax Detail',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_tax_details',
+ 'fieldtype': u'Table',
+ 'label': u'Purchase Tax Details',
+ 'oldfieldname': u'purchase_tax_details',
+ 'oldfieldtype': u'Table',
+ 'options': u'Purchase Tax Detail',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Calculate Tax',
- 'oldfieldtype': 'Button',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Calculate Tax',
+ 'oldfieldtype': u'Button',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'Tax Calculation',
- 'oldfieldtype': 'HTML',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Tax Calculation',
+ 'oldfieldtype': u'HTML',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'total_tax',
- 'fieldtype': 'Currency',
- 'label': 'Total Tax',
- 'oldfieldname': 'total_tax',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'total_tax',
+ 'fieldtype': u'Currency',
+ 'label': u'Total Tax',
+ 'oldfieldname': u'total_tax',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'More Info',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'More Info',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
'print_hide': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'colour': 'White:FFF',
- 'default': 'No',
- 'doctype': 'DocField',
- 'fieldname': 'is_opening',
- 'fieldtype': 'Select',
+ 'colour': u'White:FFF',
+ 'default': u'No',
+ 'doctype': u'DocField',
+ 'fieldname': u'is_opening',
+ 'fieldtype': u'Select',
'in_filter': 1,
- 'label': 'Is Opening',
- 'oldfieldname': 'is_opening',
- 'oldfieldtype': 'Select',
- 'options': 'No\nYes',
+ 'label': u'Is Opening',
+ 'oldfieldname': u'is_opening',
+ 'oldfieldtype': u'Select',
+ 'options': u'No\nYes',
'permlevel': 0,
'print_hide': 1,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'aging_date',
- 'fieldtype': 'Date',
- 'label': 'Aging Date',
- 'oldfieldname': 'aging_date',
- 'oldfieldtype': 'Date',
+ 'doctype': u'DocField',
+ 'fieldname': u'aging_date',
+ 'fieldtype': u'Date',
+ 'label': u'Aging Date',
+ 'oldfieldname': u'aging_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'search_index': 0
@@ -659,40 +660,40 @@
# DocField
{
'allow_on_submit': 1,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'select_print_heading',
- 'fieldtype': 'Link',
- 'label': 'Select Print Heading',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'select_print_heading',
+ 'fieldtype': u'Link',
+ 'label': u'Select Print Heading',
'no_copy': 1,
- 'oldfieldname': 'select_print_heading',
- 'oldfieldtype': 'Link',
- 'options': 'Print Heading',
+ 'oldfieldname': u'select_print_heading',
+ 'oldfieldtype': u'Link',
+ 'options': u'Print Heading',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'company',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'company',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Company',
- 'oldfieldname': 'company',
- 'oldfieldtype': 'Link',
- 'options': 'Company',
+ 'label': u'Company',
+ 'oldfieldname': u'company',
+ 'oldfieldtype': u'Link',
+ 'options': u'Company',
'permlevel': 0,
'print_hide': 1,
'search_index': 1
@@ -700,14 +701,14 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'fiscal_year',
- 'fieldtype': 'Select',
+ 'doctype': u'DocField',
+ 'fieldname': u'fiscal_year',
+ 'fieldtype': u'Select',
'in_filter': 1,
- 'label': 'Fiscal Year',
- 'oldfieldname': 'fiscal_year',
- 'oldfieldtype': 'Select',
- 'options': 'link:Fiscal Year',
+ 'label': u'Fiscal Year',
+ 'oldfieldname': u'fiscal_year',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Fiscal Year',
'permlevel': 0,
'print_hide': 1,
'search_index': 1
@@ -715,28 +716,28 @@
# DocField
{
- 'colour': 'White:FFF',
- 'depends_on': 'eval:!doc.__islocal',
- 'doctype': 'DocField',
- 'fieldname': 'cancel_reason',
- 'fieldtype': 'Data',
- 'label': 'Cancel Reason',
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'doctype': u'DocField',
+ 'fieldname': u'cancel_reason',
+ 'fieldtype': u'Data',
+ 'label': u'Cancel Reason',
'no_copy': 1,
- 'oldfieldname': 'cancel_reason',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'cancel_reason',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'remarks',
- 'fieldtype': 'Small Text',
- 'label': 'Remarks',
+ 'doctype': u'DocField',
+ 'fieldname': u'remarks',
+ 'fieldtype': u'Small Text',
+ 'label': u'Remarks',
'no_copy': 1,
- 'oldfieldname': 'remarks',
- 'oldfieldtype': 'Text',
+ 'oldfieldname': u'remarks',
+ 'oldfieldtype': u'Text',
'permlevel': 0,
'print_hide': 1,
'reqd': 0
@@ -744,246 +745,246 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Advances',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Advances',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Get Advances Paid',
- 'oldfieldtype': 'Button',
- 'options': 'get_advances',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Advances Paid',
+ 'oldfieldtype': u'Button',
+ 'options': u'get_advances',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'advance_allocation_details',
- 'fieldtype': 'Table',
- 'label': 'Advance Allocation Details',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'advance_allocation_details',
+ 'fieldtype': u'Table',
+ 'label': u'Advance Allocation Details',
'no_copy': 1,
- 'oldfieldname': 'advance_allocation_details',
- 'oldfieldtype': 'Table',
- 'options': 'Advance Allocation Detail',
+ 'oldfieldname': u'advance_allocation_details',
+ 'oldfieldtype': u'Table',
+ 'options': u'Advance Allocation Detail',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'TDS',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'TDS',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'tds_applicable',
- 'fieldtype': 'Select',
- 'label': 'TDS Applicable',
- 'oldfieldname': 'tds_applicable',
- 'oldfieldtype': 'Select',
- 'options': '\nYes\nNo',
+ 'doctype': u'DocField',
+ 'fieldname': u'tds_applicable',
+ 'fieldtype': u'Select',
+ 'label': u'TDS Applicable',
+ 'oldfieldname': u'tds_applicable',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nYes\nNo',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'tds_category',
- 'fieldtype': 'Select',
- 'label': 'TDS Category',
- 'oldfieldname': 'tds_category',
- 'oldfieldtype': 'Select',
- 'options': 'link:TDS Category',
+ 'doctype': u'DocField',
+ 'fieldname': u'tds_category',
+ 'fieldtype': u'Select',
+ 'label': u'TDS Category',
+ 'oldfieldname': u'tds_category',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:TDS Category',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Get TDS',
- 'oldfieldtype': 'Button',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get TDS',
+ 'oldfieldtype': u'Button',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'tax_code',
- 'fieldtype': 'Link',
- 'label': 'TDS Account Head',
- 'oldfieldname': 'tax_code',
- 'oldfieldtype': 'Link',
- 'options': 'Account',
+ 'doctype': u'DocField',
+ 'fieldname': u'tax_code',
+ 'fieldtype': u'Link',
+ 'label': u'TDS Account Head',
+ 'oldfieldname': u'tax_code',
+ 'oldfieldtype': u'Link',
+ 'options': u'Account',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'rate',
- 'fieldtype': 'Currency',
- 'label': 'Rate',
- 'oldfieldname': 'rate',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Rate',
+ 'oldfieldname': u'rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'ded_amount',
- 'fieldtype': 'Currency',
- 'label': 'TDS Amount',
- 'oldfieldname': 'ded_amount',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'ded_amount',
+ 'fieldtype': u'Currency',
+ 'label': u'TDS Amount',
+ 'oldfieldname': u'ded_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Totals',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Totals',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'other_charges_added',
- 'fieldtype': 'Currency',
- 'label': 'Other Charges Added',
- 'oldfieldname': 'other_charges_added',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges_added',
+ 'fieldtype': u'Currency',
+ 'label': u'Other Charges Added',
+ 'oldfieldname': u'other_charges_added',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'other_charges_deducted',
- 'fieldtype': 'Currency',
- 'label': 'Other Charges Deducted',
- 'oldfieldname': 'other_charges_deducted',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges_deducted',
+ 'fieldtype': u'Currency',
+ 'label': u'Other Charges Deducted',
+ 'oldfieldname': u'other_charges_deducted',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'total_tds_on_voucher',
- 'fieldtype': 'Currency',
- 'label': 'Total TDS On Voucher',
+ 'doctype': u'DocField',
+ 'fieldname': u'total_tds_on_voucher',
+ 'fieldtype': u'Currency',
+ 'label': u'Total TDS On Voucher',
'no_copy': 1,
- 'oldfieldname': 'total_tds_on_voucher',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'total_tds_on_voucher',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'tds_amount_on_advance',
- 'fieldtype': 'Currency',
- 'label': 'TDS Amount On Advance',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'tds_amount_on_advance',
+ 'fieldtype': u'Currency',
+ 'label': u'TDS Amount On Advance',
'no_copy': 1,
- 'oldfieldname': 'tds_amount_on_advance',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'tds_amount_on_advance',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'total_advance',
- 'fieldtype': 'Currency',
- 'label': 'Total Advance (Incl. TDS)',
+ 'doctype': u'DocField',
+ 'fieldname': u'total_advance',
+ 'fieldtype': u'Currency',
+ 'label': u'Total Advance (Incl. TDS)',
'no_copy': 1,
- 'oldfieldname': 'total_advance',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'total_advance',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'total_amount_to_pay',
- 'fieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'total_amount_to_pay',
+ 'fieldtype': u'Currency',
'hidden': 0,
- 'label': 'Total Amount To Pay',
+ 'label': u'Total Amount To Pay',
'no_copy': 1,
- 'oldfieldname': 'total_amount_to_pay',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'total_amount_to_pay',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'outstanding_amount',
- 'fieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'outstanding_amount',
+ 'fieldtype': u'Currency',
'in_filter': 1,
- 'label': 'Outstanding Amount',
+ 'label': u'Outstanding Amount',
'no_copy': 1,
- 'oldfieldname': 'outstanding_amount',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'outstanding_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@@ -991,110 +992,109 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
'print_hide': 1,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'grand_total',
- 'fieldtype': 'Currency',
- 'label': 'Grand Total',
- 'oldfieldname': 'grand_total',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'grand_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Grand Total',
+ 'oldfieldname': u'grand_total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'In Words will be visible once you save the Purchase Invoice.',
- 'doctype': 'DocField',
- 'fieldname': 'in_words',
- 'fieldtype': 'Data',
- 'label': 'In Words',
- 'oldfieldname': 'in_words',
- 'oldfieldtype': 'Data',
+ 'colour': u'White:FFF',
+ 'description': u'In Words will be visible once you save the Purchase Invoice.',
+ 'doctype': u'DocField',
+ 'fieldname': u'in_words',
+ 'fieldtype': u'Data',
+ 'label': u'In Words',
+ 'oldfieldname': u'in_words',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'net_total_import',
- 'fieldtype': 'Currency',
- 'label': 'Net Total (Import)',
- 'oldfieldname': 'net_total_import',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'net_total_import',
+ 'fieldtype': u'Currency',
+ 'label': u'Net Total (Import)',
+ 'oldfieldname': u'net_total_import',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'other_charges_added_import',
- 'fieldtype': 'Currency',
- 'label': 'Other Charges Added (Import)',
- 'oldfieldname': 'other_charges_added_import',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges_added_import',
+ 'fieldtype': u'Currency',
+ 'label': u'Other Charges Added (Import)',
+ 'oldfieldname': u'other_charges_added_import',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'other_charges_deducted_import',
- 'fieldtype': 'Currency',
- 'label': 'Other Charges Deducted (Import)',
- 'oldfieldname': 'other_charges_deducted_import',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges_deducted_import',
+ 'fieldtype': u'Currency',
+ 'label': u'Other Charges Deducted (Import)',
+ 'oldfieldname': u'other_charges_deducted_import',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'grand_total_import',
- 'fieldtype': 'Currency',
- 'label': 'Grand Total (Import)',
- 'oldfieldname': 'grand_total_import',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'grand_total_import',
+ 'fieldtype': u'Currency',
+ 'label': u'Grand Total (Import)',
+ 'oldfieldname': u'grand_total_import',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'In Words (Import) will be visible once you save the Purchase Invoice.',
- 'doctype': 'DocField',
- 'fieldname': 'in_words_import',
- 'fieldtype': 'Data',
- 'label': 'In Words (Import)',
- 'oldfieldname': 'in_words_import',
- 'oldfieldtype': 'Data',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'in_words_import',
+ 'fieldtype': u'Data',
+ 'label': u'In Words (Import)',
+ 'oldfieldname': u'in_words_import',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'depends_on': 'eval:!doc.__islocal',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Actions',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Actions',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 1
},
@@ -1102,25 +1102,25 @@
# DocField
{
'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Repair Outstanding Amt',
- 'oldfieldtype': 'Button',
- 'options': 'repair_pv_outstanding',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Repair Outstanding Amt',
+ 'oldfieldtype': u'Button',
+ 'options': u'repair_pv_outstanding',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'against_expense_account',
- 'fieldtype': 'Small Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'against_expense_account',
+ 'fieldtype': u'Small Text',
'hidden': 1,
- 'label': 'Against Expense Account',
+ 'label': u'Against Expense Account',
'no_copy': 1,
- 'oldfieldname': 'against_expense_account',
- 'oldfieldtype': 'Small Text',
+ 'oldfieldname': u'against_expense_account',
+ 'oldfieldtype': u'Small Text',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0
diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js
index d6360a5..20e9ab1 100644
--- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js
+++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//========================== On Load =================================================
cur_frm.cscript.onload = function(doc, cdt, cdn) {
diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
index 895130e..7264c44 100644
--- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
+++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/accounts/doctype/pos_setting/pos_setting.js b/erpnext/accounts/doctype/pos_setting/pos_setting.js
index 2bbc08c..82cf389 100755
--- a/erpnext/accounts/doctype/pos_setting/pos_setting.js
+++ b/erpnext/accounts/doctype/pos_setting/pos_setting.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc,cdt,cdn){
$c_obj(make_doclist(cdt,cdn),'get_series','',function(r,rt){
if(r.message) set_field_options('naming_series', r.message);
diff --git a/erpnext/accounts/doctype/pos_setting/pos_setting.py b/erpnext/accounts/doctype/pos_setting/pos_setting.py
index 7fff248..45caca5 100755
--- a/erpnext/accounts/doctype/pos_setting/pos_setting.py
+++ b/erpnext/accounts/doctype/pos_setting/pos_setting.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/accounts/doctype/purchase_tax_detail/purchase_tax_detail.txt b/erpnext/accounts/doctype/purchase_tax_detail/purchase_tax_detail.txt
index 58f66c7..2c5dc07 100644
--- a/erpnext/accounts/doctype/purchase_tax_detail/purchase_tax_detail.txt
+++ b/erpnext/accounts/doctype/purchase_tax_detail/purchase_tax_detail.txt
@@ -5,195 +5,199 @@
{
'creation': '2010-08-08 17:09:16',
'docstatus': 0,
- 'modified': '2011-11-16 15:41:42',
- 'modified_by': 'Administrator',
- 'owner': 'wasim@webnotestech.com'
+ 'modified': '2012-02-27 18:28:24',
+ 'modified_by': u'Administrator',
+ 'owner': u'wasim@webnotestech.com'
},
# These values are common for all DocType
{
- 'autoname': 'PVTD.######',
- 'colour': 'White:FFF',
- 'default_print_format': 'Standard',
+ '_last_update': u'1322549700',
+ 'autoname': u'PVTD.######',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
'hide_heading': 1,
'istable': 1,
- 'module': 'Accounts',
+ 'module': u'Accounts',
'name': '__common__',
- 'section_style': 'Tray',
- 'server_code_error': ' ',
+ 'section_style': u'Tray',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'version': 12
+ 'version': 13
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Purchase Tax Detail',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'Purchase Tax Detail',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# DocType, Purchase Tax Detail
{
'doctype': 'DocType',
- 'name': 'Purchase Tax Detail'
+ 'name': u'Purchase Tax Detail'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'category',
- 'fieldtype': 'Select',
- 'label': 'Category',
- 'oldfieldname': 'category',
- 'oldfieldtype': 'Select',
- 'options': '\nFor Total\nFor Valuation\nFor Both',
+ 'doctype': u'DocField',
+ 'fieldname': u'category',
+ 'fieldtype': u'Select',
+ 'label': u'Category',
+ 'oldfieldname': u'category',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nFor Total\nFor Valuation\nFor Both',
'permlevel': 0,
'reqd': 1
},
# DocField
{
- 'default': 'Add',
- 'doctype': 'DocField',
- 'fieldname': 'add_deduct_tax',
- 'fieldtype': 'Select',
- 'label': 'Add or Deduct',
- 'oldfieldname': 'add_deduct_tax',
- 'oldfieldtype': 'Select',
- 'options': '\nAdd\nDeduct',
+ 'default': u'Add',
+ 'doctype': u'DocField',
+ 'fieldname': u'add_deduct_tax',
+ 'fieldtype': u'Select',
+ 'label': u'Add or Deduct',
+ 'oldfieldname': u'add_deduct_tax',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nAdd\nDeduct',
'permlevel': 0,
'reqd': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'charge_type',
- 'fieldtype': 'Select',
- 'label': 'Type',
- 'oldfieldname': 'charge_type',
- 'oldfieldtype': 'Select',
- 'options': '\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total',
+ 'doctype': u'DocField',
+ 'fieldname': u'charge_type',
+ 'fieldtype': u'Select',
+ 'label': u'Type',
+ 'oldfieldname': u'charge_type',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total',
'permlevel': 0,
'reqd': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'row_id',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'row_id',
+ 'fieldtype': u'Data',
'hidden': 0,
- 'label': 'Enter Row',
- 'oldfieldname': 'row_id',
- 'oldfieldtype': 'Data',
+ 'label': u'Enter Row',
+ 'oldfieldname': u'row_id',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_wise_tax_detail',
- 'fieldtype': 'Small Text',
- 'label': 'Item Wise Tax Detail ',
- 'oldfieldname': 'item_wise_tax_detail',
- 'oldfieldtype': 'Small Text',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_wise_tax_detail',
+ 'fieldtype': u'Small Text',
+ 'hidden': 1,
+ 'label': u'Item Wise Tax Detail ',
+ 'oldfieldname': u'item_wise_tax_detail',
+ 'oldfieldtype': u'Small Text',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'description',
+ 'fieldtype': u'Small Text',
+ 'label': u'Description',
+ 'oldfieldname': u'description',
+ 'oldfieldtype': u'Small Text',
+ 'permlevel': 0,
+ 'reqd': 1,
+ 'width': u'300px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'account_head',
+ 'fieldtype': u'Link',
+ 'label': u'Account Head',
+ 'oldfieldname': u'account_head',
+ 'oldfieldtype': u'Link',
+ 'options': u'Account',
+ 'permlevel': 0,
+ 'reqd': 1,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'cost_center',
+ 'fieldtype': u'Link',
+ 'label': u'Cost Center',
+ 'oldfieldname': u'cost_center',
+ 'oldfieldtype': u'Link',
+ 'options': u'Cost Center',
+ 'permlevel': 0,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Rate',
+ 'oldfieldname': u'rate',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 0,
+ 'reqd': 0,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'tax_amount',
+ 'fieldtype': u'Currency',
+ 'label': u'Amount',
+ 'oldfieldname': u'tax_amount',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 0,
+ 'reqd': 0,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'total',
+ 'fieldtype': u'Currency',
+ 'label': u'Aggregate Total',
+ 'oldfieldname': u'total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'description',
- 'fieldtype': 'Small Text',
- 'label': 'Description',
- 'oldfieldname': 'description',
- 'oldfieldtype': 'Small Text',
- 'permlevel': 0,
- 'reqd': 1,
- 'width': '300px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'account_head',
- 'fieldtype': 'Link',
- 'label': 'Account Head',
- 'oldfieldname': 'account_head',
- 'oldfieldtype': 'Link',
- 'options': 'Account',
- 'permlevel': 0,
- 'reqd': 1,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'cost_center',
- 'fieldtype': 'Link',
- 'label': 'Cost Center',
- 'oldfieldname': 'cost_center',
- 'oldfieldtype': 'Link',
- 'options': 'Cost Center',
- 'permlevel': 0,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'rate',
- 'fieldtype': 'Currency',
- 'label': 'Rate',
- 'oldfieldname': 'rate',
- 'oldfieldtype': 'Currency',
- 'permlevel': 0,
- 'reqd': 0,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'tax_amount',
- 'fieldtype': 'Currency',
- 'label': 'Amount',
- 'oldfieldname': 'tax_amount',
- 'oldfieldtype': 'Currency',
- 'permlevel': 0,
- 'reqd': 0,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'total',
- 'fieldtype': 'Currency',
- 'label': 'Aggregate Total',
- 'oldfieldname': 'total',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'parenttype',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'parenttype',
+ 'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
- 'label': 'Parenttype',
- 'oldfieldname': 'parenttype',
- 'oldfieldtype': 'Data',
+ 'label': u'Parenttype',
+ 'oldfieldname': u'parenttype',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'search_index': 0
@@ -201,15 +205,15 @@
# DocField
{
- 'description': 'Cheating Field\nPlease do not delete ',
- 'doctype': 'DocField',
- 'fieldname': 'total_tax_amount',
- 'fieldtype': 'Currency',
+ 'description': u'Cheating Field\nPlease do not delete ',
+ 'doctype': u'DocField',
+ 'fieldname': u'total_tax_amount',
+ 'fieldtype': u'Currency',
'hidden': 1,
- 'label': 'Total +Tax',
+ 'label': u'Total +Tax',
'no_copy': 1,
- 'oldfieldname': 'total_tax_amount',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'total_tax_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
@@ -217,15 +221,15 @@
# DocField
{
- 'description': 'Cheating Field\nPlease do not delete ',
- 'doctype': 'DocField',
- 'fieldname': 'total_amount',
- 'fieldtype': 'Currency',
+ 'description': u'Cheating Field\nPlease do not delete ',
+ 'doctype': u'DocField',
+ 'fieldname': u'total_amount',
+ 'fieldtype': u'Currency',
'hidden': 1,
- 'label': 'Tax Amount',
+ 'label': u'Tax Amount',
'no_copy': 1,
- 'oldfieldname': 'total_amount',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'total_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
diff --git a/erpnext/accounts/doctype/pv_detail/pv_detail.txt b/erpnext/accounts/doctype/pv_detail/pv_detail.txt
index e1181b0..826ad8e 100755
--- a/erpnext/accounts/doctype/pv_detail/pv_detail.txt
+++ b/erpnext/accounts/doctype/pv_detail/pv_detail.txt
@@ -5,67 +5,67 @@
{
'creation': '2010-08-08 17:09:17',
'docstatus': 0,
- 'modified': '2011-12-14 10:44:21',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-27 18:42:06',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocType
{
- 'autoname': 'EVD.######',
- 'colour': 'White:FFF',
- 'default_print_format': 'Standard',
+ 'autoname': u'EVD.######',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
'istable': 1,
- 'module': 'Accounts',
+ 'module': u'Accounts',
'name': '__common__',
- 'section_style': 'Tray',
- 'server_code_error': ' ',
+ 'section_style': u'Tray',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'version': 42
+ 'version': 43
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'PV Detail',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'PV Detail',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# DocType, PV Detail
{
'doctype': 'DocType',
- 'name': 'PV Detail'
+ 'name': u'PV Detail'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_code',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_code',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Item',
- 'oldfieldname': 'item_code',
- 'oldfieldtype': 'Link',
- 'options': 'Item',
+ 'label': u'Item',
+ 'oldfieldname': u'item_code',
+ 'oldfieldtype': u'Link',
+ 'options': u'Item',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_name',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_name',
+ 'fieldtype': u'Data',
'in_filter': 0,
- 'label': 'Item Name',
- 'oldfieldname': 'item_name',
- 'oldfieldtype': 'Data',
+ 'label': u'Item Name',
+ 'oldfieldname': u'item_name',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'reqd': 1,
'search_index': 0
@@ -73,108 +73,108 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'description',
- 'fieldtype': 'Text',
- 'label': 'Description',
- 'oldfieldname': 'description',
- 'oldfieldtype': 'Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'description',
+ 'fieldtype': u'Text',
+ 'label': u'Description',
+ 'oldfieldname': u'description',
+ 'oldfieldtype': u'Text',
'permlevel': 0,
- 'width': '300px'
+ 'width': u'300px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'qty',
- 'fieldtype': 'Currency',
- 'label': 'Qty',
- 'oldfieldname': 'qty',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'qty',
+ 'fieldtype': u'Currency',
+ 'label': u'Qty',
+ 'oldfieldname': u'qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'import_ref_rate',
- 'fieldtype': 'Currency',
- 'label': 'Ref Rate ',
+ 'doctype': u'DocField',
+ 'fieldname': u'import_ref_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Ref Rate ',
'permlevel': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'discount_rate',
- 'fieldtype': 'Currency',
- 'label': 'Discount %',
+ 'doctype': u'DocField',
+ 'fieldname': u'discount_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Discount %',
'permlevel': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'import_rate',
- 'fieldtype': 'Currency',
- 'label': 'Rate ',
- 'oldfieldname': 'import_rate',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'import_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Rate ',
+ 'oldfieldname': u'import_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'import_amount',
- 'fieldtype': 'Currency',
- 'label': 'Amount',
- 'oldfieldname': 'import_amount',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'import_amount',
+ 'fieldtype': u'Currency',
+ 'label': u'Amount',
+ 'oldfieldname': u'import_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'reqd': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'purchase_ref_rate',
- 'fieldtype': 'Currency',
- 'label': 'Ref Rate *',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_ref_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Ref Rate *',
'permlevel': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'rate',
- 'fieldtype': 'Currency',
- 'label': 'Rate *(Default Curr.)',
- 'oldfieldname': 'rate',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Rate *(Default Curr.)',
+ 'oldfieldname': u'rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'amount',
- 'fieldtype': 'Currency',
- 'label': 'Amount (Default Curr.)',
- 'oldfieldname': 'amount',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'amount',
+ 'fieldtype': u'Currency',
+ 'label': u'Amount (Default Curr.)',
+ 'oldfieldname': u'amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 1
@@ -182,102 +182,74 @@
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'expense_head',
- 'fieldtype': 'Link',
- 'label': 'Expense Head',
- 'oldfieldname': 'expense_head',
- 'oldfieldtype': 'Link',
- 'options': 'Account',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'expense_head',
+ 'fieldtype': u'Link',
+ 'label': u'Expense Head',
+ 'oldfieldname': u'expense_head',
+ 'oldfieldtype': u'Link',
+ 'options': u'Account',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'trigger': 'Client',
- 'width': '120px'
+ 'trigger': u'Client',
+ 'width': u'120px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'cost_center',
- 'fieldtype': 'Link',
- 'label': 'Cost Center',
- 'oldfieldname': 'cost_center',
- 'oldfieldtype': 'Link',
- 'options': 'Cost Center',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'cost_center',
+ 'fieldtype': u'Link',
+ 'label': u'Cost Center',
+ 'oldfieldname': u'cost_center',
+ 'oldfieldtype': u'Link',
+ 'options': u'Cost Center',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client',
- 'width': '120px'
+ 'trigger': u'Client',
+ 'width': u'120px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'project_name',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'project_name',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Project Name',
- 'options': 'Project',
+ 'label': u'Project Name',
+ 'options': u'Project',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'brand',
- 'fieldtype': 'Data',
- 'label': 'Brand',
- 'oldfieldname': 'brand',
- 'oldfieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'brand',
+ 'fieldtype': u'Data',
+ 'hidden': 1,
+ 'label': u'Brand',
+ 'oldfieldname': u'brand',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_group',
- 'fieldtype': 'Link',
- 'in_filter': 1,
- 'label': 'Item Group',
- 'oldfieldname': 'item_group',
- 'oldfieldtype': 'Link',
- 'options': 'Item Group',
- 'permlevel': 1,
- 'print_hide': 1,
- 'search_index': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'purchase_order',
- 'fieldtype': 'Link',
- 'in_filter': 1,
- 'label': 'Pur Order',
- 'oldfieldname': 'purchase_order',
- 'oldfieldtype': 'Link',
- 'options': 'Purchase Order',
- 'permlevel': 1,
- 'print_hide': 1,
- 'search_index': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'po_detail',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_group',
+ 'fieldtype': u'Link',
'hidden': 1,
'in_filter': 1,
- 'label': 'PO Detail',
- 'oldfieldname': 'po_detail',
- 'oldfieldtype': 'Data',
+ 'label': u'Item Group',
+ 'oldfieldname': u'item_group',
+ 'oldfieldtype': u'Link',
+ 'options': u'Item Group',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@@ -285,14 +257,14 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'purchase_receipt',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_order',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Pur Receipt',
- 'oldfieldname': 'purchase_receipt',
- 'oldfieldtype': 'Link',
- 'options': 'Purchase Receipt',
+ 'label': u'Pur Order',
+ 'oldfieldname': u'purchase_order',
+ 'oldfieldtype': u'Link',
+ 'options': u'Purchase Order',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@@ -300,14 +272,14 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'pr_detail',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'po_detail',
+ 'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
- 'label': 'PR Detail',
- 'oldfieldname': 'pr_detail',
- 'oldfieldtype': 'Data',
+ 'label': u'PO Detail',
+ 'oldfieldname': u'po_detail',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@@ -315,13 +287,44 @@
# DocField
{
- 'description': 'Tax detail table fetched from item master as a string and stored in this field.\nUsed for Purchase Other Charges',
- 'doctype': 'DocField',
- 'fieldname': 'item_tax_rate',
- 'fieldtype': 'Small Text',
- 'label': 'Item Tax Rate',
- 'oldfieldname': 'item_tax_rate',
- 'oldfieldtype': 'Small Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_receipt',
+ 'fieldtype': u'Link',
+ 'in_filter': 1,
+ 'label': u'Pur Receipt',
+ 'oldfieldname': u'purchase_receipt',
+ 'oldfieldtype': u'Link',
+ 'options': u'Purchase Receipt',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'search_index': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'pr_detail',
+ 'fieldtype': u'Data',
+ 'hidden': 1,
+ 'in_filter': 1,
+ 'label': u'PR Detail',
+ 'oldfieldname': u'pr_detail',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'search_index': 1
+ },
+
+ # DocField
+ {
+ 'description': u'Tax detail table fetched from item master as a string and stored in this field.\nUsed for Purchase Other Charges',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_tax_rate',
+ 'fieldtype': u'Small Text',
+ 'hidden': 1,
+ 'label': u'Item Tax Rate',
+ 'oldfieldname': u'item_tax_rate',
+ 'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1
@@ -330,10 +333,10 @@
# DocField
{
'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'page_break',
- 'fieldtype': 'Check',
- 'label': 'Page Break',
+ 'doctype': u'DocField',
+ 'fieldname': u'page_break',
+ 'fieldtype': u'Check',
+ 'label': u'Page Break',
'no_copy': 1,
'permlevel': 0,
'print_hide': 1,
diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js
index 139a42a..391bbcd 100644
--- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js
+++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.tname = "RV Detail";
cur_frm.cscript.fname = "entries";
cur_frm.cscript.other_fname = "other_charges";
@@ -26,51 +42,50 @@
}
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
- var callback2 = null;
- if(doc.customer && doc.__islocal) {
+ var callback = function(doc, dt, dn) {
// called from mapper, update the account names for items and customer
- callback2 = function(doc, dt, dn) {
- $c_obj(make_doclist(doc.doctype,doc.name),
- 'load_default_accounts','',
- function(r,rt) {
- refresh_field('entries');
- cur_frm.cscript.customer(doc,dt,dn,onload=true);
- }
- );
+ var callback2 = function(doc, dt, dn) {
+ if(doc.customer && doc.__islocal) {
+ $c_obj(make_doclist(doc.doctype,doc.name),
+ 'load_default_accounts','',
+ function(r,rt) {
+ refresh_field('entries');
+ cur_frm.cscript.customer(doc,dt,dn,onload=true);
+ }
+ );
+ }
}
- }
- // defined in sales_common.js
- var callback1 = function(doc, dt, dn) {
- //for previously created sales invoice, set required field related to pos
- cur_frm.cscript.update_item_details(doc, dt, dn, callback2);
- }
+ // defined in sales_common.js
+ var callback1 = function(doc, dt, dn) {
+ //for previously created sales invoice, set required field related to pos
+ cur_frm.cscript.update_item_details(doc, dt, dn, callback2);
+ }
- if(doc.is_pos ==1) cur_frm.cscript.is_pos(doc, dt, dn,callback1);
- else cur_frm.cscript.update_item_details(doc, dt, dn, callback2);
+ if(doc.is_pos ==1) cur_frm.cscript.is_pos(doc, dt, dn,callback1);
+ else cur_frm.cscript.update_item_details(doc, dt, dn, callback2);
+ }
+
+ cur_frm.cscript.hide_price_list_currency(doc, dt, dn, callback);
+
}
// Hide Fields
// ------------
cur_frm.cscript.hide_fields = function(doc, cdt, cdn) {
- par_flds = ['project_name', 'due_date', 'posting_time', 'sales_order_main', 'delivery_note_main', 'Get Items', 'is_opening', 'conversion_rate', 'source', 'cancel_reason', 'total_advance', 'gross_profit', 'gross_profit_percent', 'Get Advances Received', 'advance_adjustment_details', 'sales_partner', 'commission_rate', 'total_commission', 'Repair Outstanding Amt'];
+ par_flds = ['project_name', 'due_date', 'sales_order_main', 'delivery_note_main', 'Get Items', 'is_opening', 'conversion_rate', 'source', 'cancel_reason', 'total_advance', 'gross_profit', 'gross_profit_percent', 'Get Advances Received', 'advance_adjustment_details', 'sales_partner', 'commission_rate', 'total_commission', 'Repair Outstanding Amt'];
- ch_flds = {'entries': ['sales_order', 'delivery_note']}
+ item_flds_normal = ['sales_order', 'delivery_note']
+ item_flds_pos = ['warehouse', 'serial_no', 'batch_no', 'actual_qty', 'delivered_qty']
if(cint(doc.is_pos) == 1) {
- hide_field(par_flds);
- for(t in ch_flds) {
- for(f in ch_flds[t]) {
- cur_frm.fields_dict[t].grid.set_column_disp(ch_flds[t][f], false);
- }
- }
+ hide_field(par_flds);
+ for(f in item_flds_normal) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_normal[f], false);
+ for(f in item_flds_pos) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_pos[f], (doc.update_stock==1?true:false));
} else {
unhide_field(par_flds);
- for (t in ch_flds) {
- for (f in ch_flds[t]) {
- cur_frm.fields_dict[t].grid.set_column_disp(ch_flds[t][f], true);
- }
- }
+ for(f in item_flds_normal) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_normal[f], true);
+ for(f in item_flds_pos) cur_frm.fields_dict['entries'].grid.set_column_disp(item_flds_pos[f], false);
}
// India related fields
@@ -84,13 +99,13 @@
// Refresh
// -------
cur_frm.cscript.refresh = function(doc, dt, dn) {
-
cur_frm.cscript.is_opening(doc, dt, dn);
- cur_frm.cscript.hide_fields(doc, cdt, cdn);
-
+ cur_frm.cscript.hide_fields(doc, dt, dn);
// Show / Hide button
cur_frm.clear_custom_buttons();
+ if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, dt, dn);
+
if(doc.docstatus==1) {
cur_frm.add_custom_button('View Ledger', cur_frm.cscript['View Ledger Entry']);
cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
@@ -109,7 +124,7 @@
//fetch retail transaction related fields
//--------------------------------------------
cur_frm.cscript.is_pos = function(doc,dt,dn,callback){
- cur_frm.cscript.hide_fields(doc, cdt, cdn);
+ cur_frm.cscript.hide_fields(doc, dt, dn);
if(doc.is_pos == 1){
if (!doc.company) {
msgprint("Please select company to proceed");
@@ -127,6 +142,11 @@
}
+cur_frm.cscript.update_stock = function(doc, dt, dn) {
+ cur_frm.cscript.hide_fields(doc, dt, dn);
+}
+
+
cur_frm.cscript.warehouse = function(doc, cdt , cdn) {
var d = locals[cdt][cdn];
if (!d.item_code) {alert("please enter item code first"); return};
diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py
index 6b9b740..d09adc2 100644
--- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py
+++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
@@ -7,7 +23,6 @@
from webnotes.model.doclist import getlist, copy_doclist
from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
from webnotes import session, form, is_testing, msgprint, errprint
-from webnotes.utils.scheduler import set_event, cancel_event, Scheduler
in_transaction = webnotes.conn.in_transaction
convert_to_lists = webnotes.conn.convert_to_lists
@@ -74,9 +89,9 @@
for d in getlist(self.doclist,'entries'):
# overwrite if mentioned in item
item = webnotes.conn.sql("select default_income_account, default_sales_cost_center, default_warehouse from tabItem where name = '%s'" %(d.item_code), as_dict=1)
- d.income_account = item and item[0]['default_income_account'] or dtl and dtl[0]['income_account'] or ''
- d.cost_center = item and item[0]['default_sales_cost_center'] or dtl and dtl[0]['cost_center'] or ''
- d.warehouse = item and item[0]['default_warehouse'] or dtl and dtl[0]['warehouse'] or ''
+ d.income_account = item and item[0]['default_income_account'] or dtl and dtl[0]['income_account'] or d.income_account
+ d.cost_center = item and item[0]['default_sales_cost_center'] or dtl and dtl[0]['cost_center'] or d.cost_center
+ d.warehouse = item and item[0]['default_warehouse'] or dtl and dtl[0]['warehouse'] or d.warehouse
@@ -151,31 +166,39 @@
# Item Details
# -------------
- def get_item_details(self, item_code=None):
- if item_code:
- ret = get_obj('Sales Common').get_item_details(item_code, self)
- return self.get_pos_details(item_code, ret)
+ def get_item_details(self, args=None):
+ args = args and eval(args) or {}
+ if args.get('item_code'):
+ ret = get_obj('Sales Common').get_item_details(args, self)
+ return self.get_pos_details(args, ret)
else:
obj = get_obj('Sales Common')
for doc in self.doclist:
if doc.fields.get('item_code'):
- ret = obj.get_item_details(doc.item_code, self)
- ret = self.get_pos_details(item_code, ret)
+ arg = {'item_code':doc.fields.get('item_code'), 'income_account':doc.fields.get('income_account'),
+ 'cost_center': doc.fields.get('cost_center'), 'warehouse': doc.fields.get('warehouse')};
+
+ ret = obj.get_item_details(arg, self)
+ ret = self.get_pos_details(arg, ret)
for r in ret:
if not doc.fields.get(r):
- doc.fields[r] = ret[r]
+ doc.fields[r] = ret[r]
- def get_pos_details(self, item_code, ret):
- if item_code and cint(self.doc.is_pos) == 1:
+ def get_pos_details(self, args, ret):
+ if args['item_code'] and cint(self.doc.is_pos) == 1:
dtl = webnotes.conn.sql("select income_account, warehouse, cost_center from `tabPOS Setting` where user = '%s' and company = '%s'" % (session['user'], self.doc.company), as_dict=1)
if not dtl:
dtl = webnotes.conn.sql("select income_account, warehouse, cost_center from `tabPOS Setting` where ifnull(user,'') = '' and company = '%s'" % (self.doc.company), as_dict=1)
- if dtl and not ret['income_account'] and dtl[0]['income_account']: ret['income_account'] = dtl and dtl[0]['income_account']
- if dtl and not ret['cost_center'] and dtl[0]['cost_center']: ret['cost_center'] = dtl and dtl[0]['cost_center']
- if dtl and not ret['warehouse'] and dtl[0]['warehouse']: ret['warehouse'] = dtl and dtl[0]['warehouse']
+
+ item = webnotes.conn.sql("select default_income_account, default_sales_cost_center, default_warehouse from tabItem where name = '%s'" %(args['item_code']), as_dict=1)
+
+ ret['income_account'] = item and item[0]['default_income_account'] or dtl and dtl[0]['income_account'] or args['income_account']
+ ret['cost_center'] = item and item[0]['default_sales_cost_center'] or dtl and dtl[0]['cost_center'] or args['cost_center']
+ ret['warehouse'] = item and item[0]['default_warehouse'] or dtl and dtl[0]['warehouse'] or args['warehouse']
+
if ret['warehouse']:
- actual_qty = webnotes.conn.sql("select actual_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (item_code, ret['warehouse']))
+ actual_qty = webnotes.conn.sql("select actual_qty from `tabBin` where item_code = '%s' and warehouse = '%s'" % (args['item_code'], ret['warehouse']))
ret['actual_qty']= actual_qty and flt(actual_qty[0][0]) or 0
return ret
@@ -676,29 +699,6 @@
elif self.doc.recurring_id:
webnotes.conn.sql("""update `tabReceivable Voucher` set convert_into_recurring_invoice = 0 where recurring_id = %s""", self.doc.recurring_id)
- self.manage_scheduler()
-
- def manage_scheduler(self):
- """ set/cancel event in scheduler """
- event = 'accounts.doctype.gl_control.gl_control.manage_recurring_invoices'
-
- if webnotes.conn.sql("select name from `tabReceivable Voucher` where ifnull(convert_into_recurring_invoice, 0) = 1 and next_date <= end_date"):
- if not self.check_event_exists(event):
- set_event(event, interval = 60*60, recurring = 1)
- else:
- cancel_event(event)
-
-
- def check_event_exists(self, event):
- try:
- ev = Scheduler().get_events()
- except:
- msgprint("Scheduler database not exists. Please mail to support@erpnext.com", raise_exception=1)
-
- if event in [d['event'] for d in ev]:
- return 1
-
-
def set_next_date(self):
""" Set next date on which auto invoice will be created"""
diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt
index 66e5a6c..b2777e3 100644
--- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt
+++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.txt
@@ -5,7 +5,7 @@
{
'creation': '2010-08-08 17:09:18',
'docstatus': 0,
- 'modified': '2012-02-15 14:24:14',
+ 'modified': '2012-02-27 17:34:46',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -21,7 +21,7 @@
# These values are common for all DocType
{
- '_last_update': u'1329295537',
+ '_last_update': u'1330344021',
'change_log': u'1. Change in pull_details method dt.-26-06-2009',
'colour': u'White:FFF',
'default_print_format': u'Standard',
@@ -34,7 +34,7 @@
'server_code_error': u' ',
'show_in_menu': 0,
'subject': u'To %(customer_name)s worth %(currency)s %(grand_total_export)s due on %(due_date)s | %(outstanding_amount)s outstanding',
- 'version': 394
+ 'version': 414
},
# These values are common for all DocFormat
@@ -337,18 +337,32 @@
{
'colour': u'White:FFF',
'default': u'Today',
- 'description': u"This is the date on which this voucher is made in the system. Today's date comes by default.",
+ 'description': u'The date at which current entry will get or has actually executed.',
'doctype': u'DocField',
- 'fieldname': u'voucher_date',
+ 'fieldname': u'posting_date',
'fieldtype': u'Date',
'in_filter': 1,
- 'label': u'Voucher Date',
+ 'label': u'Posting Date',
'no_copy': 1,
- 'oldfieldname': u'voucher_date',
+ 'oldfieldname': u'posting_date',
'oldfieldtype': u'Date',
'permlevel': 0,
+ 'print_hide': 0,
'reqd': 1,
- 'search_index': 0
+ 'search_index': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'posting_time',
+ 'fieldtype': u'Time',
+ 'label': u'Posting Time',
+ 'no_copy': 1,
+ 'oldfieldname': u'posting_time',
+ 'oldfieldtype': u'Time',
+ 'permlevel': 0,
+ 'print_hide': 1
},
# DocField
@@ -371,38 +385,6 @@
# DocField
{
- 'colour': u'White:FFF',
- 'default': u'Today',
- 'description': u'The date at which current entry will get or has actually executed.',
- 'doctype': u'DocField',
- 'fieldname': u'posting_date',
- 'fieldtype': u'Date',
- 'in_filter': 1,
- 'label': u'Posting Date',
- 'no_copy': 1,
- 'oldfieldname': u'posting_date',
- 'oldfieldtype': u'Date',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1,
- 'search_index': 1
- },
-
- # DocField
- {
- 'doctype': u'DocField',
- 'fieldname': u'posting_time',
- 'fieldtype': u'Time',
- 'label': u'Posting Time',
- 'no_copy': 1,
- 'oldfieldname': u'posting_time',
- 'oldfieldtype': u'Time',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
'description': u'The date at which current entry is corrected in the system.',
'doctype': u'DocField',
'fieldname': u'amendment_date',
@@ -509,7 +491,7 @@
# DocField
{
'colour': u'White:FFF',
- 'description': u'Rate at which Price list currency is converted to your currency',
+ 'description': u"Rate at which Price list currency is converted to customer's base currency",
'doctype': u'DocField',
'fieldname': u'plc_conversion_rate',
'fieldtype': u'Currency',
@@ -543,7 +525,9 @@
# DocField
{
+ 'colour': u'White:FFF',
'default': u'1.00',
+ 'description': u"Rate at which Customer Currency is converted to customer's base currency",
'doctype': u'DocField',
'fieldname': u'conversion_rate',
'fieldtype': u'Currency',
@@ -600,6 +584,7 @@
{
'doctype': u'DocField',
'fieldtype': u'Section Break',
+ 'options': u'Simple',
'permlevel': 0
},
@@ -830,290 +815,6 @@
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'Section Break',
- 'label': u'Terms',
- 'oldfieldtype': u'Section Break',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'doctype': u'DocField',
- 'fieldname': u'tc_name',
- 'fieldtype': u'Link',
- 'label': u'Select Terms',
- 'oldfieldname': u'tc_name',
- 'oldfieldtype': u'Link',
- 'options': u'Term',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': u'White:FFF',
- 'doctype': u'DocField',
- 'fieldtype': u'Button',
- 'label': u'Get Terms',
- 'oldfieldtype': u'Button',
- 'options': u'get_tc_details',
- 'permlevel': 0,
- 'print_hide': 1,
- 'trigger': u'Server'
- },
-
- # DocField
- {
- 'colour': u'White:FFF',
- 'doctype': u'DocField',
- 'fieldtype': u'HTML',
- 'label': u'Terms HTML',
- 'oldfieldtype': u'HTML',
- 'options': u'You can add Terms and Notes that will be printed in the Transaction',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': u'DocField',
- 'fieldname': u'terms',
- 'fieldtype': u'Text Editor',
- 'label': u'Term Details',
- 'oldfieldname': u'terms',
- 'oldfieldtype': u'Text Editor',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'colour': u'White:FFF',
- 'doctype': u'DocField',
- 'fieldtype': u'Section Break',
- 'label': u'More Info',
- 'oldfieldtype': u'Section Break',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': u'White:FFF',
- 'doctype': u'DocField',
- 'fieldtype': u'Column Break',
- 'oldfieldtype': u'Column Break',
- 'permlevel': 0,
- 'print_hide': 1,
- 'width': u'50%'
- },
-
- # DocField
- {
- 'colour': u'White:FFF',
- 'default': u'No',
- 'doctype': u'DocField',
- 'fieldname': u'is_opening',
- 'fieldtype': u'Select',
- 'in_filter': 1,
- 'label': u'Is Opening',
- 'oldfieldname': u'is_opening',
- 'oldfieldtype': u'Select',
- 'options': u'No\nYes',
- 'permlevel': 0,
- 'print_hide': 1,
- 'search_index': 0,
- 'trigger': u'Client'
- },
-
- # DocField
- {
- 'doctype': u'DocField',
- 'fieldname': u'aging_date',
- 'fieldtype': u'Date',
- 'label': u'Aging Date',
- 'oldfieldname': u'aging_date',
- 'oldfieldtype': u'Date',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'allow_on_submit': 1,
- 'colour': u'White:FFF',
- 'doctype': u'DocField',
- 'fieldname': u'letter_head',
- 'fieldtype': u'Select',
- 'label': u'Letter Head',
- 'oldfieldname': u'letter_head',
- 'oldfieldtype': u'Select',
- 'options': u'link:Letter Head',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': u'DocField',
- 'fieldname': u'source',
- 'fieldtype': u'Select',
- 'label': u'Source',
- 'oldfieldname': u'source',
- 'oldfieldtype': u'Select',
- 'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': u'White:FFF',
- 'depends_on': u"eval:doc.source == 'Campaign'",
- 'doctype': u'DocField',
- 'fieldname': u'campaign',
- 'fieldtype': u'Link',
- 'label': u'Campaign',
- 'oldfieldname': u'campaign',
- 'oldfieldtype': u'Link',
- 'options': u'Campaign',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'allow_on_submit': 1,
- 'colour': u'White:FFF',
- 'doctype': u'DocField',
- 'fieldname': u'select_print_heading',
- 'fieldtype': u'Link',
- 'label': u'Select Print Heading',
- 'no_copy': 1,
- 'oldfieldname': u'select_print_heading',
- 'oldfieldtype': u'Link',
- 'options': u'Print Heading',
- 'permlevel': 0,
- 'print_hide': 1,
- 'report_hide': 1,
- 'trigger': u'Client'
- },
-
- # DocField
- {
- 'colour': u'White:FFF',
- 'description': u'Track this Sales Invoice against any Project',
- 'doctype': u'DocField',
- 'fieldname': u'project_name',
- 'fieldtype': u'Link',
- 'in_filter': 1,
- 'label': u'Project Name',
- 'oldfieldname': u'project_name',
- 'oldfieldtype': u'Link',
- 'options': u'Project',
- 'permlevel': 0,
- 'search_index': 1,
- 'trigger': u'Client'
- },
-
- # DocField
- {
- 'colour': u'White:FFF',
- 'doctype': u'DocField',
- 'fieldtype': u'Column Break',
- 'oldfieldtype': u'Column Break',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'doctype': u'DocField',
- 'fieldname': u'c_form_applicable',
- 'fieldtype': u'Select',
- 'label': u'C-Form Applicable',
- 'no_copy': 1,
- 'options': u'No\nYes',
- 'permlevel': 0,
- 'print_hide': 1,
- 'report_hide': 0
- },
-
- # DocField
- {
- 'doctype': u'DocField',
- 'fieldname': u'c_form_no',
- 'fieldtype': u'Link',
- 'label': u'C-Form No',
- 'no_copy': 1,
- 'options': u'C-Form',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': u'DocField',
- 'fieldname': u'company',
- 'fieldtype': u'Link',
- 'in_filter': 1,
- 'label': u'Company',
- 'oldfieldname': u'company',
- 'oldfieldtype': u'Link',
- 'options': u'Company',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1,
- 'search_index': 0
- },
-
- # DocField
- {
- 'doctype': u'DocField',
- 'fieldname': u'fiscal_year',
- 'fieldtype': u'Select',
- 'in_filter': 1,
- 'label': u'Fiscal Year',
- 'no_copy': 0,
- 'oldfieldname': u'fiscal_year',
- 'oldfieldtype': u'Select',
- 'options': u'link:Fiscal Year',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1,
- 'search_index': 0
- },
-
- # DocField
- {
- 'colour': u'White:FFF',
- 'depends_on': u'eval:!doc.__islocal',
- 'doctype': u'DocField',
- 'fieldname': u'cancel_reason',
- 'fieldtype': u'Data',
- 'label': u'Cancel Reason',
- 'oldfieldname': u'cancel_reason',
- 'oldfieldtype': u'Data',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': u'DocField',
- 'fieldname': u'remarks',
- 'fieldtype': u'Small Text',
- 'label': u'Remarks',
- 'no_copy': 1,
- 'oldfieldname': u'remarks',
- 'oldfieldtype': u'Text',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 0
- },
-
- # DocField
- {
- 'colour': u'White:FFF',
- 'doctype': u'DocField',
- 'fieldtype': u'Section Break',
'label': u'Totals',
'oldfieldtype': u'Section Break',
'permlevel': 0,
@@ -1238,7 +939,6 @@
# DocField
{
'colour': u'White:FFF',
- 'description': u'In Words (Export) will be visible once you save the Sales Invoice.',
'doctype': u'DocField',
'fieldname': u'in_words_export',
'fieldtype': u'Data',
@@ -1278,6 +978,309 @@
'colour': u'White:FFF',
'doctype': u'DocField',
'fieldtype': u'Section Break',
+ 'label': u'Terms',
+ 'oldfieldtype': u'Section Break',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'tc_name',
+ 'fieldtype': u'Link',
+ 'label': u'Select Terms',
+ 'oldfieldname': u'tc_name',
+ 'oldfieldtype': u'Link',
+ 'options': u'Term',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Terms',
+ 'oldfieldtype': u'Button',
+ 'options': u'get_tc_details',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'trigger': u'Server'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Terms HTML',
+ 'oldfieldtype': u'HTML',
+ 'options': u'You can add Terms and Notes that will be printed in the Transaction',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'terms',
+ 'fieldtype': u'Text Editor',
+ 'label': u'Term Details',
+ 'oldfieldname': u'terms',
+ 'oldfieldtype': u'Text Editor',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'More Info',
+ 'oldfieldtype': u'Section Break',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'default': u'No',
+ 'doctype': u'DocField',
+ 'fieldname': u'is_opening',
+ 'fieldtype': u'Select',
+ 'in_filter': 1,
+ 'label': u'Is Opening',
+ 'oldfieldname': u'is_opening',
+ 'oldfieldtype': u'Select',
+ 'options': u'No\nYes',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'search_index': 0,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'default': u'Today',
+ 'description': u"This is the date on which this voucher is made in the system. Today's date comes by default.",
+ 'doctype': u'DocField',
+ 'fieldname': u'voucher_date',
+ 'fieldtype': u'Date',
+ 'in_filter': 1,
+ 'label': u'Voucher Date',
+ 'no_copy': 1,
+ 'oldfieldname': u'voucher_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 0,
+ 'reqd': 1,
+ 'search_index': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'aging_date',
+ 'fieldtype': u'Date',
+ 'label': u'Aging Date',
+ 'oldfieldname': u'aging_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'allow_on_submit': 1,
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'letter_head',
+ 'fieldtype': u'Select',
+ 'label': u'Letter Head',
+ 'oldfieldname': u'letter_head',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Letter Head',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'c_form_applicable',
+ 'fieldtype': u'Select',
+ 'label': u'C-Form Applicable',
+ 'no_copy': 1,
+ 'options': u'No\nYes',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'report_hide': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'c_form_no',
+ 'fieldtype': u'Link',
+ 'label': u'C-Form No',
+ 'no_copy': 1,
+ 'options': u'C-Form',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'depends_on': u"eval:doc.source == 'Campaign'",
+ 'doctype': u'DocField',
+ 'fieldname': u'campaign',
+ 'fieldtype': u'Link',
+ 'label': u'Campaign',
+ 'oldfieldname': u'campaign',
+ 'oldfieldtype': u'Link',
+ 'options': u'Campaign',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Track this Sales Invoice against any Project',
+ 'doctype': u'DocField',
+ 'fieldname': u'project_name',
+ 'fieldtype': u'Link',
+ 'in_filter': 1,
+ 'label': u'Project Name',
+ 'oldfieldname': u'project_name',
+ 'oldfieldtype': u'Link',
+ 'options': u'Project',
+ 'permlevel': 0,
+ 'search_index': 1,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'allow_on_submit': 1,
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'select_print_heading',
+ 'fieldtype': u'Link',
+ 'label': u'Select Print Heading',
+ 'no_copy': 1,
+ 'oldfieldname': u'select_print_heading',
+ 'oldfieldtype': u'Link',
+ 'options': u'Print Heading',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'report_hide': 1,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'source',
+ 'fieldtype': u'Select',
+ 'label': u'Source',
+ 'oldfieldname': u'source',
+ 'oldfieldtype': u'Select',
+ 'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'company',
+ 'fieldtype': u'Link',
+ 'in_filter': 1,
+ 'label': u'Company',
+ 'oldfieldname': u'company',
+ 'oldfieldtype': u'Link',
+ 'options': u'Company',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 1,
+ 'search_index': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'fiscal_year',
+ 'fieldtype': u'Select',
+ 'in_filter': 1,
+ 'label': u'Fiscal Year',
+ 'no_copy': 0,
+ 'oldfieldname': u'fiscal_year',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Fiscal Year',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 1,
+ 'search_index': 0
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'doctype': u'DocField',
+ 'fieldname': u'cancel_reason',
+ 'fieldtype': u'Data',
+ 'label': u'Cancel Reason',
+ 'oldfieldname': u'cancel_reason',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'remarks',
+ 'fieldtype': u'Small Text',
+ 'label': u'Remarks',
+ 'no_copy': 1,
+ 'oldfieldname': u'remarks',
+ 'oldfieldtype': u'Text',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 0
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.is_pos',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
'label': u'Advances',
'oldfieldtype': u'Section Break',
'permlevel': 0,
@@ -1326,7 +1329,7 @@
'oldfieldtype': u'Column Break',
'permlevel': 0,
'print_hide': 1,
- 'width': u'45%'
+ 'width': u'50%'
},
# DocField
@@ -1346,6 +1349,17 @@
# DocField
{
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
'doctype': u'DocField',
'fieldname': u'commission_rate',
'fieldtype': u'Currency',
@@ -1373,13 +1387,10 @@
# DocField
{
- 'colour': u'White:FFF',
'doctype': u'DocField',
- 'fieldtype': u'Column Break',
- 'oldfieldtype': u'Column Break',
- 'permlevel': 0,
- 'print_hide': 1,
- 'width': u'55%'
+ 'fieldtype': u'Section Break',
+ 'options': u'Simple',
+ 'permlevel': 0
},
# DocField
@@ -1397,33 +1408,6 @@
# DocField
{
- 'allow_on_submit': 1,
- 'doctype': u'DocField',
- 'fieldtype': u'Button',
- 'label': u'Repair Outstanding Amt',
- 'oldfieldtype': u'Button',
- 'options': u'repair_rv_outstanding',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': u'DocField',
- 'fieldname': u'against_income_account',
- 'fieldtype': u'Small Text',
- 'hidden': 1,
- 'label': u'Against Income Account',
- 'no_copy': 1,
- 'oldfieldname': u'against_income_account',
- 'oldfieldtype': u'Small Text',
- 'permlevel': 0,
- 'print_hide': 1,
- 'report_hide': 1
- },
-
- # DocField
- {
'depends_on': u'eval:doc.docstatus==1',
'doctype': u'DocField',
'fieldtype': u'Section Break',
@@ -1530,5 +1514,32 @@
'no_copy': 1,
'permlevel': 1,
'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'against_income_account',
+ 'fieldtype': u'Small Text',
+ 'hidden': 1,
+ 'label': u'Against Income Account',
+ 'no_copy': 1,
+ 'oldfieldname': u'against_income_account',
+ 'oldfieldtype': u'Small Text',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'report_hide': 1
+ },
+
+ # DocField
+ {
+ 'allow_on_submit': 1,
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Repair Outstanding Amt',
+ 'oldfieldtype': u'Button',
+ 'options': u'repair_rv_outstanding',
+ 'permlevel': 0,
+ 'print_hide': 1
}
]
\ No newline at end of file
diff --git a/erpnext/accounts/doctype/rv_detail/rv_detail.txt b/erpnext/accounts/doctype/rv_detail/rv_detail.txt
index 94a4583..a4bf824 100644
--- a/erpnext/accounts/doctype/rv_detail/rv_detail.txt
+++ b/erpnext/accounts/doctype/rv_detail/rv_detail.txt
@@ -5,209 +5,199 @@
{
'creation': '2010-08-08 17:09:20',
'docstatus': 0,
- 'modified': '2011-06-20 13:02:03',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-24 16:14:38',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocType
{
- 'autoname': 'INVD.######',
- 'colour': 'White:FFF',
+ 'autoname': u'INVD.######',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
'istable': 1,
- 'module': 'Accounts',
+ 'module': u'Accounts',
'name': '__common__',
- 'section_style': 'Tray',
- 'server_code_error': ' ',
+ 'section_style': u'Tray',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'version': 22
+ 'version': 25
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'RV Detail',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'RV Detail',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# DocType, RV Detail
{
'doctype': 'DocType',
- 'name': 'RV Detail'
+ 'name': u'RV Detail'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_code',
- 'fieldtype': 'Link',
- 'idx': 1,
+ 'doctype': u'DocField',
+ 'fieldname': u'item_code',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Item',
- 'oldfieldname': 'item_code',
- 'oldfieldtype': 'Link',
- 'options': 'Item',
+ 'label': u'Item',
+ 'oldfieldname': u'item_code',
+ 'oldfieldtype': u'Link',
+ 'options': u'Item',
'permlevel': 0,
- 'print_hide': 1,
+ 'print_hide': 0,
'reqd': 0,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_name',
- 'fieldtype': 'Data',
- 'idx': 2,
+ 'doctype': u'DocField',
+ 'fieldname': u'item_name',
+ 'fieldtype': u'Data',
'in_filter': 0,
- 'label': 'Item Name',
- 'oldfieldname': 'item_name',
- 'oldfieldtype': 'Data',
+ 'label': u'Item Name',
+ 'oldfieldname': u'item_name',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
+ 'print_hide': 1,
'reqd': 1,
'search_index': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'description',
- 'fieldtype': 'Text',
- 'idx': 3,
- 'label': 'Description',
- 'oldfieldname': 'description',
- 'oldfieldtype': 'Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'description',
+ 'fieldtype': u'Text',
+ 'label': u'Description',
+ 'oldfieldname': u'description',
+ 'oldfieldtype': u'Text',
'permlevel': 0,
'reqd': 1,
- 'width': '300px'
+ 'width': u'200px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'stock_uom',
- 'fieldtype': 'Data',
- 'idx': 4,
- 'label': 'UOM',
+ 'doctype': u'DocField',
+ 'fieldname': u'stock_uom',
+ 'fieldtype': u'Data',
+ 'label': u'UOM',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'qty',
- 'fieldtype': 'Currency',
- 'idx': 5,
- 'label': 'Qty',
- 'oldfieldname': 'qty',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'qty',
+ 'fieldtype': u'Currency',
+ 'label': u'Qty',
+ 'oldfieldname': u'qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'ref_rate',
- 'fieldtype': 'Currency',
- 'idx': 6,
- 'label': 'Ref Rate',
- 'oldfieldname': 'ref_rate',
- 'oldfieldtype': 'Currency',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'ref_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Price List Rate',
+ 'oldfieldname': u'ref_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'adj_rate',
- 'fieldtype': 'Float',
- 'idx': 7,
- 'label': 'Discount (%)',
- 'oldfieldname': 'adj_rate',
- 'oldfieldtype': 'Float',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'adj_rate',
+ 'fieldtype': u'Float',
+ 'label': u'Discount (%)',
+ 'oldfieldname': u'adj_rate',
+ 'oldfieldtype': u'Float',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'export_rate',
- 'fieldtype': 'Currency',
- 'idx': 8,
- 'label': 'Basic Rate',
- 'oldfieldname': 'export_rate',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'export_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Basic Rate',
+ 'oldfieldname': u'export_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'export_amount',
- 'fieldtype': 'Currency',
- 'idx': 9,
- 'label': 'Amount',
- 'oldfieldname': 'export_amount',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'export_amount',
+ 'fieldtype': u'Currency',
+ 'label': u'Amount',
+ 'oldfieldname': u'export_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'reqd': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'base_ref_rate',
- 'fieldtype': 'Currency',
- 'idx': 10,
- 'label': 'Ref Rate*',
- 'oldfieldname': 'base_ref_rate',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'base_ref_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Price List Rate*',
+ 'oldfieldname': u'base_ref_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'basic_rate',
- 'fieldtype': 'Currency',
- 'idx': 11,
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'basic_rate',
+ 'fieldtype': u'Currency',
'in_filter': 0,
- 'label': 'Basic Rate*',
- 'oldfieldname': 'basic_rate',
- 'oldfieldtype': 'Currency',
+ 'label': u'Basic Rate*',
+ 'oldfieldname': u'basic_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'amount',
- 'fieldtype': 'Currency',
- 'idx': 12,
- 'label': 'Amount*',
- 'oldfieldname': 'amount',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'amount',
+ 'fieldtype': u'Currency',
+ 'label': u'Amount*',
+ 'oldfieldname': u'amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 1
@@ -215,167 +205,158 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'warehouse',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'warehouse',
+ 'fieldtype': u'Link',
'hidden': 0,
- 'idx': 13,
- 'label': 'Warehouse',
- 'oldfieldname': 'warehouse',
- 'oldfieldtype': 'Link',
- 'options': 'Warehouse',
+ 'label': u'Warehouse',
+ 'oldfieldname': u'warehouse',
+ 'oldfieldtype': u'Link',
+ 'options': u'Warehouse',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'income_account',
- 'fieldtype': 'Link',
- 'idx': 14,
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'income_account',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Income Account',
- 'oldfieldname': 'income_account',
- 'oldfieldtype': 'Link',
- 'options': 'Account',
+ 'label': u'Income Account',
+ 'oldfieldname': u'income_account',
+ 'oldfieldtype': u'Link',
+ 'options': u'Account',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'search_index': 1,
- 'trigger': 'Client',
- 'width': '120px'
+ 'trigger': u'Client',
+ 'width': u'120px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'cost_center',
- 'fieldtype': 'Link',
- 'idx': 15,
+ 'colour': u'White:FFF',
+ 'default': u'Purchase - TC',
+ 'doctype': u'DocField',
+ 'fieldname': u'cost_center',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Cost Center',
- 'oldfieldname': 'cost_center',
- 'oldfieldtype': 'Link',
- 'options': 'Cost Center',
+ 'label': u'Cost Center',
+ 'oldfieldname': u'cost_center',
+ 'oldfieldtype': u'Link',
+ 'options': u'Cost Center',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
- 'search_index': 1,
- 'trigger': 'Client',
- 'width': '120px'
+ 'trigger': u'Client',
+ 'width': u'120px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'serial_no',
- 'fieldtype': 'Small Text',
- 'idx': 16,
- 'label': 'Serial No',
- 'oldfieldname': 'serial_no',
- 'oldfieldtype': 'Small Text',
- 'permlevel': 0,
- 'print_hide': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'batch_no',
- 'fieldtype': 'Link',
- 'idx': 17,
- 'label': 'Batch No',
- 'options': 'Batch',
- 'permlevel': 0,
- 'print_hide': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'item_group',
- 'fieldtype': 'Link',
- 'idx': 18,
+ 'doctype': u'DocField',
+ 'fieldname': u'serial_no',
+ 'fieldtype': u'Small Text',
'in_filter': 1,
- 'label': 'Item Group',
- 'oldfieldname': 'item_group',
- 'oldfieldtype': 'Link',
- 'options': 'Item Group',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'brand',
- 'fieldtype': 'Data',
- 'idx': 19,
- 'in_filter': 1,
- 'label': 'Brand Name',
- 'oldfieldname': 'brand',
- 'oldfieldtype': 'Data',
+ 'label': u'Serial No',
+ 'oldfieldname': u'serial_no',
+ 'oldfieldtype': u'Small Text',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'actual_qty',
- 'fieldtype': 'Currency',
- 'idx': 20,
- 'label': 'Available Qty at Warehouse',
- 'oldfieldname': 'actual_qty',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
+ 'doctype': u'DocField',
+ 'fieldname': u'batch_no',
+ 'fieldtype': u'Link',
+ 'label': u'Batch No',
+ 'options': u'Batch',
+ 'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'delivered_qty',
- 'fieldtype': 'Currency',
- 'idx': 21,
- 'label': 'Delivered Qty',
- 'oldfieldname': 'delivered_qty',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'sales_order',
- 'fieldtype': 'Link',
- 'idx': 22,
+ 'doctype': u'DocField',
+ 'fieldname': u'item_group',
+ 'fieldtype': u'Link',
+ 'hidden': 1,
'in_filter': 1,
- 'label': 'Sales Order',
- 'oldfieldname': 'sales_order',
- 'oldfieldtype': 'Link',
- 'options': 'Sales Order',
+ 'label': u'Item Group',
+ 'oldfieldname': u'item_group',
+ 'oldfieldtype': u'Link',
+ 'options': u'Item Group',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'brand',
+ 'fieldtype': u'Data',
+ 'hidden': 1,
+ 'in_filter': 1,
+ 'label': u'Brand Name',
+ 'oldfieldname': u'brand',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'actual_qty',
+ 'fieldtype': u'Currency',
+ 'label': u'Available Qty at Warehouse',
+ 'oldfieldname': u'actual_qty',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'delivered_qty',
+ 'fieldtype': u'Currency',
+ 'label': u'Delivered Qty',
+ 'oldfieldname': u'delivered_qty',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'sales_order',
+ 'fieldtype': u'Link',
+ 'in_filter': 1,
+ 'label': u'Sales Order',
+ 'oldfieldname': u'sales_order',
+ 'oldfieldtype': u'Link',
+ 'options': u'Sales Order',
'permlevel': 1,
'print_hide': 1,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'so_detail',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'so_detail',
+ 'fieldtype': u'Data',
'hidden': 1,
- 'idx': 23,
'in_filter': 1,
- 'label': 'SO Detail ',
- 'oldfieldname': 'so_detail',
- 'oldfieldtype': 'Data',
+ 'label': u'SO Detail ',
+ 'oldfieldname': u'so_detail',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@@ -383,32 +364,30 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'delivery_note',
- 'fieldtype': 'Link',
- 'idx': 24,
+ 'doctype': u'DocField',
+ 'fieldname': u'delivery_note',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Delivery Note',
- 'oldfieldname': 'delivery_note',
- 'oldfieldtype': 'Link',
- 'options': 'Delivery Note',
+ 'label': u'Delivery Note',
+ 'oldfieldname': u'delivery_note',
+ 'oldfieldtype': u'Link',
+ 'options': u'Delivery Note',
'permlevel': 1,
'print_hide': 1,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'dn_detail',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'dn_detail',
+ 'fieldtype': u'Data',
'hidden': 1,
- 'idx': 25,
'in_filter': 1,
- 'label': 'DN Detail',
- 'oldfieldname': 'dn_detail',
- 'oldfieldtype': 'Data',
+ 'label': u'DN Detail',
+ 'oldfieldname': u'dn_detail',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@@ -416,29 +395,27 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_tax_rate',
- 'fieldtype': 'Small Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_tax_rate',
+ 'fieldtype': u'Small Text',
'hidden': 1,
- 'idx': 26,
- 'label': 'Item Tax Rate',
- 'oldfieldname': 'item_tax_rate',
- 'oldfieldtype': 'Small Text',
+ 'label': u'Item Tax Rate',
+ 'oldfieldname': u'item_tax_rate',
+ 'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'clear_pending',
- 'fieldtype': 'Check',
+ 'doctype': u'DocField',
+ 'fieldname': u'clear_pending',
+ 'fieldtype': u'Check',
'hidden': 1,
- 'idx': 27,
- 'label': 'Clear Pending',
+ 'label': u'Clear Pending',
'no_copy': 1,
- 'oldfieldname': 'clear_pending',
- 'oldfieldtype': 'Check',
+ 'oldfieldname': u'clear_pending',
+ 'oldfieldtype': u'Check',
'permlevel': 1,
'print_hide': 1
},
@@ -446,12 +423,10 @@
# DocField
{
'allow_on_submit': 1,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'page_break',
- 'fieldtype': 'Check',
- 'idx': 28,
- 'label': 'Page Break',
+ 'doctype': u'DocField',
+ 'fieldname': u'page_break',
+ 'fieldtype': u'Check',
+ 'label': u'Page Break',
'no_copy': 1,
'permlevel': 0,
'print_hide': 1,
diff --git a/erpnext/accounts/doctype/rv_tax_detail/rv_tax_detail.txt b/erpnext/accounts/doctype/rv_tax_detail/rv_tax_detail.txt
index 784c3b7..4a4c68a 100644
--- a/erpnext/accounts/doctype/rv_tax_detail/rv_tax_detail.txt
+++ b/erpnext/accounts/doctype/rv_tax_detail/rv_tax_detail.txt
@@ -5,166 +5,169 @@
{
'creation': '2010-08-08 17:09:20',
'docstatus': 0,
- 'modified': '2011-12-28 17:33:30',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-23 15:49:43',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocType
{
- 'autoname': 'INVTD.######',
- 'colour': 'White:FFF',
- 'default_print_format': 'Standard',
+ 'autoname': u'INVTD.######',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
'hide_heading': 1,
'istable': 1,
- 'module': 'Accounts',
+ 'module': u'Accounts',
'name': '__common__',
- 'section_style': 'Tray',
- 'server_code_error': ' ',
+ 'section_style': u'Tray',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'version': 18
+ 'version': 20
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'RV Tax Detail',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'RV Tax Detail',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# DocType, RV Tax Detail
{
'doctype': 'DocType',
- 'name': 'RV Tax Detail'
+ 'name': u'RV Tax Detail'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'charge_type',
- 'fieldtype': 'Select',
- 'label': 'Type',
- 'oldfieldname': 'charge_type',
- 'oldfieldtype': 'Select',
- 'options': '\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total',
+ 'doctype': u'DocField',
+ 'fieldname': u'charge_type',
+ 'fieldtype': u'Select',
+ 'label': u'Type',
+ 'oldfieldname': u'charge_type',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nActual\nOn Net Total\nOn Previous Row Amount\nOn Previous Row Total',
'permlevel': 0,
'reqd': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'account_head',
- 'fieldtype': 'Link',
- 'label': 'Account Head',
- 'oldfieldname': 'account_head',
- 'oldfieldtype': 'Link',
- 'options': 'Account',
+ 'doctype': u'DocField',
+ 'fieldname': u'account_head',
+ 'fieldtype': u'Link',
+ 'label': u'Account Head',
+ 'oldfieldname': u'account_head',
+ 'oldfieldtype': u'Link',
+ 'options': u'Account',
'permlevel': 0,
'reqd': 1,
- 'trigger': 'Client'
+ 'search_index': 1,
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'cost_center_other_charges',
- 'fieldtype': 'Link',
- 'label': 'Cost Center',
- 'oldfieldname': 'cost_center_other_charges',
- 'oldfieldtype': 'Link',
- 'options': 'Cost Center',
+ 'doctype': u'DocField',
+ 'fieldname': u'cost_center_other_charges',
+ 'fieldtype': u'Link',
+ 'label': u'Cost Center',
+ 'oldfieldname': u'cost_center_other_charges',
+ 'oldfieldtype': u'Link',
+ 'options': u'Cost Center',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'description',
- 'fieldtype': 'Small Text',
- 'label': 'Description',
- 'oldfieldname': 'description',
- 'oldfieldtype': 'Small Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'description',
+ 'fieldtype': u'Small Text',
+ 'label': u'Description',
+ 'oldfieldname': u'description',
+ 'oldfieldtype': u'Small Text',
'permlevel': 0,
'reqd': 1,
- 'width': '300px'
+ 'width': u'300px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'rate',
- 'fieldtype': 'Currency',
- 'label': 'Rate',
- 'oldfieldname': 'rate',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Rate',
+ 'oldfieldname': u'rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'tax_amount',
- 'fieldtype': 'Currency',
- 'label': 'Amount*',
- 'oldfieldname': 'tax_amount',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'tax_amount',
+ 'fieldtype': u'Currency',
+ 'label': u'Amount*',
+ 'oldfieldname': u'tax_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'total',
- 'fieldtype': 'Currency',
- 'label': 'Total*',
- 'oldfieldname': 'total',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'total',
+ 'fieldtype': u'Currency',
+ 'label': u'Total*',
+ 'oldfieldname': u'total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'row_id',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'row_id',
+ 'fieldtype': u'Data',
'hidden': 0,
- 'label': 'Enter Row',
- 'oldfieldname': 'row_id',
- 'oldfieldtype': 'Data',
+ 'label': u'Enter Row',
+ 'oldfieldname': u'row_id',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_wise_tax_detail',
- 'fieldtype': 'Small Text',
- 'label': 'Item Wise Tax Detail ',
- 'oldfieldname': 'item_wise_tax_detail',
- 'oldfieldtype': 'Small Text',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_wise_tax_detail',
+ 'fieldtype': u'Small Text',
+ 'hidden': 1,
+ 'label': u'Item Wise Tax Detail ',
+ 'oldfieldname': u'item_wise_tax_detail',
+ 'oldfieldtype': u'Small Text',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'parenttype',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'parenttype',
+ 'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
- 'label': 'Parenttype',
- 'oldfieldname': 'parenttype',
- 'oldfieldtype': 'Data',
+ 'label': u'Parenttype',
+ 'oldfieldname': u'parenttype',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'search_index': 1
@@ -172,16 +175,16 @@
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Cheating Field\nPlease do not delete ',
- 'doctype': 'DocField',
- 'fieldname': 'total_tax_amount',
- 'fieldtype': 'Currency',
+ 'colour': u'White:FFF',
+ 'description': u'Cheating Field\nPlease do not delete ',
+ 'doctype': u'DocField',
+ 'fieldname': u'total_tax_amount',
+ 'fieldtype': u'Currency',
'hidden': 1,
- 'label': 'Total Tax Amount',
+ 'label': u'Total Tax Amount',
'no_copy': 1,
- 'oldfieldname': 'total_tax_amount',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'total_tax_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
@@ -189,15 +192,15 @@
# DocField
{
- 'description': 'Cheating Field\nPlease do not delete ',
- 'doctype': 'DocField',
- 'fieldname': 'total_amount',
- 'fieldtype': 'Currency',
+ 'description': u'Cheating Field\nPlease do not delete ',
+ 'doctype': u'DocField',
+ 'fieldname': u'total_amount',
+ 'fieldtype': u'Currency',
'hidden': 1,
- 'label': 'Total Amount',
+ 'label': u'Total Amount',
'no_copy': 1,
- 'oldfieldname': 'total_amount',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'total_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
@@ -206,11 +209,11 @@
# DocField
{
'allow_on_submit': 0,
- 'description': 'If checked, the tax amount will be considered as already included in the Print Rate / Print Amount',
- 'doctype': 'DocField',
- 'fieldname': 'included_in_print_rate',
- 'fieldtype': 'Check',
- 'label': 'Included in Print Rate',
+ 'description': u'If checked, the tax amount will be considered as already included in the Print Rate / Print Amount',
+ 'doctype': u'DocField',
+ 'fieldname': u'included_in_print_rate',
+ 'fieldtype': u'Check',
+ 'label': u'Included in Print Rate',
'no_column': 0,
'no_copy': 1,
'permlevel': 0,
diff --git a/erpnext/accounts/doctype/tds_category/tds_category.js b/erpnext/accounts/doctype/tds_category/tds_category.js
index 6ffef4a..3cad944 100644
--- a/erpnext/accounts/doctype/tds_category/tds_category.js
+++ b/erpnext/accounts/doctype/tds_category/tds_category.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/accounts/doctype/tds_category/tds_category.py b/erpnext/accounts/doctype/tds_category/tds_category.py
index 2b0eb74..7296af4 100644
--- a/erpnext/accounts/doctype/tds_category/tds_category.py
+++ b/erpnext/accounts/doctype/tds_category/tds_category.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/accounts/doctype/tds_control/tds_control.js b/erpnext/accounts/doctype/tds_control/tds_control.js
index 36e2660..fae4dd9 100644
--- a/erpnext/accounts/doctype/tds_control/tds_control.js
+++ b/erpnext/accounts/doctype/tds_control/tds_control.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
class DocType:
def __init__(self, doc, doclist=[]):
self.doc = doc
diff --git a/erpnext/accounts/doctype/tds_control/tds_control.py b/erpnext/accounts/doctype/tds_control/tds_control.py
index 69588d8..be1945d 100644
--- a/erpnext/accounts/doctype/tds_control/tds_control.py
+++ b/erpnext/accounts/doctype/tds_control/tds_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/accounts/doctype/tds_payment/tds_payment.js b/erpnext/accounts/doctype/tds_payment/tds_payment.js
index c21c505..e15fd13 100644
--- a/erpnext/accounts/doctype/tds_payment/tds_payment.js
+++ b/erpnext/accounts/doctype/tds_payment/tds_payment.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc,cdt,cdn){
cur_frm.cscript.refresh(doc, cdt, cdn);
}
diff --git a/erpnext/accounts/doctype/tds_payment/tds_payment.py b/erpnext/accounts/doctype/tds_payment/tds_payment.py
index 5079d04..cf97426 100644
--- a/erpnext/accounts/doctype/tds_payment/tds_payment.py
+++ b/erpnext/accounts/doctype/tds_payment/tds_payment.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/accounts/doctype/tds_return_acknowledgement/tds_return_acknowledgement.js b/erpnext/accounts/doctype/tds_return_acknowledgement/tds_return_acknowledgement.js
index 82d84ea..a0cede6 100644
--- a/erpnext/accounts/doctype/tds_return_acknowledgement/tds_return_acknowledgement.js
+++ b/erpnext/accounts/doctype/tds_return_acknowledgement/tds_return_acknowledgement.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.fields_dict['quarter'].get_query = function(doc, cdt, cdn) {
if(doc.fiscal_year)
return 'SELECT `tabPeriod`.name FROM `tabPeriod` WHERE `tabPeriod`.fiscal_year = "'+doc.fiscal_year+'" AND `tabPeriod`.period_type = "Quarter" AND `tabPeriod`.docstatus != 2 AND `tabPeriod`.name LIKE "%s" ORDER BY `tabPeriod`.start_date ASC LIMIT 50';
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.js b/erpnext/accounts/page/accounts_browser/accounts_browser.js
index 13416e6..60c168d 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.js
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.js
@@ -1,11 +1,35 @@
-pscript['onload_Accounts Browser'] = function(){
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+pscript['onshow_Accounts Browser'] = function(){
wn.require('lib/js/legacy/widgets/tree.js');
- // if the user directly loads the page, ask to select the chart
- var parent = $i('ab_body');
- parent.innerHTML = 'Please select your chart: '
- var sel = $a(parent,'select');
- add_sel_options(sel, ['Account', 'Cost Center'], 'Account');
- var btn = $btn(parent, 'Go', function() { pscript.make_chart(sel_val(sel)); }, {marginTop:'8px'});
+
+ var route = decodeURIComponent(location.hash);
+ if(route.indexOf('/')!=-1) {
+ var chart_type = route.split('/')[1];
+ pscript.make_chart(chart_type);
+ return;
+ }
+
+ // if the user directly loads the page, ask to select the chart
+ var parent = $i('ab_body');
+ parent.innerHTML = 'Please select your chart: '
+ var sel = $a(parent,'select');
+ add_sel_options(sel, ['Account', 'Cost Center'], 'Account');
+ var btn = $btn(parent, 'Go', function() { pscript.make_chart(sel_val(sel)); }, {marginTop:'8px'});
}
pscript.make_chart = function(b) {
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/accounts/page/accounts_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/accounts/page/accounts_home/__init__.py
diff --git a/erpnext/accounts/page/accounts_home/accounts_home.html b/erpnext/accounts/page/accounts_home/accounts_home.html
new file mode 100644
index 0000000..12c80eb
--- /dev/null
+++ b/erpnext/accounts/page/accounts_home/accounts_home.html
@@ -0,0 +1,144 @@
+<div class="layout-wrapper layout-wrapper-background">
+ <div class="layout-main-section">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Accounts</h1>
+ <hr>
+ <div style="width: 48%; float: left;">
+ <h4><a href="#!List/Journal Voucher">Journal Voucher</a></h4>
+ <p class="help">General Ledger Entries</p>
+ <h4><a href="#!List/Sales Invoice">Sales Invoice</a></h4>
+ <p class="help">Bills raised to Customers</p>
+ <h4><a href="#!List/Purchase Invoice">Purchase Invoice</a></h4>
+ <p class="help">Bills raised by Suppliers</p>
+ </div>
+ <div style="width: 48%; float: right;">
+ <h4><a href="#!Accounts Browser/Account">Chart of Accounts</a></h4>
+ <p class="help">Structure of books of accounts</p>
+ <h4><a href="#!Accounts Browser/Cost Center">Chart of Cost Centers</a></h4>
+ <p class="help">Structure cost centers</p>
+ </div>
+ <div style="clear: both"></div>
+ <hr>
+ <h3>Reports</h3>
+ <div class="reports-list"></div>
+ </div>
+ <div class="layout-side-section">
+ <div class="psidebar">
+ <div class="section">
+ <div class="section-head">Tools</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title="Update system bank entries (JV) with actual bank trasaction"
+ href="#!Form/Bank Reconciliation/Bank Reconciliation">Bank Reconciliation</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title="Cancel off untracked Payments (JV) against Invoices"
+ href="#!Form/Internal Reconciliation/Internal Reconciliation">Payment Reconciliation</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title="Clear your P/L account and balance your Balance Sheets"
+ href="#!List/Period Closing Voucher">Close Period Entry</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title="Export multiple Account Ledgers (GL) to spreadsheet (csv)"
+ href="#!Form/Ledger Balance Export/Ledger Balance Export">Export Multiple Ledgers (GL)</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title="Lease Agreements"
+ href="#!List/Lease Agreement">Lease Agreements</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Helper for managing return of goods (sales or purchase)"
+ href="#!Form/Sales and Purchase Return Wizard/Sales and Purchase Return Wizard">Sales or Purchase Returns</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Analyze Sales and Purchase trends and slice them based on item, customer, groups etc"
+ href="#!Report/Profile/Trend Analyzer">Trend Analyzer</a>
+ </div>
+
+
+ </div>
+ </div>
+
+ <div class="section">
+ <div class="section-head">Setup</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "Tax and charges structure master on sales transactions"
+ href="#!List/Other Charges">Sales Other Charges</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Tax and charges structure master on purchase transactions"
+ href="#!List/Purchase Other Charges">Purchase Other Charges</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Defaults for Point of Sale (Retail) type of Invoices"
+ href="#!List/POS Setting">Point of Sale (PoS) Setting</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Seasonal distributions for budgets"
+ href="#!List/Budget Distribution">Budget Distribution</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Terms of contract template"
+ href="#!List/Term">Order Terms Template</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Mode of Payment master"
+ href="#!List/Mode of Payment">Mode of Payment</a>
+ </div>
+ </div>
+ </div>
+
+ <div class="section india-specific">
+ <div class="section-head">Tax Deduction (India)</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "Tax Deduction at Source (TDS) payments to be made to the goverment"
+ href="#!List/TDS Payment">TDS Payments</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Update with acknowledgement recd from the government"
+ href="#!List/TDS Return Acknowledgement">TDS Return Acknowledgement</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Tax deduction (TDS) categories"
+ href="#!List/TDS Category">TDS Category</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Tax deduction (TDS) rates for different periods"
+ href="#!List/TDS Rate Chart">TDS Rate Chart</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Challan given to employees/suppliers whose tax (TDS) has been deducted"
+ href="#!List/Form 16A">Form 16A</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "C-Forms received from customers"
+ href="#!List/C-Form">C-Form</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/accounts/page/accounts_home/accounts_home.js b/erpnext/accounts/page/accounts_home/accounts_home.js
new file mode 100644
index 0000000..4551db0
--- /dev/null
+++ b/erpnext/accounts/page/accounts_home/accounts_home.js
@@ -0,0 +1,22 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+pscript['onload_accounts-home'] = function(wrapper) {
+ erpnext.module_page.setup_page('Accounts', wrapper);
+ if(wn.control_panel.country!='India') {
+ $('.india-specific').toggle(false);
+ }
+}
\ No newline at end of file
diff --git a/erpnext/accounts/page/accounts_home/accounts_home.txt b/erpnext/accounts/page/accounts_home/accounts_home.txt
new file mode 100644
index 0000000..5cbceff
--- /dev/null
+++ b/erpnext/accounts/page/accounts_home/accounts_home.txt
@@ -0,0 +1,28 @@
+# Page, accounts-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-21 13:23:08',
+ 'docstatus': 0,
+ 'modified': '2012-02-21 13:23:08',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Accounts',
+ 'name': '__common__',
+ 'page_name': u'accounts-home',
+ 'standard': u'Yes',
+ 'title': u'Accounts Home'
+ },
+
+ # Page, accounts-home
+ {
+ 'doctype': 'Page',
+ 'name': u'accounts-home'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/accounts/page/financial_statements/financial_statements.js b/erpnext/accounts/page/financial_statements/financial_statements.js
index da269cb..372f5ae 100644
--- a/erpnext/accounts/page/financial_statements/financial_statements.js
+++ b/erpnext/accounts/page/financial_statements/financial_statements.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript['onload_Financial Statements'] = function() {
// header and toolbar
diff --git a/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.js b/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.js
index 0c3f88e..f4da7e8 100644
--- a/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.js
+++ b/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.py b/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.py
index 44daddc..cbb622f 100644
--- a/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.py
+++ b/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Check mandatory filters
# ------------------------------------------------------------------
diff --git a/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.js b/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.js
index f31dc76..efc2ec3 100644
--- a/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.js
+++ b/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.py b/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.py
index e6005a6..5a5f4b4 100644
--- a/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Check mandatory filters
#------------------------------
diff --git a/erpnext/accounts/search_criteria/bank_clearance_report/bank_clearance_report.js b/erpnext/accounts/search_criteria/bank_clearance_report/bank_clearance_report.js
index 00254bc..b5f9ffd 100644
--- a/erpnext/accounts/search_criteria/bank_clearance_report/bank_clearance_report.js
+++ b/erpnext/accounts/search_criteria/bank_clearance_report/bank_clearance_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
diff --git a/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.js b/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.js
index 00b905e..f6bec4b 100644
--- a/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.js
+++ b/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.py
index ed74d49..b9a126c 100644
--- a/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.py
+++ b/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
#get company
company = filter_values.get('company') or get_defaults()['company']
diff --git a/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.js b/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.js
index 08c9693..5cc644c 100644
--- a/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.js
+++ b/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',report_default:'Quarterly',ignore : 1, parent:'Budget Detail'});
this.add_filter({fieldname:'company', label:'Company', fieldtype:'Link', options:'Company', report_default:sys_defaults.company, ignore : 1, parent:'Budget Detail', in_first_page:1});
diff --git a/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.py b/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.py
index 9f7c690..7000630 100644
--- a/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.py
+++ b/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# validate Filters
flt_dict = {'fiscal_year': 'Fiscal Year', 'period': 'Period'}
for f in flt_dict:
diff --git a/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.js b/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.js
index 99e3b05..eb24630 100644
--- a/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.js
+++ b/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'Sales Partner'].df.filter_hide = 0;
diff --git a/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.py b/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.py
index 0ab2c62..e30fa00 100644
--- a/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.py
+++ b/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
colwidths[col_idx['Business Associate']] = '200px'
coltypes[col_idx['Average Commission Rate']] = 'Currency'
diff --git a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.js b/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.js
index 558dc78..8bcfa15 100644
--- a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.js
+++ b/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
this.add_filter({fieldname:'show_group_balance', label:'Show Group Balance', fieldtype:'Select', options:NEWLINE+'Yes'+NEWLINE+'No',ignore : 1, parent:'Account'});
diff --git a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.py b/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.py
index dea1120..4c29803 100644
--- a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.py
+++ b/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cl = [['Account','Data', '200px'],['Debit/Credit', 'Data', '100px'], ['Group/Ledger', 'Data', '100px'], ['Opening','Data', '100px'],['Closing', 'Data', '100px'],['Inc in Cash','Data','100px']]
for c in cl:
diff --git a/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.js b/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.js
index f2d5be3..e098cc3 100644
--- a/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.js
+++ b/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
this.add_filter({fieldname:'report', label:'Report Type', fieldtype:'Select', options:NEWLINE + 'CENVAT CREDIT ACCOUNT - INPUTS (R.G.23 A - PART II)' + NEWLINE + 'CAPITAL GOODS - INPUTS (R.G. 23 C - PART II)', ignore : 1, parent:'Journal Voucher Detail'})
diff --git a/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.py b/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.py
index 1013616..cfdd45f 100644
--- a/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.py
+++ b/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Add columns
# -----------
row_list = [['Date', 'Date', '150px', '']
diff --git a/erpnext/accounts/search_criteria/collection_report/collection_report.js b/erpnext/accounts/search_criteria/collection_report/collection_report.js
index 8559103..411c4aa 100644
--- a/erpnext/accounts/search_criteria/collection_report/collection_report.js
+++ b/erpnext/accounts/search_criteria/collection_report/collection_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/collection_report/collection_report.py b/erpnext/accounts/search_criteria/collection_report/collection_report.py
index 5d814fc..fe0cb57 100644
--- a/erpnext/accounts/search_criteria/collection_report/collection_report.py
+++ b/erpnext/accounts/search_criteria/collection_report/collection_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
#check mandatory
if not filter_values.get('posting_date') or not filter_values.get('posting_date1'):
msgprint("Please select From Posting Date and To Posting Date ")
diff --git a/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.js b/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.js
index 29c6ab2..d33a4e8 100644
--- a/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.js
+++ b/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.py b/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.py
index 01cff8e..e46d548 100644
--- a/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.py
+++ b/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Add columns
# -----------
row_list = [['Cost Center','Data','160px'],
diff --git a/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.js b/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.js
index fffb263..b3f1a09 100644
--- a/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.js
+++ b/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
//to hide all filters
diff --git a/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.py b/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.py
index ca318c7..a2fa8ed 100644
--- a/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.py
+++ b/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
#get company
company = filter_values.get('company') or get_defaults()['company']
diff --git a/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.js b/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.js
index fffb263..b3f1a09 100644
--- a/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.js
+++ b/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
//to hide all filters
diff --git a/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.py b/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.py
index ca318c7..a2fa8ed 100644
--- a/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.py
+++ b/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
#get company
company = filter_values.get('company') or get_defaults()['company']
diff --git a/erpnext/accounts/search_criteria/general_ledger/general_ledger.js b/erpnext/accounts/search_criteria/general_ledger/general_ledger.js
index 7140389..3d6505f 100644
--- a/erpnext/accounts/search_criteria/general_ledger/general_ledger.js
+++ b/erpnext/accounts/search_criteria/general_ledger/general_ledger.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.mytabs.tabs['Select Columns'].hide();
//to hide all filters
diff --git a/erpnext/accounts/search_criteria/general_ledger/general_ledger.py b/erpnext/accounts/search_criteria/general_ledger/general_ledger.py
index 8c855cf..c78b584 100644
--- a/erpnext/accounts/search_criteria/general_ledger/general_ledger.py
+++ b/erpnext/accounts/search_criteria/general_ledger/general_ledger.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
#get company letter head
#---------------------------------------------------------------------
l_head = sql("select content from `tabLetter Head` where ifnull(is_default, 0) = 1 and ifnull(disabled, 0) = 0")
diff --git a/erpnext/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.js b/erpnext/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.js
index e73b4a8..ecd5057 100644
--- a/erpnext/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.js
+++ b/erpnext/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
filter_list = ['From Voucher Date', 'To Voucher Date', 'Credit To', 'Is Opening', 'From Posting Date', 'To Posting Date']
diff --git a/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js b/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js
index b2bc8a9..d243717 100755
--- a/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js
+++ b/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
filter_list = ['From Voucher Date', 'To Voucher Date', 'Debit To', 'From Posting Date', 'To Posting Date']
diff --git a/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.js b/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.js
index 4cb3d2b..d25139c 100644
--- a/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.js
+++ b/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.py b/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.py
index e749d1b..68f0167 100644
--- a/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.py
+++ b/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
data =[
['Agreement No.','Data','100px',''],
['Lessee Name','Data','300px',''],
diff --git a/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.js b/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.js
index 2d89611..7d8152b 100644
--- a/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.js
+++ b/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.py b/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.py
index 8e5b8ad..692f6f8 100644
--- a/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.py
+++ b/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
data =[
['Month','Data','100px',''],
['Year','Data','100px',''],
diff --git a/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.js b/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.js
index 2d89611..7d8152b 100644
--- a/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.js
+++ b/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.py b/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.py
index 869d46a..debb3ca 100644
--- a/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.py
+++ b/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
data =[
['Agreement No.','Data','100px',''],
['Lessee Name','Data','300px',''],
diff --git a/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.js b/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.js
index 2d89611..7d8152b 100644
--- a/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.js
+++ b/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.py b/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.py
index 5e16489..0723760 100644
--- a/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.py
+++ b/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
data =[
['Lessee Name','Data','300px',''],
['Below 30 Days','Currency','120px',''],
diff --git a/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.js b/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.js
index 4cb3d2b..d25139c 100644
--- a/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.js
+++ b/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.py b/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.py
index 8e5b8ad..692f6f8 100644
--- a/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.py
+++ b/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
data =[
['Month','Data','100px',''],
['Year','Data','100px',''],
diff --git a/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.js b/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.js
index 4cb3d2b..d25139c 100644
--- a/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.js
+++ b/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.py b/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.py
index b84ff9f..2d13808 100644
--- a/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.py
+++ b/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
data =[
['Lessee Name','Data','300px',''],
['Amount','Currency','120px','']
diff --git a/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.js b/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.js
index 2d89611..7d8152b 100644
--- a/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.js
+++ b/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.py b/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.py
index 0163ba6..8c1842a 100644
--- a/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.py
+++ b/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
data =[
['Year','Data','100px',''],
['Amount','Currency','120px','']
diff --git a/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.js b/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.js
index d5b5d4d..2fc1c9c 100644
--- a/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.js
+++ b/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
flds = ['ID','Owner','Cost Center','From Posting Date', 'To Posting Date', 'Against Voucher','Voucher Type','Voucher No','Is Cancelled','Is Opening','Remarks', 'From Aging Date', 'To Aging Date', 'Company']
for(i=0;i<flds.length;i++){
diff --git a/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.py b/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.py
index 9811b28..d723f70 100644
--- a/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.py
+++ b/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
if not filter_values['account']:
msgprint("Please Enter filter value for Account")
raise Exception
diff --git a/erpnext/accounts/search_criteria/payment_receipt_report/payment_receipt_report.py b/erpnext/accounts/search_criteria/payment_receipt_report/payment_receipt_report.py
index f92f72c..fd7ce58 100644
--- a/erpnext/accounts/search_criteria/payment_receipt_report/payment_receipt_report.py
+++ b/erpnext/accounts/search_criteria/payment_receipt_report/payment_receipt_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
if not filter_values.get('posting_date'):
msgprint("Enter From Posting Date.")
raise Exception
diff --git a/erpnext/accounts/search_criteria/payment_report/payment_report.js b/erpnext/accounts/search_criteria/payment_report/payment_report.js
index 96f7079..6571b69 100644
--- a/erpnext/accounts/search_criteria/payment_report/payment_report.js
+++ b/erpnext/accounts/search_criteria/payment_report/payment_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/payment_report/payment_report.py b/erpnext/accounts/search_criteria/payment_report/payment_report.py
index 99ce3e0..8252103 100644
--- a/erpnext/accounts/search_criteria/payment_report/payment_report.py
+++ b/erpnext/accounts/search_criteria/payment_report/payment_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
#check mendatory
if not filter_values.get('posting_date') or not filter_values.get('posting_date1'):
msgprint("Please select From Posting Date and To Posting Date in 'Set Filters' section")
diff --git a/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.js b/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.js
index 3771af8..f96e933 100644
--- a/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.js
+++ b/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.py b/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.py
index 07de853..3cac167 100644
--- a/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.py
+++ b/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Add columns
# -----------
row_list = [['Date', 'Date', '150px', '']
diff --git a/erpnext/accounts/search_criteria/purchase_register/purchase_register.py b/erpnext/accounts/search_criteria/purchase_register/purchase_register.py
index e955815..eb61af4 100644
--- a/erpnext/accounts/search_criteria/purchase_register/purchase_register.py
+++ b/erpnext/accounts/search_criteria/purchase_register/purchase_register.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# add expense head columns
expense_acc = [c[0] for c in sql("""select distinct expense_head
from `tabPV Detail`
diff --git a/erpnext/accounts/search_criteria/sales_register/sales_register.js b/erpnext/accounts/search_criteria/sales_register/sales_register.js
index 826fb4d..669d76d 100644
--- a/erpnext/accounts/search_criteria/sales_register/sales_register.js
+++ b/erpnext/accounts/search_criteria/sales_register/sales_register.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
diff --git a/erpnext/accounts/search_criteria/sales_register/sales_register.py b/erpnext/accounts/search_criteria/sales_register/sales_register.py
index 2cd1d4b..8bb6903 100644
--- a/erpnext/accounts/search_criteria/sales_register/sales_register.py
+++ b/erpnext/accounts/search_criteria/sales_register/sales_register.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# add additional columns
cl = [c[0] for c in sql("""select distinct account_head
diff --git a/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.js b/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.js
index c87a927..7c4c331 100644
--- a/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.js
+++ b/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
this.add_filter({fieldname:'main_acc_head', label:'Main Account Head', fieldtype:'Link', options:'Account', ignore : 1, parent:'Journal Voucher Detail'});
diff --git a/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.py b/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.py
index b10307b..78b992c 100644
--- a/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.py
+++ b/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Add columns
# -----------
row_list = [['Date', 'Date', '150px', '']
diff --git a/erpnext/accounts/search_criteria/tds_return/tds_return.js b/erpnext/accounts/search_criteria/tds_return/tds_return.js
index 95f03a0..17cc2b3 100644
--- a/erpnext/accounts/search_criteria/tds_return/tds_return.js
+++ b/erpnext/accounts/search_criteria/tds_return/tds_return.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/tds_return/tds_return.py b/erpnext/accounts/search_criteria/tds_return/tds_return.py
index 4ee2770..24e7308 100644
--- a/erpnext/accounts/search_criteria/tds_return/tds_return.py
+++ b/erpnext/accounts/search_criteria/tds_return/tds_return.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
if not filter_values.get('tds_category'):
msgprint("Please enter TDS Category")
raise Exception
diff --git a/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.js b/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.js
index e1c127b..72fd4b5 100644
--- a/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.js
+++ b/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.py b/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.py
index 752c002..c3f819f 100644
--- a/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.py
+++ b/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# columns
colnames[0] = 'Account'
col_idx['Account'] = 0
diff --git a/erpnext/accounts/search_criteria/trial_balance/trial_balance.js b/erpnext/accounts/search_criteria/trial_balance/trial_balance.js
index 7cfe459..9a26ea2 100644
--- a/erpnext/accounts/search_criteria/trial_balance/trial_balance.js
+++ b/erpnext/accounts/search_criteria/trial_balance/trial_balance.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/trial_balance/trial_balance.py b/erpnext/accounts/search_criteria/trial_balance/trial_balance.py
index 994a5b8..34a828a 100644
--- a/erpnext/accounts/search_criteria/trial_balance/trial_balance.py
+++ b/erpnext/accounts/search_criteria/trial_balance/trial_balance.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Columns
#----------
cl = [['Account','Data', '200px'],['Debit/Credit', 'Data', '100px'], ['Group/Ledger', 'Data', '100px'], ['Is PL Account', 'Data', '100px'], ['Opening (Dr)','Data', '100px'], ['Opening (Cr)','Data', '100px'],['Debit', 'Data', '100px'],['Credit', 'Data', '100px'],['Closing (Dr)', 'Data', '100px'],['Closing (Cr)', 'Data', '100px']]
diff --git a/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.js b/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.js
index a89fa86..41ead1c 100644
--- a/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.js
+++ b/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.py b/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.py
index 91e90f2..4dbfb52 100644
--- a/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.py
+++ b/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
if filter_values.get('based_on') == 'Sales Invoice':
based_on_dt = 'Receivable Voucher'
else:
diff --git a/erpnext/accounts/utils/__init__.py b/erpnext/accounts/utils/__init__.py
index e8ca13e..f98c79e 100644
--- a/erpnext/accounts/utils/__init__.py
+++ b/erpnext/accounts/utils/__init__.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
from webnotes.model.doc import make_autoname, Document, addchild
# Posts JV
diff --git a/erpnext/analysis/doctype/mis_control/mis_control.py b/erpnext/analysis/doctype/mis_control/mis_control.py
index 5af36e9..11e48f4 100644
--- a/erpnext/analysis/doctype/mis_control/mis_control.py
+++ b/erpnext/analysis/doctype/mis_control/mis_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/analysis/doctype/ta_control/ta_control.py b/erpnext/analysis/doctype/ta_control/ta_control.py
index 87754ae..f06394c 100755
--- a/erpnext/analysis/doctype/ta_control/ta_control.py
+++ b/erpnext/analysis/doctype/ta_control/ta_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.js b/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.js
index 68aa856..bc33d33 100644
--- a/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.js
+++ b/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
diff --git a/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.py b/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.py
index c485497..8a7d8c4 100644
--- a/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.py
+++ b/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
if filter_values.get('period'):
period_values = filter_values.get('period').split(NEWLINE)
diff --git a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.js b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.js
index 9426a23..a25215c 100644
--- a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.js
+++ b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py
index d92330a..2198204 100644
--- a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py
+++ b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# ********************************************* INITIALIZATION *******************************************
out = []
@@ -105,7 +121,7 @@
# Territory
if territory or based_on == 'Territory':
add_tab += ' ,`tabTerritory` t11 '
- add_cond += ' AND t1.territory = t11.name AND t1.territory = t11.name and (t11.name = "%s" or t11.name IN (SELECT t12.name FROM `tabTerritory` t12,`tabTerritory` t13 WHERE t12.lft BETWEEN t13.lft and t13.rgt and t12.docstatus !=2 and ifnull(t12.is_group,"No") = "No" and t13.name = "%s"))' % (based_on != 'Territory' and territory or '%(value)s', based_on != 'Territory' and territory or '%(value)s')
+ add_cond += ' AND t1.territory = t11.name and (t11.name = "%s" or t11.name IN (SELECT t12.name FROM `tabTerritory` t12,`tabTerritory` t13 WHERE t12.lft BETWEEN t13.lft and t13.rgt and t12.docstatus !=2 and ifnull(t12.is_group,"No") = "No" and t13.name = "%s"))' % (based_on != 'Territory' and territory or '%(value)s', based_on != 'Territory' and territory or '%(value)s')
# Supplier
if supplier or based_on == 'Supplier':
diff --git a/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.js b/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.js
index dd99d28..febd6a3 100644
--- a/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.js
+++ b/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.mytabs.items['Select Columns'].hide()
this.hide_all_filters();
diff --git a/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.py b/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.py
index 22d6f00..99465a8 100644
--- a/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.py
+++ b/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
if not filter_values.get('from_fiscal_year'):
msgprint("Please Select From Fiscal Year")
raise Exception
diff --git a/erpnext/buying/doctype/indent/indent.js b/erpnext/buying/doctype/indent/indent.js
index 28c5a5a..570e06c 100644
--- a/erpnext/buying/doctype/indent/indent.js
+++ b/erpnext/buying/doctype/indent/indent.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.tname = "Indent Detail";
cur_frm.cscript.fname = "indent_details";
diff --git a/erpnext/buying/doctype/indent/indent.py b/erpnext/buying/doctype/indent/indent.py
index 148d50d..c601c91 100644
--- a/erpnext/buying/doctype/indent/indent.py
+++ b/erpnext/buying/doctype/indent/indent.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/buying/doctype/po_detail/po_detail.txt b/erpnext/buying/doctype/po_detail/po_detail.txt
index 4e17c22..49bed15 100755
--- a/erpnext/buying/doctype/po_detail/po_detail.txt
+++ b/erpnext/buying/doctype/po_detail/po_detail.txt
@@ -5,52 +5,52 @@
{
'creation': '2010-08-08 17:09:12',
'docstatus': 0,
- 'modified': '2012-01-10 16:38:21',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-27 14:47:48',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocType
{
- 'autoname': 'POD/.#####',
- 'colour': 'White:FFF',
- 'default_print_format': 'Standard',
+ 'autoname': u'POD/.#####',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
'istable': 1,
- 'module': 'Buying',
+ 'module': u'Buying',
'name': '__common__',
- 'section_style': 'Tray',
- 'server_code_error': ' ',
+ 'section_style': u'Tray',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'version': 61
+ 'version': 62
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'PO Detail',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'PO Detail',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# DocType, PO Detail
{
'doctype': 'DocType',
- 'name': 'PO Detail'
+ 'name': u'PO Detail'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'schedule_date',
- 'fieldtype': 'Date',
+ 'doctype': u'DocField',
+ 'fieldname': u'schedule_date',
+ 'fieldtype': u'Date',
'hidden': 0,
'in_filter': 1,
- 'label': 'Reqd By Date',
+ 'label': u'Reqd By Date',
'no_copy': 1,
- 'oldfieldname': 'schedule_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'schedule_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
@@ -59,31 +59,31 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_code',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_code',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Item Code',
- 'oldfieldname': 'item_code',
- 'oldfieldtype': 'Link',
- 'options': 'Item',
+ 'label': u'Item Code',
+ 'oldfieldname': u'item_code',
+ 'oldfieldtype': u'Link',
+ 'options': u'Item',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_name',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_name',
+ 'fieldtype': u'Data',
'hidden': 0,
'in_filter': 1,
- 'label': 'Item Name',
- 'oldfieldname': 'item_name',
- 'oldfieldtype': 'Data',
+ 'label': u'Item Name',
+ 'oldfieldname': u'item_name',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
@@ -92,110 +92,110 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'description',
- 'fieldtype': 'Small Text',
- 'label': 'Description',
- 'oldfieldname': 'description',
- 'oldfieldtype': 'Small Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'description',
+ 'fieldtype': u'Small Text',
+ 'label': u'Description',
+ 'oldfieldname': u'description',
+ 'oldfieldtype': u'Small Text',
'permlevel': 0,
'reqd': 1,
- 'width': '300px'
+ 'width': u'300px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'qty',
- 'fieldtype': 'Currency',
- 'label': 'Quantity',
- 'oldfieldname': 'qty',
- 'oldfieldtype': 'Currency',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'qty',
+ 'fieldtype': u'Currency',
+ 'label': u'Quantity',
+ 'oldfieldname': u'qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 1,
- 'trigger': 'Client',
- 'width': '60px'
+ 'trigger': u'Client',
+ 'width': u'60px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'import_ref_rate',
- 'fieldtype': 'Currency',
- 'label': 'Ref Rate ',
+ 'doctype': u'DocField',
+ 'fieldname': u'import_ref_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Ref Rate ',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'discount_rate',
- 'fieldtype': 'Currency',
- 'label': 'Discount %',
+ 'doctype': u'DocField',
+ 'fieldname': u'discount_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Discount %',
'permlevel': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'import_rate',
- 'fieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'import_rate',
+ 'fieldtype': u'Currency',
'hidden': 0,
- 'label': 'Rate ',
- 'oldfieldname': 'import_rate',
- 'oldfieldtype': 'Currency',
+ 'label': u'Rate ',
+ 'oldfieldname': u'import_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'import_amount',
- 'fieldtype': 'Currency',
- 'label': 'Amount',
- 'oldfieldname': 'import_amount',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'import_amount',
+ 'fieldtype': u'Currency',
+ 'label': u'Amount',
+ 'oldfieldname': u'import_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'purchase_ref_rate',
- 'fieldtype': 'Currency',
- 'label': 'Ref Rate *',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_ref_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Ref Rate *',
'permlevel': 0
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'purchase_rate',
- 'fieldtype': 'Currency',
- 'label': 'Rate (Default Curr.) *',
- 'oldfieldname': 'purchase_rate',
- 'oldfieldtype': 'Currency',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Rate (Default Curr.) *',
+ 'oldfieldname': u'purchase_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'amount',
- 'fieldtype': 'Currency',
- 'label': 'Amount (Default Curr.)',
- 'oldfieldname': 'amount',
- 'oldfieldtype': 'Currency',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'amount',
+ 'fieldtype': u'Currency',
+ 'label': u'Amount (Default Curr.)',
+ 'oldfieldname': u'amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 1
@@ -203,28 +203,28 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'warehouse',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'warehouse',
+ 'fieldtype': u'Link',
'hidden': 0,
- 'label': 'Warehouse',
- 'oldfieldname': 'warehouse',
- 'oldfieldtype': 'Link',
- 'options': 'Warehouse',
+ 'label': u'Warehouse',
+ 'oldfieldname': u'warehouse',
+ 'oldfieldtype': u'Link',
+ 'options': u'Warehouse',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'project_name',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'project_name',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Project Name',
- 'options': 'Project',
+ 'label': u'Project Name',
+ 'options': u'Project',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0
@@ -232,96 +232,96 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'uom',
- 'fieldtype': 'Link',
- 'label': 'UOM',
- 'oldfieldname': 'uom',
- 'oldfieldtype': 'Link',
- 'options': 'UOM',
+ 'doctype': u'DocField',
+ 'fieldname': u'uom',
+ 'fieldtype': u'Link',
+ 'label': u'UOM',
+ 'oldfieldname': u'uom',
+ 'oldfieldtype': u'Link',
+ 'options': u'UOM',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'conversion_factor',
- 'fieldtype': 'Currency',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'conversion_factor',
+ 'fieldtype': u'Currency',
'hidden': 0,
- 'label': 'Conversion Factor',
- 'oldfieldname': 'conversion_factor',
- 'oldfieldtype': 'Currency',
+ 'label': u'UOM Conversion Factor',
+ 'oldfieldname': u'conversion_factor',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'stock_uom',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'stock_uom',
+ 'fieldtype': u'Data',
'hidden': 0,
- 'label': 'Stock UOM',
- 'oldfieldname': 'stock_uom',
- 'oldfieldtype': 'Data',
+ 'label': u'Stock UOM',
+ 'oldfieldname': u'stock_uom',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'reqd': 1,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'prevdoc_doctype',
- 'fieldtype': 'Data',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'prevdoc_doctype',
+ 'fieldtype': u'Data',
'hidden': 1,
- 'label': 'Prevdoc DocType',
+ 'label': u'Prevdoc DocType',
'no_copy': 0,
- 'oldfieldname': 'prevdoc_doctype',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'prevdoc_doctype',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'prevdoc_docname',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'prevdoc_docname',
+ 'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
- 'label': 'Purchase Requisition No',
+ 'label': u'Purchase Requisition No',
'no_copy': 0,
- 'oldfieldname': 'prevdoc_docname',
- 'oldfieldtype': 'Link',
- 'options': 'Indent',
+ 'oldfieldname': u'prevdoc_docname',
+ 'oldfieldtype': u'Link',
+ 'options': u'Indent',
'permlevel': 1,
'print_hide': 1,
'search_index': 1,
- 'width': '120px'
+ 'width': u'120px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'prevdoc_date',
- 'fieldtype': 'Date',
- 'hidden': 0,
+ 'doctype': u'DocField',
+ 'fieldname': u'prevdoc_date',
+ 'fieldtype': u'Date',
+ 'hidden': 1,
'in_filter': 1,
- 'label': 'Purchase Requisition Date',
- 'oldfieldname': 'prevdoc_date',
- 'oldfieldtype': 'Date',
+ 'label': u'Purchase Requisition Date',
+ 'oldfieldname': u'prevdoc_date',
+ 'oldfieldtype': u'Date',
'permlevel': 1,
'print_hide': 1,
'search_index': 0
@@ -329,16 +329,16 @@
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'prevdoc_detail_docname',
- 'fieldtype': 'Data',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'prevdoc_detail_docname',
+ 'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
- 'label': 'Purchase Requisition Detail No',
+ 'label': u'Purchase Requisition Detail No',
'no_copy': 0,
- 'oldfieldname': 'prevdoc_detail_docname',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'prevdoc_detail_docname',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@@ -346,91 +346,91 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'brand',
- 'fieldtype': 'Link',
- 'hidden': 0,
- 'label': 'Brand',
- 'oldfieldname': 'brand',
- 'oldfieldtype': 'Link',
- 'options': 'Brand',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'item_group',
- 'fieldtype': 'Link',
- 'hidden': 0,
- 'in_filter': 1,
- 'label': 'Item Group',
- 'oldfieldname': 'item_group',
- 'oldfieldtype': 'Link',
- 'options': 'Item Group',
- 'permlevel': 1,
- 'print_hide': 1,
- 'search_index': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'stock_qty',
- 'fieldtype': 'Currency',
- 'hidden': 0,
- 'label': 'Stock Qty',
- 'no_copy': 1,
- 'oldfieldname': 'stock_qty',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1,
- 'trigger': 'Client',
- 'width': '100px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'received_qty',
- 'fieldtype': 'Currency',
- 'hidden': 0,
- 'label': 'Received Qty',
- 'no_copy': 1,
- 'oldfieldname': 'received_qty',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'billed_qty',
- 'fieldtype': 'Currency',
- 'hidden': 0,
- 'label': 'Billed Quantity',
- 'no_copy': 1,
- 'oldfieldname': 'billed_qty',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Tax detail table fetched from item master as a string and stored in this field.\nUsed for Purchase Other Charges',
- 'doctype': 'DocField',
- 'fieldname': 'item_tax_rate',
- 'fieldtype': 'Small Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'brand',
+ 'fieldtype': u'Link',
'hidden': 1,
- 'label': 'Item Tax Rate',
- 'oldfieldname': 'item_tax_rate',
- 'oldfieldtype': 'Small Text',
+ 'label': u'Brand',
+ 'oldfieldname': u'brand',
+ 'oldfieldtype': u'Link',
+ 'options': u'Brand',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'item_group',
+ 'fieldtype': u'Link',
+ 'hidden': 1,
+ 'in_filter': 1,
+ 'label': u'Item Group',
+ 'oldfieldname': u'item_group',
+ 'oldfieldtype': u'Link',
+ 'options': u'Item Group',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'search_index': 0
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'stock_qty',
+ 'fieldtype': u'Currency',
+ 'hidden': 0,
+ 'label': u'Stock Qty',
+ 'no_copy': 1,
+ 'oldfieldname': u'stock_qty',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'trigger': u'Client',
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'received_qty',
+ 'fieldtype': u'Currency',
+ 'hidden': 0,
+ 'label': u'Received Qty',
+ 'no_copy': 1,
+ 'oldfieldname': u'received_qty',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'billed_qty',
+ 'fieldtype': u'Currency',
+ 'hidden': 0,
+ 'label': u'Billed Quantity',
+ 'no_copy': 1,
+ 'oldfieldname': u'billed_qty',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Tax detail table fetched from item master as a string and stored in this field.\nUsed for Purchase Other Charges',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_tax_rate',
+ 'fieldtype': u'Small Text',
+ 'hidden': 1,
+ 'label': u'Item Tax Rate',
+ 'oldfieldname': u'item_tax_rate',
+ 'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1
@@ -439,14 +439,14 @@
# DocField
{
'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'page_break',
- 'fieldtype': 'Check',
+ 'doctype': u'DocField',
+ 'fieldname': u'page_break',
+ 'fieldtype': u'Check',
'hidden': 0,
- 'label': 'Page Break',
+ 'label': u'Page Break',
'no_copy': 1,
- 'oldfieldname': 'page_break',
- 'oldfieldtype': 'Check',
+ 'oldfieldname': u'page_break',
+ 'oldfieldtype': u'Check',
'permlevel': 0,
'print_hide': 1
}
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index 323d956..317df51 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// Preset
// ------
// cur_frm.cscript.tname - Details table name
@@ -50,6 +66,92 @@
}
+
+
+var set_dynamic_label_par = function(doc, cdt, cdn, base_curr) {
+ //parent flds
+ par_cols_base = {'net_total': 'Net Total', 'total_tax': 'Total Tax', 'grand_total': 'Grand Total', /*'rounded_total': 'Rounded Total',*/
+ 'in_words': 'In Words', 'other_charges_added': 'Other Charges Added', 'other_charges_deducted': 'Other Charges Deducted'}
+ par_cols_import = {'net_total_import': 'Net Total', 'grand_total_import': 'Grand Total', 'in_words_import': 'In Words',
+ 'other_charges_added_import': 'Other Charges Added', 'other_charges_deducted_import': 'Other Charges Deducted'};
+
+ for (d in par_cols_base) cur_frm.fields_dict[d].label_area.innerHTML = par_cols_base[d]+' (' + base_curr + ')';
+ for (d in par_cols_import) cur_frm.fields_dict[d].label_area.innerHTML = par_cols_import[d]+' (' + doc.currency + ')';
+ cur_frm.fields_dict['conversion_rate'].label_area.innerHTML = "Conversion Rate (" + doc.currency +' -> '+ base_curr + ')';
+
+ if (doc.doctype == 'Payable Voucher') {
+ cur_frm.fields_dict['total_tds_on_voucher'].label_area.innerHTML = 'Total TDS On Voucher (' + base_curr + ')';
+ cur_frm.fields_dict['outstanding_amount'].label_area.innerHTML = 'Outstanding Amount (' + base_curr + ')';
+ cur_frm.fields_dict['tds_amount_on_advance'].label_area.innerHTML = 'TDS Amount On Advance (' + base_curr + ')';
+ cur_frm.fields_dict['total_advance'].label_area.innerHTML = 'Total Advance (Incl. TDS) (' + base_curr + ')';
+ cur_frm.fields_dict['total_amount_to_pay'].label_area.innerHTML = 'Total Amount To Pay (' + base_curr + ')';
+ cur_frm.fields_dict['ded_amount'].label_area.innerHTML = 'TDS Amount (' + base_curr + ')';
+ } else cur_frm.fields_dict['rounded_total'].label_area.innerHTML = 'Rounded Total (' + base_curr + ')';
+
+}
+
+
+var set_dynamic_label_child = function(doc, cdt, cdn, base_curr) {
+ // item table flds
+ item_cols_base = {'purchase_ref_rate': 'Ref Rate', 'amount': 'Amount'};
+ item_cols_import = {'import_rate': 'Rate', 'import_ref_rate': 'Ref Rate', 'import_amount': 'Amount'};
+
+ for (d in item_cols_base) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_base[d]+' ('+base_curr+')');
+ for (d in item_cols_import) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_import[d]+' ('+doc.currency+')');
+
+ var hide = (doc.currency == sys_defaults['currency']) ? false : true;
+ for (f in item_cols_base) cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide);
+ if (doc.doctype == 'Payable Voucher') {
+ $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-rate"]').html('Rate ('+base_curr+')');
+ cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('rate', hide);
+ // advance table flds
+ adv_cols = {'advance_amount': 'Advance Amount', 'allocated_amount': 'Allocated Amount', 'tds_amount': 'TDS Amount', 'tds_allocated': 'TDS Allocated'}
+ for (d in adv_cols) $('[data-grid-fieldname="Advance Allocation Detail-'+d+'"]').html(adv_cols[d]+' ('+base_curr+')');
+ }
+ else {
+ $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-purchase_rate"]').html('Rate ('+base_curr+')');
+ cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp('purchase_rate', hide);
+ }
+
+ //tax table flds
+ tax_cols = {'tax_amount': 'Amount', 'total': 'Aggregate Total'};
+ for (d in tax_cols) $('[data-grid-fieldname="Purchase Tax Detail-'+d+'"]').html(tax_cols[d]+' ('+base_curr+')');
+}
+
+// Change label dynamically based on currency
+//------------------------------------------------------------------
+
+cur_frm.cscript.dynamic_label = function(doc, cdt, cdn, callback1) {
+ var callback = function(r, rt) {
+ if (r.message) base_curr = r.message;
+ else base_curr = sys_defaults['currency'];
+
+ if (base_curr == doc.currency) {
+ set_multiple(cdt, cdn, {conversion_rate:1});
+ hide_field(['conversion_rate', 'net_total_import','grand_total_import', 'in_words_import', 'other_charges_added_import', 'other_charges_deducted_import']);
+ } else unhide_field(['conversion_rate', 'net_total_import','grand_total_import', 'in_words_import', 'other_charges_added_import', 'other_charges_deducted_import']);
+
+ set_dynamic_label_par(doc, cdt, cdn, base_curr);
+ set_dynamic_label_child(doc, cdt, cdn, base_curr);
+
+ if(callback1) callback1(doc, cdt, cdn);
+ }
+
+ if (doc.company == sys_defaults['company']) callback('', '');
+ else wn.call({
+ method: 'selling.doctype.sales_common.sales_common.get_comp_base_currency',
+ args: {company: doc.company},
+ callback: callback
+ });
+}
+
+cur_frm.cscript.currency = function(doc, cdt, cdn) {
+ cur_frm.cscript.dynamic_label(doc, cdt, cdn);
+}
+
+cur_frm.cscript.company = cur_frm.cscript.currency;
+
+
// ======================== Conversion Rate ==========================================
cur_frm.cscript.conversion_rate = function(doc,cdt,cdn) {
cur_frm.cscript.calc_amount( doc, 1);
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.py b/erpnext/buying/doctype/purchase_common/purchase_common.py
index 4a49373..ca9181f 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.py
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
@@ -180,6 +196,8 @@
if not rate[0]['last_purchase_rate']:
msgprint("%s has no Last Purchase Rate."% d.item_code)
+
+
# validation
# -------------------------------------------------------------------------------------------------------
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js
index 8435c02..7af1204 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.tname = "PO Detail";
cur_frm.cscript.fname = "po_details";
cur_frm.cscript.other_fname = "purchase_tax_details";
@@ -25,17 +41,22 @@
}
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
- if(doc.__islocal){
- cur_frm.cscript.get_default_schedule_date(doc);
- }
+ var callback = function(doc, cdt, cdn) {
+ if(doc.__islocal){
+ cur_frm.cscript.get_default_schedule_date(doc);
+ }
+ }
+ cur_frm.cscript.dynamic_label(doc, cdt, cdn, callback);
}
// ================================== Refresh ==========================================
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
-
// Show buttons
// ---------------------------------
cur_frm.clear_custom_buttons();
+
+ if (!cur_frm.cscript.is_onload) cur_frm.cscript.dynamic_label(doc, cdt, cdn);
+
if(doc.docstatus == 1 && doc.status != 'Stopped'){
var ch = getchildren('PO Detail',doc.name,'po_details');
var allow_billing = 0; var allow_receipt = 0;
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py
index d4c308d..7945807 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.py
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
@@ -83,6 +99,8 @@
def get_tc_details(self):
return get_obj('Purchase Common').get_tc_details(self)
+
+
# validate if indent has been pulled twice
def validate_prev_docname(self):
for d in getlist(self.doclist, 'po_details'):
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.txt b/erpnext/buying/doctype/purchase_order/purchase_order.txt
index c367a3b..c73683e 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.txt
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.txt
@@ -5,62 +5,62 @@
{
'creation': '2010-08-08 17:09:15',
'docstatus': 0,
- 'modified': '2012-01-10 16:19:19',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-27 17:51:53',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Purchase Order',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'Purchase Order',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# These values are common for all DocType
{
- '_last_update': '1306471022',
- 'colour': 'White:FFF',
- 'default_print_format': 'Standard',
+ '_last_update': u'1330339817',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
- 'document_type': 'Transaction',
+ 'document_type': u'Transaction',
'is_transaction_doc': 1,
- 'module': 'Buying',
+ 'module': u'Buying',
'name': '__common__',
'read_only_onload': 1,
- 'search_fields': 'status, transaction_date, supplier,grand_total',
- 'section_style': 'Tabbed',
- 'server_code_error': ' ',
+ 'search_fields': u'status, transaction_date, supplier,grand_total',
+ 'section_style': u'Tabbed',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'subject': 'To %(supplier_name)s on %(transaction_date)s | %(per_received)s% delivered',
- 'version': 495
+ 'subject': u'To %(supplier_name)s on %(transaction_date)s | %(per_received)s% delivered',
+ 'version': 500
},
# These values are common for all DocFormat
{
- 'doctype': 'DocFormat',
+ 'doctype': u'DocFormat',
'name': '__common__',
- 'parent': 'Purchase Order',
- 'parentfield': 'formats',
- 'parenttype': 'DocType'
+ 'parent': u'Purchase Order',
+ 'parentfield': u'formats',
+ 'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'name': '__common__',
- 'parent': 'Purchase Order',
- 'parentfield': 'permissions',
- 'parenttype': 'DocType',
+ 'parent': u'Purchase Order',
+ 'parentfield': u'permissions',
+ 'parenttype': u'DocType',
'read': 1
},
# DocType, Purchase Order
{
'doctype': 'DocType',
- 'name': 'Purchase Order'
+ 'name': u'Purchase Order'
},
# DocPerm
@@ -68,9 +68,9 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Production Manager',
+ 'role': u'Production Manager',
'submit': 0,
'write': 1
},
@@ -80,9 +80,9 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Material User',
+ 'role': u'Material User',
'submit': 0,
'write': 0
},
@@ -92,9 +92,9 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Material User',
+ 'role': u'Material User',
'submit': 0,
'write': 0
},
@@ -104,9 +104,9 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Purchase Manager',
+ 'role': u'Purchase Manager',
'submit': 0,
'write': 0
},
@@ -116,9 +116,9 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Purchase Manager',
+ 'role': u'Purchase Manager',
'submit': 1,
'write': 1
},
@@ -128,9 +128,9 @@
'amend': 1,
'cancel': 0,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Purchase User',
+ 'role': u'Purchase User',
'submit': 0,
'write': 1
},
@@ -140,9 +140,9 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'All',
+ 'role': u'All',
'submit': 0,
'write': 0
},
@@ -152,9 +152,9 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Supplier',
+ 'role': u'Supplier',
'submit': 0,
'write': 0
},
@@ -164,64 +164,64 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 2,
- 'role': 'All',
+ 'role': u'All',
'submit': 0,
'write': 1
},
# DocFormat
{
- 'doctype': 'DocFormat',
- 'format': 'Purchase Order Classic'
+ 'doctype': u'DocFormat',
+ 'format': u'Purchase Order Classic'
},
# DocFormat
{
- 'doctype': 'DocFormat',
- 'format': 'Purchase Order Modern'
+ 'doctype': u'DocFormat',
+ 'format': u'Purchase Order Modern'
},
# DocFormat
{
- 'doctype': 'DocFormat',
- 'format': 'Purchase Order Spartan'
+ 'doctype': u'DocFormat',
+ 'format': u'Purchase Order Spartan'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Enter rates and quantity of items you want to purchase and send the purchase order to your supplier.',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Basic Info',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Enter rates and quantity of items you want to purchase and send the purchase order to your supplier.',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Basic Info',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'To manage multiple series please go to Setup > Manage Series',
- 'doctype': 'DocField',
- 'fieldname': 'naming_series',
- 'fieldtype': 'Select',
- 'label': 'Series',
+ 'colour': u'White:FFF',
+ 'description': u'To manage multiple series please go to Setup > Manage Series',
+ 'doctype': u'DocField',
+ 'fieldname': u'naming_series',
+ 'fieldtype': u'Select',
+ 'label': u'Series',
'no_copy': 1,
- 'oldfieldname': 'naming_series',
- 'oldfieldtype': 'Select',
- 'options': '\nPO',
+ 'oldfieldname': u'naming_series',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nPO',
'permlevel': 0,
'print_hide': 1,
'reqd': 1
@@ -229,132 +229,132 @@
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Supplier (vendor) name as entered in supplier master',
- 'doctype': 'DocField',
- 'fieldname': 'supplier',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'description': u'Supplier (vendor) name as entered in supplier master',
+ 'doctype': u'DocField',
+ 'fieldname': u'supplier',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Supplier',
- 'oldfieldname': 'supplier',
- 'oldfieldtype': 'Link',
- 'options': 'Supplier',
+ 'label': u'Supplier',
+ 'oldfieldname': u'supplier',
+ 'oldfieldtype': u'Link',
+ 'options': u'Supplier',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'supplier_address',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'supplier_address',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Supplier Address',
- 'options': 'Address',
+ 'label': u'Supplier Address',
+ 'options': u'Address',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_person',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_person',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Contact Person',
- 'options': 'Contact',
+ 'label': u'Contact Person',
+ 'options': u'Contact',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'supplier_name',
- 'fieldtype': 'Data',
- 'label': 'Name',
+ 'doctype': u'DocField',
+ 'fieldname': u'supplier_name',
+ 'fieldtype': u'Data',
+ 'label': u'Name',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'address_display',
- 'fieldtype': 'Small Text',
- 'label': 'Address',
+ 'doctype': u'DocField',
+ 'fieldname': u'address_display',
+ 'fieldtype': u'Small Text',
+ 'label': u'Address',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_display',
- 'fieldtype': 'Small Text',
- 'label': 'Contact',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_display',
+ 'fieldtype': u'Small Text',
+ 'label': u'Contact',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_mobile',
- 'fieldtype': 'Text',
- 'label': 'Mobile No',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_mobile',
+ 'fieldtype': u'Text',
+ 'label': u'Mobile No',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_email',
- 'fieldtype': 'Text',
- 'label': 'Contact Email',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_email',
+ 'fieldtype': u'Text',
+ 'label': u'Contact Email',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
'print_hide': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'The date at which current entry is made in system.',
- 'doctype': 'DocField',
- 'fieldname': 'transaction_date',
- 'fieldtype': 'Date',
+ 'colour': u'White:FFF',
+ 'description': u'The date at which current entry is made in system.',
+ 'doctype': u'DocField',
+ 'fieldname': u'transaction_date',
+ 'fieldtype': u'Date',
'in_filter': 1,
- 'label': 'Purchase Order Date',
- 'oldfieldname': 'transaction_date',
- 'oldfieldtype': 'Date',
+ 'label': u'Purchase Order Date',
+ 'oldfieldname': u'transaction_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'reqd': 1,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'status',
- 'fieldtype': 'Select',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'status',
+ 'fieldtype': u'Select',
'in_filter': 1,
- 'label': 'Status',
+ 'label': u'Status',
'no_copy': 1,
- 'oldfieldname': 'status',
- 'oldfieldtype': 'Select',
- 'options': '\nDraft\nSubmitted\nStopped\nCancelled',
+ 'oldfieldname': u'status',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nDraft\nSubmitted\nStopped\nCancelled',
'permlevel': 1,
'print_hide': 1,
'reqd': 1,
@@ -363,122 +363,95 @@
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Track this Purchase Order against any Project',
- 'doctype': 'DocField',
- 'fieldname': 'project_name',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'description': u'Track this Purchase Order against any Project',
+ 'doctype': u'DocField',
+ 'fieldname': u'project_name',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Project Name',
- 'oldfieldname': 'project_name',
- 'oldfieldtype': 'Link',
- 'options': 'Project',
+ 'label': u'Project Name',
+ 'oldfieldname': u'project_name',
+ 'oldfieldtype': u'Link',
+ 'options': u'Project',
'permlevel': 0,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'depends_on': 'eval:!doc.__islocal',
- 'description': '% of materials received against this Purchase Order',
- 'doctype': 'DocField',
- 'fieldname': 'per_received',
- 'fieldtype': 'Currency',
- 'label': '% Received',
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'description': u'% of materials received against this Purchase Order',
+ 'doctype': u'DocField',
+ 'fieldname': u'per_received',
+ 'fieldtype': u'Currency',
+ 'label': u'% Received',
'no_copy': 1,
- 'oldfieldname': 'per_received',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'per_received',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'depends_on': 'eval:!doc.__islocal',
- 'description': '% of materials billed against this Purchase Order.',
- 'doctype': 'DocField',
- 'fieldname': 'per_billed',
- 'fieldtype': 'Currency',
- 'label': '% Billed',
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'description': u'% of materials billed against this Purchase Order.',
+ 'doctype': u'DocField',
+ 'fieldname': u'per_billed',
+ 'fieldtype': u'Currency',
+ 'label': u'% Billed',
'no_copy': 1,
- 'oldfieldname': 'per_billed',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'per_billed',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Items',
- 'oldfieldtype': 'Section Break',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'You can make a purchase order from multiple Purchase Requisitions. Select Purchase Requisitions one by one and click on the button below.',
- 'doctype': 'DocField',
- 'fieldname': 'indent_no',
- 'fieldtype': 'Link',
- 'hidden': 0,
- 'label': 'Select Purchase Requisition',
- 'no_copy': 1,
- 'oldfieldname': 'indent_no',
- 'oldfieldtype': 'Link',
- 'options': 'Indent',
+ 'default': u'No',
+ 'doctype': u'DocField',
+ 'fieldname': u'is_subcontracted',
+ 'fieldtype': u'Select',
+ 'label': u'Is Subcontracted',
+ 'options': u'\nYes\nNo',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'hidden': 0,
- 'label': 'Get Items',
- 'oldfieldtype': 'Button',
- 'options': 'get_indent_details',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Items',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'is_subcontracted',
- 'fieldtype': 'Select',
- 'label': 'Is Subcontracted',
- 'options': '\nYes\nNo',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
'permlevel': 0,
- 'print_hide': 1
+ 'width': u'50%'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'permlevel': 0,
- 'width': '50%'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': "Supplier's currency",
- 'doctype': 'DocField',
- 'fieldname': 'currency',
- 'fieldtype': 'Select',
- 'label': 'Currency',
+ 'colour': u'White:FFF',
+ 'description': u"Supplier's currency",
+ 'doctype': u'DocField',
+ 'fieldname': u'currency',
+ 'fieldtype': u'Select',
+ 'label': u'Currency',
'no_copy': 0,
- 'oldfieldname': 'currency',
- 'oldfieldtype': 'Select',
- 'options': 'link:Currency',
+ 'oldfieldname': u'currency',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1
@@ -486,65 +459,101 @@
# DocField
{
- 'colour': 'White:FFF',
- 'default': '1',
- 'description': "Rate at which supplier's currency is converted to your currency",
- 'doctype': 'DocField',
- 'fieldname': 'conversion_rate',
- 'fieldtype': 'Currency',
+ 'colour': u'White:FFF',
+ 'default': u'1',
+ 'description': u"Rate at which supplier's currency is converted to company's base currency",
+ 'doctype': u'DocField',
+ 'fieldname': u'conversion_rate',
+ 'fieldtype': u'Currency',
'hidden': 0,
- 'label': 'Conversion Rate',
+ 'label': u'Conversion Rate',
'no_copy': 1,
- 'oldfieldname': 'conversion_rate',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'conversion_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'You can make a purchase order from multiple Purchase Requisitions. Select Purchase Requisitions one by one and click on the button below.',
+ 'doctype': u'DocField',
+ 'fieldname': u'indent_no',
+ 'fieldtype': u'Link',
+ 'hidden': 0,
+ 'label': u'Select Purchase Requisition',
+ 'no_copy': 1,
+ 'oldfieldname': u'indent_no',
+ 'oldfieldtype': u'Link',
+ 'options': u'Indent',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'hidden': 0,
+ 'label': u'Get Items',
+ 'oldfieldtype': u'Button',
+ 'options': u'get_indent_details',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'po_details',
- 'fieldtype': 'Table',
- 'label': 'PO Details',
+ 'doctype': u'DocField',
+ 'fieldname': u'po_details',
+ 'fieldtype': u'Table',
+ 'label': u'PO Details',
'no_copy': 0,
- 'oldfieldname': 'po_details',
- 'oldfieldtype': 'Table',
- 'options': 'PO Detail',
+ 'oldfieldname': u'po_details',
+ 'oldfieldtype': u'Table',
+ 'options': u'PO Detail',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Get Last Purchase Rate',
- 'oldfieldtype': 'Button',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Last Purchase Rate',
+ 'oldfieldtype': u'Button',
'permlevel': 0,
'print_hide': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'net_total',
- 'fieldtype': 'Currency',
- 'label': 'Net Total*',
+ 'doctype': u'DocField',
+ 'fieldname': u'net_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Net Total*',
'no_copy': 1,
- 'oldfieldname': 'net_total',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'net_total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 0
@@ -552,227 +561,227 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Re-Calculate Values',
- 'oldfieldtype': 'Button',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Re-Calculate Values',
+ 'oldfieldtype': u'Button',
'permlevel': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'Note HTML',
- 'options': '<div style="margin-top:16px"><b>Note :</b> * In Base Currency\n</div>',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Note HTML',
+ 'options': u'<div style="margin-top:16px"><b>Note :</b> * In Base Currency\n</div>',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Taxes',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Taxes',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'If you have created a standard template in Other Charges master, select one and click on the button below.',
- 'doctype': 'DocField',
- 'fieldname': 'purchase_other_charges',
- 'fieldtype': 'Link',
- 'label': 'Purchase Other Charges',
+ 'colour': u'White:FFF',
+ 'description': u'If you have created a standard template in Other Charges master, select one and click on the button below.',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_other_charges',
+ 'fieldtype': u'Link',
+ 'label': u'Purchase Other Charges',
'no_copy': 1,
- 'oldfieldname': 'purchase_other_charges',
- 'oldfieldtype': 'Link',
- 'options': 'Purchase Other Charges',
+ 'oldfieldname': u'purchase_other_charges',
+ 'oldfieldtype': u'Link',
+ 'options': u'Purchase Other Charges',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Get Tax Detail',
- 'oldfieldtype': 'Button',
- 'options': 'get_purchase_tax_details',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Tax Detail',
+ 'oldfieldtype': u'Button',
+ 'options': u'get_purchase_tax_details',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'purchase_tax_details',
- 'fieldtype': 'Table',
- 'label': 'Purchase Tax Details',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_tax_details',
+ 'fieldtype': u'Table',
+ 'label': u'Purchase Tax Details',
'no_copy': 0,
- 'oldfieldname': 'purchase_tax_details',
- 'oldfieldtype': 'Table',
- 'options': 'Purchase Tax Detail',
+ 'oldfieldname': u'purchase_tax_details',
+ 'oldfieldtype': u'Table',
+ 'options': u'Purchase Tax Detail',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Calculate Tax',
- 'oldfieldtype': 'Button',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Calculate Tax',
+ 'oldfieldtype': u'Button',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'Tax Calculation',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Tax Calculation',
'no_copy': 1,
- 'oldfieldtype': 'HTML',
+ 'oldfieldtype': u'HTML',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'total_tax',
- 'fieldtype': 'Currency',
- 'label': 'Total Tax*',
+ 'doctype': u'DocField',
+ 'fieldname': u'total_tax',
+ 'fieldtype': u'Currency',
+ 'label': u'Total Tax*',
'no_copy': 1,
- 'oldfieldname': 'total_tax',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'total_tax',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'Note HTML',
- 'options': '<div style="margin-top:16px"><b>Note :</b> * In Base Currency\n</div>',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Note HTML',
+ 'options': u'<div style="margin-top:16px"><b>Note :</b> * In Base Currency\n</div>',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Totals',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Totals',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'grand_total',
- 'fieldtype': 'Currency',
- 'label': 'Grand Total',
+ 'doctype': u'DocField',
+ 'fieldname': u'grand_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Grand Total',
'no_copy': 1,
- 'oldfieldname': 'grand_total',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'grand_total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'rounded_total',
- 'fieldtype': 'Currency',
- 'label': 'Rounded Total',
- 'oldfieldname': 'rounded_total',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'rounded_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Rounded Total',
+ 'oldfieldname': u'rounded_total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'In Words will be visible once you save the Purchase Order.',
- 'doctype': 'DocField',
- 'fieldname': 'in_words',
- 'fieldtype': 'Data',
- 'label': 'In Words',
- 'oldfieldname': 'in_words',
- 'oldfieldtype': 'Data',
+ 'colour': u'White:FFF',
+ 'description': u'In Words will be visible once you save the Purchase Order.',
+ 'doctype': u'DocField',
+ 'fieldname': u'in_words',
+ 'fieldtype': u'Data',
+ 'label': u'In Words',
+ 'oldfieldname': u'in_words',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'other_charges_added',
- 'fieldtype': 'Currency',
- 'label': 'Other Charges Added',
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges_added',
+ 'fieldtype': u'Currency',
+ 'label': u'Other Charges Added',
'no_copy': 0,
- 'oldfieldname': 'other_charges_added',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'other_charges_added',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'other_charges_deducted',
- 'fieldtype': 'Currency',
- 'label': 'Other Charges Deducted',
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges_deducted',
+ 'fieldtype': u'Currency',
+ 'label': u'Other Charges Deducted',
'no_copy': 0,
- 'oldfieldname': 'other_charges_deducted',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'other_charges_deducted',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
'print_hide': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'net_total_import',
- 'fieldtype': 'Currency',
- 'label': 'Net Total (Import)',
+ 'doctype': u'DocField',
+ 'fieldname': u'net_total_import',
+ 'fieldtype': u'Currency',
+ 'label': u'Net Total (Import)',
'no_copy': 0,
- 'oldfieldname': 'net_total_import',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'net_total_import',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'grand_total_import',
- 'fieldtype': 'Currency',
- 'label': 'Grand Total (Import)',
+ 'doctype': u'DocField',
+ 'fieldname': u'grand_total_import',
+ 'fieldtype': u'Currency',
+ 'label': u'Grand Total (Import)',
'no_copy': 0,
- 'oldfieldname': 'grand_total_import',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'grand_total_import',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'report_hide': 0
@@ -780,27 +789,26 @@
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'In Words(Import) will be visible once you save the Purchase Order.',
- 'doctype': 'DocField',
- 'fieldname': 'in_words_import',
- 'fieldtype': 'Data',
- 'label': 'In Words(Import)',
- 'oldfieldname': 'in_words_import',
- 'oldfieldtype': 'Data',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'in_words_import',
+ 'fieldtype': u'Data',
+ 'label': u'In Words(Import)',
+ 'oldfieldname': u'in_words_import',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'other_charges_added_import',
- 'fieldtype': 'Currency',
- 'label': 'Other Charges Added (Import)',
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges_added_import',
+ 'fieldtype': u'Currency',
+ 'label': u'Other Charges Added (Import)',
'no_copy': 0,
- 'oldfieldname': 'other_charges_added_import',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'other_charges_added_import',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'report_hide': 0
@@ -808,13 +816,13 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'other_charges_deducted_import',
- 'fieldtype': 'Currency',
- 'label': 'Other Charges Deducted (Import)',
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges_deducted_import',
+ 'fieldtype': u'Currency',
+ 'label': u'Other Charges Deducted (Import)',
'no_copy': 0,
- 'oldfieldname': 'other_charges_deducted_import',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'other_charges_deducted_import',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'report_hide': 0
@@ -822,105 +830,105 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Terms',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Terms',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'letter_head',
- 'fieldtype': 'Select',
- 'label': 'Letter Head',
- 'oldfieldname': 'letter_head',
- 'oldfieldtype': 'Select',
- 'options': 'link:Letter Head',
+ 'doctype': u'DocField',
+ 'fieldname': u'letter_head',
+ 'fieldtype': u'Select',
+ 'label': u'Letter Head',
+ 'oldfieldname': u'letter_head',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Letter Head',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'tc_name',
- 'fieldtype': 'Link',
- 'label': 'Select Terms',
- 'oldfieldname': 'tc_name',
- 'oldfieldtype': 'Link',
- 'options': 'Term',
+ 'doctype': u'DocField',
+ 'fieldname': u'tc_name',
+ 'fieldtype': u'Link',
+ 'label': u'Select Terms',
+ 'oldfieldname': u'tc_name',
+ 'oldfieldtype': u'Link',
+ 'options': u'Term',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Get Terms',
- 'oldfieldtype': 'Button',
- 'options': 'get_tc_details',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Terms',
+ 'oldfieldtype': u'Button',
+ 'options': u'get_tc_details',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'Terms HTML',
- 'oldfieldtype': 'HTML',
- 'options': 'You can add Terms and Notes that will be printed in the Transaction',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Terms HTML',
+ 'oldfieldtype': u'HTML',
+ 'options': u'You can add Terms and Notes that will be printed in the Transaction',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'terms',
- 'fieldtype': 'Text Editor',
- 'label': 'Terms1',
- 'oldfieldname': 'terms',
- 'oldfieldtype': 'Text Editor',
+ 'doctype': u'DocField',
+ 'fieldname': u'terms',
+ 'fieldtype': u'Text Editor',
+ 'label': u'Terms1',
+ 'oldfieldname': u'terms',
+ 'oldfieldtype': u'Text Editor',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'More Info',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'More Info',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'ref_sq',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'ref_sq',
+ 'fieldtype': u'Data',
'hidden': 1,
- 'label': 'Ref SQ',
+ 'label': u'Ref SQ',
'no_copy': 1,
- 'oldfieldname': 'ref_sq',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'ref_sq',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'amended_from',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'amended_from',
+ 'fieldtype': u'Data',
'hidden': 0,
- 'label': 'Amended From',
+ 'label': u'Amended From',
'no_copy': 1,
- 'oldfieldname': 'amended_from',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'amended_from',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'report_hide': 0
@@ -928,32 +936,32 @@
# DocField
{
- 'description': 'The date at which current entry is corrected in the system.',
- 'doctype': 'DocField',
- 'fieldname': 'amendment_date',
- 'fieldtype': 'Date',
+ 'description': u'The date at which current entry is corrected in the system.',
+ 'doctype': u'DocField',
+ 'fieldname': u'amendment_date',
+ 'fieldtype': u'Date',
'hidden': 0,
- 'label': 'Amendment Date',
+ 'label': u'Amendment Date',
'no_copy': 1,
- 'oldfieldname': 'amendment_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'amendment_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Select the relevant company name if you have multiple companies',
- 'doctype': 'DocField',
- 'fieldname': 'company',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'description': u'Select the relevant company name if you have multiple companies',
+ 'doctype': u'DocField',
+ 'fieldname': u'company',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Company',
+ 'label': u'Company',
'no_copy': 0,
- 'oldfieldname': 'company',
- 'oldfieldtype': 'Link',
- 'options': 'Company',
+ 'oldfieldname': u'company',
+ 'oldfieldtype': u'Link',
+ 'options': u'Company',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
@@ -962,15 +970,15 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'fiscal_year',
- 'fieldtype': 'Select',
+ 'doctype': u'DocField',
+ 'fieldname': u'fiscal_year',
+ 'fieldtype': u'Select',
'in_filter': 1,
- 'label': 'Fiscal Year',
+ 'label': u'Fiscal Year',
'no_copy': 0,
- 'oldfieldname': 'fiscal_year',
- 'oldfieldtype': 'Select',
- 'options': 'link:Fiscal Year',
+ 'oldfieldname': u'fiscal_year',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Fiscal Year',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
@@ -980,15 +988,15 @@
# DocField
{
'allow_on_submit': 1,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'select_print_heading',
- 'fieldtype': 'Link',
- 'label': 'Select Print Heading',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'select_print_heading',
+ 'fieldtype': u'Link',
+ 'label': u'Select Print Heading',
'no_copy': 1,
- 'oldfieldname': 'select_print_heading',
- 'oldfieldtype': 'Link',
- 'options': 'Print Heading',
+ 'oldfieldname': u'select_print_heading',
+ 'oldfieldtype': u'Link',
+ 'options': u'Print Heading',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
@@ -996,89 +1004,89 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'instructions',
- 'fieldtype': 'Text',
- 'label': 'Instructions',
- 'oldfieldname': 'instructions',
- 'oldfieldtype': 'Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'instructions',
+ 'fieldtype': u'Text',
+ 'label': u'Instructions',
+ 'oldfieldname': u'instructions',
+ 'oldfieldtype': u'Text',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'payment_terms',
- 'fieldtype': 'Text',
- 'label': 'Payment Terms',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'payment_terms',
+ 'fieldtype': u'Text',
+ 'label': u'Payment Terms',
'no_copy': 1,
- 'oldfieldname': 'payment_terms',
- 'oldfieldtype': 'Text',
+ 'oldfieldname': u'payment_terms',
+ 'oldfieldtype': u'Text',
'permlevel': 0,
'print_hide': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'remarks',
- 'fieldtype': 'Text',
- 'label': 'Remarks',
+ 'doctype': u'DocField',
+ 'fieldname': u'remarks',
+ 'fieldtype': u'Text',
+ 'label': u'Remarks',
'no_copy': 1,
- 'oldfieldname': 'remarks',
- 'oldfieldtype': 'Text',
+ 'oldfieldname': u'remarks',
+ 'oldfieldtype': u'Text',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'depends_on': 'eval:!doc.__islocal',
- 'doctype': 'DocField',
- 'fieldname': 'cancel_reason',
- 'fieldtype': 'Data',
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'doctype': u'DocField',
+ 'fieldname': u'cancel_reason',
+ 'fieldtype': u'Data',
'hidden': 0,
- 'label': 'Cancel Reason',
+ 'label': u'Cancel Reason',
'no_copy': 1,
- 'oldfieldname': 'cancel_reason',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'cancel_reason',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Required raw materials issued to the supplier for producing a sub - contracted item.',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Raw Material Details',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Required raw materials issued to the supplier for producing a sub - contracted item.',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Raw Material Details',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'po_raw_material_details',
- 'fieldtype': 'Table',
- 'label': 'PO Raw Material Details',
+ 'doctype': u'DocField',
+ 'fieldname': u'po_raw_material_details',
+ 'fieldtype': u'Table',
+ 'label': u'PO Raw Material Details',
'no_copy': 0,
- 'oldfieldname': 'po_raw_material_details',
- 'oldfieldtype': 'Table',
- 'options': 'PO Raw Material Detail',
+ 'oldfieldname': u'po_raw_material_details',
+ 'oldfieldtype': u'Table',
+ 'options': u'PO Raw Material Detail',
'permlevel': 1,
'print_hide': 1
},
@@ -1086,11 +1094,11 @@
# DocField
{
'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Repair Purchase Order',
- 'oldfieldtype': 'Button',
- 'options': 'repair_purchase_order',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Repair Purchase Order',
+ 'oldfieldtype': u'Button',
+ 'options': u'repair_purchase_order',
'permlevel': 0,
'print_hide': 1
}
diff --git a/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js b/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js
index d9735b6..f0b4ae2 100644
--- a/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js
+++ b/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//
//--------- ONLOAD -------------
diff --git a/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.py b/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.py
index 6cda4d0..d92b594 100644
--- a/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.py
+++ b/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.js b/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.js
index a0ee1dc..6591a70 100644
--- a/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.js
+++ b/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.item_code = function(doc, cdt, cdn) {
if (doc.item_code)
get_server_fields('get_purchase_receipt_item_details','','',doc,cdt,cdn,1);
diff --git a/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.py b/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.py
index 58ad248..d95ab7a 100644
--- a/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.py
+++ b/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js
index 8043a96..41889af 100644
--- a/erpnext/buying/doctype/supplier/supplier.js
+++ b/erpnext/buying/doctype/supplier/supplier.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
$import(Contact Control)
cur_frm.cscript.onload = function(doc,dt,dn){
diff --git a/erpnext/buying/doctype/supplier/supplier.py b/erpnext/buying/doctype/supplier/supplier.py
index d43900b..4bc04bb 100644
--- a/erpnext/buying/doctype/supplier/supplier.py
+++ b/erpnext/buying/doctype/supplier/supplier.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/buying/page/buying_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/buying/page/buying_home/__init__.py
diff --git a/erpnext/buying/page/buying_home/buying_home.html b/erpnext/buying/page/buying_home/buying_home.html
new file mode 100644
index 0000000..7f0e906
--- /dev/null
+++ b/erpnext/buying/page/buying_home/buying_home.html
@@ -0,0 +1,64 @@
+<div class="layout-wrapper layout-wrapper-background">
+ <div class="layout-main-section">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Buying</h1>
+ <hr>
+ <div style="width: 48%; float: left;">
+ <h4><a href="#!List/Purchase Requisition">Purchase Requisition</a></h4>
+ <p class="help">Request for purchase</p>
+ <h4><a href="#!List/Purchase Order">Purchase Order</a></h4>
+ <p class="help">Purchase Orders given to Suppliers</p>
+ </div>
+ <div style="width: 48%; float: right;">
+ <h4><a href="#!List/Supplier">Supplier</a></h4>
+ <p class="help">Supplier Master</p>
+ <h4><a href="#!List/Item">Item</a></h4>
+ <p class="help">Item Master</p>
+ </div>
+ <div style="clear: both"></div>
+ <hr>
+ <h3>Reports</h3>
+ <div class="reports-list"></div>
+ </div>
+ <div class="layout-side-section">
+ <div class="psidebar">
+ <div class="section">
+ <div class="section-head">Setup</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "Tax and charges structure master"
+ href="#!List/Purchase Other Charges">Purchase Other Charges</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Supplier classification"
+ href="#!List/Supplier Type">Supplier Type</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Helper for managing return of goods (sales or purchase)"
+ href="#!Form/Sales and Purchase Return Wizard/Sales and Purchase Return Wizard">Purchase Returns</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Terms of contract template"
+ href="#!List/Term">Order Terms Template</a>
+ </div>
+ </div>
+ </div>
+ <div class="section">
+ <div class="section-head">Tools</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "Analyze Sales and Purchase trends and slice them based on item, customer, groups etc"
+ href="#!Report/Profile/Trend Analyzer">Trend Analyzer</a>
+ </div>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ <div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/buying/page/buying_home/buying_home.js b/erpnext/buying/page/buying_home/buying_home.js
new file mode 100644
index 0000000..1f47b84
--- /dev/null
+++ b/erpnext/buying/page/buying_home/buying_home.js
@@ -0,0 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+pscript['onload_buying-home'] = function(wrapper) {
+ erpnext.module_page.setup_page('Buying', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/buying/page/buying_home/buying_home.txt b/erpnext/buying/page/buying_home/buying_home.txt
new file mode 100644
index 0000000..d2d2acc
--- /dev/null
+++ b/erpnext/buying/page/buying_home/buying_home.txt
@@ -0,0 +1,28 @@
+# Page, buying-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-21 13:22:54',
+ 'docstatus': 0,
+ 'modified': '2012-02-21 13:22:54',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Buying',
+ 'name': '__common__',
+ 'page_name': u'buying-home',
+ 'standard': u'Yes',
+ 'title': u'Buying Home'
+ },
+
+ # Page, buying-home
+ {
+ 'doctype': 'Page',
+ 'name': u'buying-home'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.js b/erpnext/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.js
index 66a1e82..603f915 100644
--- a/erpnext/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.js
+++ b/erpnext/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'From PO Date'].df['report_default'] = sys_defaults.year_start_date;
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'To PO Date'].df['report_default'] = dateutil.obj_to_str(new Date());
diff --git a/erpnext/buying/search_criteria/itemwise_receipt_details/itemwise_receipt_details.js b/erpnext/buying/search_criteria/itemwise_receipt_details/itemwise_receipt_details.js
index 426b8bc..641c294 100644
--- a/erpnext/buying/search_criteria/itemwise_receipt_details/itemwise_receipt_details.js
+++ b/erpnext/buying/search_criteria/itemwise_receipt_details/itemwise_receipt_details.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'From Transaction Date'].df['report_default'] = sys_defaults.year_start_date;
this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'To Transaction Date'].df['report_default'] = dateutil.obj_to_str(new Date());
diff --git a/erpnext/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.js b/erpnext/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.js
index 79ebc20..de2c037 100644
--- a/erpnext/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.js
+++ b/erpnext/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
diff --git a/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.js b/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.js
index 79ebc20..de2c037 100644
--- a/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.js
+++ b/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
diff --git a/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.py b/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.py
index 3b94497..066882b 100644
--- a/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.py
+++ b/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.py
@@ -1,2 +1,18 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
colwidths[col_idx['Pending Quantity To Receive']] = '200px'
colwidths[col_idx['Pending Amount To Receive']] = '200px'
diff --git a/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.js b/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.js
index 6aba209..ab469cd 100644
--- a/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.js
+++ b/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.py b/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.py
index 7708fbb..8ecf88c 100644
--- a/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.py
+++ b/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
#check mendatory
if not filter_values.get('posting_date') or not filter_values.get('posting_date1'):
msgprint("Please select From Posting Date and To Posting Date in 'Set Filters' section")
diff --git a/erpnext/home/__init__.py b/erpnext/home/__init__.py
index 5f9c447..2cca85a 100644
--- a/erpnext/home/__init__.py
+++ b/erpnext/home/__init__.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes import msgprint
@@ -42,7 +58,7 @@
"makes a new Feed record"
#msgprint(subject)
from webnotes.model.doc import Document
- from webnotes.utils import get_full_name
+ from webnotes.utils import get_fullname
if feedtype in ('Login', 'Comment', 'Assignment'):
# delete old login, comment feed
@@ -61,7 +77,7 @@
f.doc_name = name
f.subject = subject
f.color = color
- f.full_name = get_full_name(owner)
+ f.full_name = get_fullname(owner)
f.save()
def update_feed(doc, method=None):
diff --git a/erpnext/home/doctype/company_control/company_control.py b/erpnext/home/doctype/company_control/company_control.py
index 9c055a7..63f8b71 100644
--- a/erpnext/home/doctype/company_control/company_control.py
+++ b/erpnext/home/doctype/company_control/company_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/home/doctype/company_control/company_control.txt b/erpnext/home/doctype/company_control/company_control.txt
index b11c7da..a83f4dd 100644
--- a/erpnext/home/doctype/company_control/company_control.txt
+++ b/erpnext/home/doctype/company_control/company_control.txt
@@ -18,7 +18,6 @@
'module': 'Home',
'name': '__common__',
'section_style': 'Simple',
- 'server_code': '\n\n\t# Update roles of given user\n\tdef update_roles(self,arg):\n\t\targ = eval(arg)\n\t\tsql("delete from `tabUserRole` where parenttype=\'Profile\' and parent =\'%s\'" % (cstr(arg[\'usr\'])))\n\t\trole_list = arg[\'role_list\'].split(\',\')\n\t\tmsgprint(sql("select role from tabUserRole where parent = \'%s\'" % cstr(arg[\'usr\'])))\n\t\tmsgprint(role_list)\n\t\tfor r in role_list:\n\t\t\tpr=Document(\'UserRole\')\n\t\t\tpr.parent = arg[\'usr\']\n\t\t\tpr.parenttype = \'Profile\'\n\t\t\tpr.role = r\n\t\t\tpr.parentfield = \'userroles\'\n\t\t\tpr.save(1)\n\t\tmsgprint(sql("select role from tabUserRole where parent = \'%s\'" % cstr(arg[\'usr\'])))\n\n\n # Create New Profile\n # ====================\n\tdef create_new_profile(self, arg):\n\t\tp = Document(\'Profile\')\n\t\tp.first_name = arg.get(\'first_name\') or arg.get(\'email_id\')\n\t\tp.last_name = arg.get(\'last_name\')\n\t\tp.email = arg.get(\'email_id\')\n\t\tp.name = arg.get(\'email_id\')\n\t\tp.user_type = arg.get(\'user_type\') or \'System User\'\n\t\tp.enabled = 0\t\n\t\tp.save(new=1)\n\t\tp_obj = get_obj(\'Profile\', p.name)\n\t\tp_obj.on_update()',
'server_code_error': ' ',
'version': 13
},
diff --git a/erpnext/home/doctype/feed/feed.py b/erpnext/home/doctype/feed/feed.py
index dca0c35..4586f62 100644
--- a/erpnext/home/doctype/feed/feed.py
+++ b/erpnext/home/doctype/feed/feed.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/home/doctype/home_control/home_control.py b/erpnext/home/doctype/home_control/home_control.py
index 1999345..c88cf9e 100644
--- a/erpnext/home/doctype/home_control/home_control.py
+++ b/erpnext/home/doctype/home_control/home_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/home/doctype/widget_control/widget_control.py b/erpnext/home/doctype/widget_control/widget_control.py
index d6bb9d1..5c2762c 100644
--- a/erpnext/home/doctype/widget_control/widget_control.py
+++ b/erpnext/home/doctype/widget_control/widget_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import nowdate
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/home/page/activity/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/home/page/activity/__init__.py
diff --git a/erpnext/home/page/activity/activity.css b/erpnext/home/page/activity/activity.css
new file mode 100644
index 0000000..f3988b2
--- /dev/null
+++ b/erpnext/home/page/activity/activity.css
@@ -0,0 +1,23 @@
+#activity-list .label {
+ display: inline-block;
+ width: 100px;
+ margin-right: 7px;
+}
+
+#activity-list .label-info {
+ cursor: pointer;
+}
+
+#activity-list .user-info {
+ float: right;
+ color: #777;
+ font-size: 10px;
+}
+
+#activity-list .date-sep {
+ margin-bottom: 11px;
+ padding: 5px 0px;
+ border-bottom: 1px solid #aaa;
+ color: #555;
+ font-size: 10px;
+}
\ No newline at end of file
diff --git a/erpnext/home/page/activity/activity.html b/erpnext/home/page/activity/activity.html
new file mode 100644
index 0000000..b348d95
--- /dev/null
+++ b/erpnext/home/page/activity/activity.html
@@ -0,0 +1,6 @@
+<div class="layout-wrapper">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Activity</h1>
+ <div id="activity-list">
+ </div>
+</div>
\ No newline at end of file
diff --git a/erpnext/home/page/activity/activity.js b/erpnext/home/page/activity/activity.js
new file mode 100644
index 0000000..9a323d3
--- /dev/null
+++ b/erpnext/home/page/activity/activity.js
@@ -0,0 +1,63 @@
+wn.pages['activity'].onload = function(wrapper) {
+ var list = new wn.widgets.Listing({
+ method: 'home.page.activity.activity.get_feed',
+ parent: $('#activity-list'),
+ render_row: function(row, data) {
+ new erpnext.ActivityFeed(row, data);
+ }
+ });
+ list.run();
+}
+
+erpnext.last_feed_date = false;
+erpnext.ActivityFeed = Class.extend({
+ init: function(row, data) {
+ this.scrub_data(data);
+ this.add_date_separator(row, data);
+ $(row).append(sprintf('<div style="margin: 0px">\
+ <span class="avatar-small"><img src="%(imgsrc)s" /></span> \
+ <span %(onclick)s class="label %(add_class)s">%(feed_type)s</span>\
+ %(link)s %(subject)s <span class="user-info">%(by)s</span></div>', data));
+ },
+ scrub_data: function(data) {
+ data.by = wn.user_info(data.owner).fullname;
+ data.imgsrc = wn.user_info(data.owner).image;
+
+ // feedtype
+ if(!data.feed_type) {
+ data.feed_type = get_doctype_label(data.doc_type);
+ data.add_class = "label-info";
+ data.onclick = repl('onclick="window.location.href=\'#!List/%(feed_type)s\';"', data)
+ }
+
+ // color for comment
+ if(data.feed_type=='Comment') {
+ data.add_class = "label-important";
+ }
+
+ if(data.feed_type=='Assignment') {
+ data.add_class = "label-warning";
+ }
+
+ // link
+ if(data.doc_name && data.feed_type!='Login') {
+ data.link = repl('<a href="#!Form/%(doc_type)s/%(doc_name)s">%(doc_name)s</a>', data)
+ }
+ },
+ add_date_separator: function(row, data) {
+ var date = dateutil.str_to_obj(data.modified);
+ var last = erpnext.last_feed_date;
+
+ if((last && dateutil.get_diff(last, date)>1) || (!last)) {
+ var pdate = dateutil.comment_when(date);
+ var diff = dateutil.get_diff(new Date(), date);
+ if(diff < 1) {
+ pdate = 'Today';
+ } else if(diff > 6) {
+ pdate = dateutil.global_date_format(date);
+ }
+ $(row).html(repl('<div class="date-sep">%(date)s</div>', {date: pdate}));
+ }
+ erpnext.last_feed_date = date;
+ }
+})
\ No newline at end of file
diff --git a/erpnext/home/page/activity/activity.py b/erpnext/home/page/activity/activity.py
new file mode 100644
index 0000000..8b8faf3
--- /dev/null
+++ b/erpnext/home/page/activity/activity.py
@@ -0,0 +1,16 @@
+import webnotes
+
+@webnotes.whitelist()
+def get_feed(arg=None):
+ """get feed"""
+ return webnotes.conn.sql("""select
+ distinct t1.name, t1.feed_type, t1.doc_type, t1.doc_name, t1.subject, t1.owner,
+ t1.modified
+ from tabFeed t1, tabDocPerm t2
+ where t1.doc_type = t2.parent
+ and t2.role in ('%s')
+ and ifnull(t2.`read`,0) = 1
+ order by t1.modified desc
+ limit %s, %s""" % ("','".join(webnotes.get_roles()),
+ webnotes.form_dict['limit_start'], webnotes.form_dict['limit_page_length']),
+ as_dict=1)
\ No newline at end of file
diff --git a/erpnext/home/page/activity/activity.txt b/erpnext/home/page/activity/activity.txt
new file mode 100644
index 0000000..e7f3963
--- /dev/null
+++ b/erpnext/home/page/activity/activity.txt
@@ -0,0 +1,28 @@
+# Page, activity
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-29 11:59:13',
+ 'docstatus': 0,
+ 'modified': '2012-02-29 12:11:46',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Home',
+ 'name': '__common__',
+ 'page_name': u'activity',
+ 'standard': u'Yes',
+ 'title': u'Activity'
+ },
+
+ # Page, activity
+ {
+ 'doctype': 'Page',
+ 'name': u'activity'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/home/page/attributions/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/home/page/attributions/__init__.py
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/home/page/attributions/attributions.css
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/home/page/attributions/attributions.css
diff --git a/erpnext/home/page/attributions/attributions.html b/erpnext/home/page/attributions/attributions.html
new file mode 100644
index 0000000..72703c8
--- /dev/null
+++ b/erpnext/home/page/attributions/attributions.html
@@ -0,0 +1,91 @@
+<div class="layout-wrapper">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Attributions</h1>
+ <hr>
+ <p><b>Source Code:</b> <a href="https://github.com/webnotes/erpnext">
+ https://github.com/webnotes/erpnext</a></p>
+ <p><b>Website:</b> <a href="https://erpnext.com">
+ https://erpnext.com</a></p>
+ <hr>
+ <p class="help">ERPNext is an Open Source project and is possible because of the work of
+ thousands of software developers, companies and designers who have contributed their
+ work to the community. We have tried to list as many projects as possible that are
+ used by ERPNext, but this list may not be exhaustive.</p>
+
+
+ <h4>Server</h4>
+ <ul>
+ <li>Linux (GNU)</li>
+ <li>Apache HTTPD server (web server)</li>
+ <li>MySQL (database, Percona build)</li>
+ <li>Git (source code control via Github)</li>
+ </ul>
+
+ <h4>Programming Languages & Libraries</h4>
+ <ul>
+ <li><a href="http://python.org">Python</a></li>
+ <ul>
+ <li>Python-MySQL</li>
+ <li>pytz (timezones)</li>
+ <li>jinja2 (templating)</li>
+ <li>markdown2 (markdown parser)</li>
+ <li>jsmin (javascript minifier)</li>
+ </ul>
+ <li>Javascript</li>
+ <ul>
+ <li>JQuery</li>
+ <li>JQuery UI (datepicker, sortable)</li>
+ <li>TinyMCE - text editor</li>
+ <li>Twitter Bootstrap</li>
+ <li>jQPlot - graphs</li>
+ <li>JSON2 - JSON builder, parser</li>
+ <li>JSColor - color picker</li>
+ <li>sprintf - string formatting</li>
+ <li>historyjs - AJAX history</li>
+ </ul>
+ </ul>
+
+ <h4>CSS Frameworks</h4>
+ <ul>
+ <li>Twitter Bootstrap</li>
+ </ul>
+
+ <h4>Icons</h4>
+ <ul>
+ <li>The Noun Project</li>
+ <li>Glyphicons</li>
+ </ul>
+
+ <h4>Web Frameworks</h4>
+ <ul>
+ <li>wnframework</li>
+ </ul>
+
+ <h4>Web Browsers</h4>
+ <ul>
+ <li>Mozilla Firefox</li>
+ <ul>
+ <li>Firebug (debugger)</li>
+ </ul>
+ <li>Apple Safari</li>
+ <li>Google Chorme</li>
+ </ul>
+ <hr>
+ <h2>ERPNext License</h2>
+ <p><b>ERPNext - Open Source, web based ERP</b></p>
+ <p>Copyright © 2008 onwards, Web Notes Technologies Pvt Ltd, India</p>
+
+ <p>This program is free software: you can redistribute it and/or modify
+ it under the terms of the <b>GNU General Public License</b> as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.</p>
+
+ <p>This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.</p>
+
+ <p>For complete license see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a></p>
+ <hr>
+ <p>For more information please write to us at support@erpnext.com</p>
+</div>
\ No newline at end of file
diff --git a/erpnext/home/page/attributions/attributions.js b/erpnext/home/page/attributions/attributions.js
new file mode 100644
index 0000000..fc56784
--- /dev/null
+++ b/erpnext/home/page/attributions/attributions.js
@@ -0,0 +1 @@
+wn.pages['attributions'].onload = function(wrapper) { }
\ No newline at end of file
diff --git a/erpnext/home/page/attributions/attributions.py b/erpnext/home/page/attributions/attributions.py
new file mode 100644
index 0000000..f807eb0
--- /dev/null
+++ b/erpnext/home/page/attributions/attributions.py
@@ -0,0 +1 @@
+import webnotes
\ No newline at end of file
diff --git a/erpnext/home/page/attributions/attributions.txt b/erpnext/home/page/attributions/attributions.txt
new file mode 100644
index 0000000..a15adb9
--- /dev/null
+++ b/erpnext/home/page/attributions/attributions.txt
@@ -0,0 +1,28 @@
+# Page, attributions
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-03-01 12:30:42',
+ 'docstatus': 0,
+ 'modified': '2012-03-01 12:30:42',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Home',
+ 'name': '__common__',
+ 'page_name': u'attributions',
+ 'standard': u'Yes',
+ 'title': u'Attributions'
+ },
+
+ # Page, attributions
+ {
+ 'doctype': 'Page',
+ 'name': u'attributions'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/home/page/dashboard/dashboard.js b/erpnext/home/page/dashboard/dashboard.js
index b622808..1d01ee9 100644
--- a/erpnext/home/page/dashboard/dashboard.js
+++ b/erpnext/home/page/dashboard/dashboard.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript.onload_dashboard = function() {
// load jqplot
wn.require('lib/css/jqplot.css');
diff --git a/erpnext/home/page/dashboard/dashboard.py b/erpnext/home/page/dashboard/dashboard.py
index e8f11fb..29f1502 100644
--- a/erpnext/home/page/dashboard/dashboard.py
+++ b/erpnext/home/page/dashboard/dashboard.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
dashboards = [
{
'type': 'account',
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/home/page/desktop/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/home/page/desktop/__init__.py
diff --git a/erpnext/home/page/desktop/desktop.css b/erpnext/home/page/desktop/desktop.css
new file mode 100644
index 0000000..e460c11
--- /dev/null
+++ b/erpnext/home/page/desktop/desktop.css
@@ -0,0 +1,115 @@
+/* Sprite CSS */
+.sprite-account{ background-position: 0 0; width: 32px; height: 40px; }
+.sprite-buying{ background-position: 0 -90px; width: 40px; height: 40px; }
+.sprite-calendar{ background-position: 0 -180px; width: 35px; height: 40px; }
+.sprite-dashboard{ background-position: 0 -270px; width: 40px; height: 29px; }
+.sprite-feed{ background-position: 0 -349px; width: 32px; height: 40px; }
+.sprite-hr{ background-position: 0 -439px; width: 40px; height: 32px; }
+.sprite-kb{ background-position: 0 -521px; width: 24px; height: 39px; }
+.sprite-messages{ background-position: 0 -610px; width: 40px; height: 26px; }
+.sprite-production{ background-position: 0 -686px; width: 40px; height: 33px; }
+.sprite-project{ background-position: 0 -769px; width: 40px; height: 22px; }
+.sprite-report{ background-position: 0 -841px; width: 29px; height: 40px; }
+.sprite-selling{ background-position: 0 -931px; width: 34px; height: 40px; }
+.sprite-setting{ background-position: 0 -1021px; width: 37px; height: 40px; }
+.sprite-stock{ background-position: 0 -1111px; width: 34px; height: 39px; }
+.sprite-support{ background-position: 0 -1200px; width: 40px; height: 40px; }
+.sprite-todo{ background-position: 0 -1290px; width: 40px; height: 34px; }
+.sprite-website{ background-position: 0 -1374px; width: 40px; height: 40px; }
+
+.sprite-image { background-image: url("images/sprite-desktop.png"); }
+
+
+.sprite-account{ margin-top: 8px; margin-left: 12px; }
+.sprite-selling{ margin-top: 8px; margin-left: 12px; }
+.sprite-stock{ margin-top: 8px; margin-left: 8px; }
+.sprite-buying{ margin-top: 8px; margin-left: 8px; }
+.sprite-support{ margin-top: 8px; margin-left: 8px; }
+.sprite-hr{ margin-top: 12px; margin-left: 8px; }
+.sprite-project{ margin-top: 16px; margin-left: 8px; }
+.sprite-production{ margin-top: 10px; margin-left: 8px; }
+.sprite-website{ margin-top: 8px; margin-left: 8px; }
+.sprite-setting{ margin-top: 8px; margin-left: 8px; }
+.sprite-dashboard{ margin-top: 14px; margin-left: 8px; }
+.sprite-report{ margin-top: 8px; margin-left: 14px; }
+
+.sprite-messages{ margin-top: 14px; margin-left: 8px; }
+.sprite-todo{ margin-top: 10px; margin-left: 10px; }
+.sprite-calendar{ margin-top: 8px; margin-left: 10px; }
+.sprite-kb{ margin-top: 8px; margin-left: 16px; }
+.sprite-feed{ margin-top: 8px; margin-left: 14px; }
+
+.case-border {
+ border-radius: 10px;
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ width: 56px;
+ height: 56px;
+ border: 4px solid white;
+ box-shadow: 0 0 10px 1px black;
+ -moz-box-shadow: 0 0 10px 1px black;
+ -webkit-box-shadow: 0 0 10px 1px black;
+ -o-box-shadow: 0 0 10px 1px black;
+ margin: auto;
+}
+
+.case-wrapper {
+ margin: 24px;
+ float: left;
+ width: 100px;
+ height: 100px;
+}
+
+.case-label {
+ color: white;
+ /*font-size: 12px;*/
+ padding-top: 10px;
+ text-align: center;
+ text-shadow: 1px 1px 5px #000, 3px 3px 5px #000;
+}
+
+/* Hover and click effects */
+.case-border:hover, .circle:hover {
+ box-shadow: 0 0 2px 0px black, 0 0 10px 1px white;
+ -moz-box-shadow: 0 0 2px 0px black, 0 0 10px 1px white;
+ -webkit-box-shadow: 0 0 2px 0px black, 0 0 10px 1px white;
+ -o-box-shadow: 0 0 2px 0px black, 0 0 10px 1px white;
+}
+
+.case-border:active, .case-border:focus, .circle:active, .circle:focus {
+ transform: scale(0.98, 0.98);
+ -ms-transform: scale(0.98, 0.98); /* IE 9 */
+ -webkit-transform: scale(0.98, 0.98); /* Safari and Chrome */
+ -o-transform: scale(0.98, 0.98); /* Opera */
+ -moz-transform: scale(0.98, 0.98); /* Firefox */
+}
+
+.circle {
+ border-radius: 30px;
+ -moz-border-radius: 30px;
+ -webkit-border-radius: 30px;
+ height: 15px;
+ line-height: 12px;
+ min-width: 15px;
+ background: #B00D07;
+ padding: 3px;
+ z-index: 2;
+ float: right;
+ margin-top: -10px;
+ margin-right: 10px;
+ border: 2px solid white;
+ box-shadow: 0 0 10px 1px black;
+ -moz-box-shadow: 0 0 10px 1px black;
+ -webkit-box-shadow: 0 0 10px 1px black;
+ -o-box-shadow: 0 0 10px 1px black;
+}
+
+.circle-text {
+ color: white;
+ vertical-align: middle;
+ text-align: center;
+ display: inline-block;
+ margin-top: -3px;
+ text-shadow: 1px 1px 5px #000;
+}
+
diff --git a/erpnext/home/page/desktop/desktop.html b/erpnext/home/page/desktop/desktop.html
new file mode 100644
index 0000000..43ee423
--- /dev/null
+++ b/erpnext/home/page/desktop/desktop.html
@@ -0,0 +1,6 @@
+<div style="min-height: 500px; background: None; text-align: center;
+ margin: 0px auto;">
+ <div id="icon-grid">
+ </div>
+</div>
+<div style="clear: both"></div>
diff --git a/erpnext/home/page/desktop/desktop.js b/erpnext/home/page/desktop/desktop.js
new file mode 100644
index 0000000..dab1e76
--- /dev/null
+++ b/erpnext/home/page/desktop/desktop.js
@@ -0,0 +1,109 @@
+wn.provide('erpnext.desktop');
+
+erpnext.desktop.gradient = "<style>\
+ .case-%(name)s {\
+ background: %(start)s; /* Old browsers */\
+ background: -moz-radial-gradient(center, ellipse cover, %(start)s 0%, %(middle)s 44%, %(end)s 100%); /* FF3.6+ */\
+ background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,%(start)s), color-stop(44%,%(middle)s), color-stop(100%,%(end)s)); /* Chrome,Safari4+ */\
+ background: -webkit-radial-gradient(center, ellipse cover, %(start)s 0%,%(middle)s 44%,%(end)s 100%); /* Chrome10+,Safari5.1+ */\
+ background: -o-radial-gradient(center, ellipse cover, %(start)s 0%,%(middle)s 44%,%(end)s 100%); /* Opera 12+ */\
+ background: -ms-radial-gradient(center, ellipse cover, %(start)s 0%,%(middle)s 44%,%(end)s 100%); /* IE10+ */\
+ background: radial-gradient(center, ellipse cover, %(start)s 0%,%(middle)s 44%,%(end)s 100%); /* W3C */\
+ }\
+ </style>"
+
+erpnext.desktop.refresh = function() {
+ erpnext.desktop.add_classes();
+ erpnext.desktop.render();
+}
+
+erpnext.desktop.add_classes = function() {
+ var classes = [
+ { name: 'red', start: '#A90329', middle: '#8F0222', end: '#6D0019' },
+ { name: 'brown', start: '#723e02', middle: '#633501', end: '#4a2700' },
+ { name: 'green', start: '#4b5602', middle: '#3f4901', end: '#313800' },
+ { name: 'blue', start: '#026584', middle: '#025770', end: '#004256' },
+ { name: 'yellow', start: '#be7902', middle: '#a66a02', end: '#865500' },
+ { name: 'purple', start: '#4d017d', middle: '#410169', end: '#310050' },
+ { name: 'ocean', start: '#02a47e', middle: '#018d6c', end: '#006a51' },
+ { name: 'pink', start: '#a40281', middle: '#8d016e', end: '#6a0053' },
+ { name: 'grey', start: '#545454', middle: '#484848', end: '#363636' },
+ { name: 'dark-red', start: '#68021a', middle: '#590116', end: '#440010' },
+ { name: 'leaf-green', start: '#b0a400', middle: '#968c00', end: '#726a00' },
+ //{ name: 'dark-blue', start: '#023bae', middle: '#013295', end: '#002672' },
+ { name: 'bright-green', start: '#03ad1f', middle: '#02941a', end: '#007213' },
+ { name: 'bright-yellow', start: '#ffd65e', middle: '#febf04', end: '#ed9017' },
+ { name: 'peacock', start: '#026584', middle: '#026584', end: '#322476' },
+ { name: 'violet', start: '#50448e', middle: '#473b7f', end: '#3a3169' },
+ { name: 'ultra-dark-green', start: '#014333', middle: '#01372b', end: '#002a20' },
+ ];
+ $.each(classes, function(i, v) {
+ $(repl(erpnext.desktop.gradient, v)).appendTo('head');
+ });
+}
+
+erpnext.desktop.render = function() {
+ var icons = {
+ 'Accounts': { gradient: 'blue', sprite: 'account', label: 'Accounts'},
+ 'Selling': { gradient: 'green', sprite: 'selling', label: 'Selling'},
+ 'Stock': { gradient: 'yellow', sprite: 'stock', label: 'Stock'},
+ 'Buying': { gradient: 'red', sprite: 'buying', label: 'Buying'},
+ 'Support': { gradient: 'purple', sprite: 'support', label: 'Support'},
+ 'HR': { gradient: 'ocean', sprite: 'hr', label: 'Human<br />Resources'},
+ 'Projects': { gradient: 'violet', sprite: 'project', label: 'Projects'},
+ 'Production': { gradient: 'dark-red', sprite: 'production', label: 'Production'},
+ 'Website': { gradient: 'leaf-green', sprite: 'website', label: 'Website'},
+ 'Activity': { gradient: 'brown', sprite: 'feed', label: 'Activity'},
+ 'Setup': { gradient: 'grey', sprite: 'setting', label: 'Setup'},
+ 'Dashboard': { gradient: 'bright-green', sprite: 'dashboard', label: 'Dashboard'},
+ 'To Do': { gradient: 'bright-yellow', sprite: 'todo', label: 'To Do'},
+ 'Messages': { gradient: 'pink', sprite: 'messages', label: 'Messages'},
+ 'Calendar': { gradient: 'peacock', sprite: 'calendar', label: 'Calendar'},
+ 'Knowledge Base': { gradient: 'ultra-dark-green', sprite: 'kb', label: 'Knowledge<br />Base'}
+ }
+
+
+ var add_icon = function(m) {
+ var icon = icons[m];
+ icon.link = erpnext.modules[m];
+ $('#icon-grid').append(repl('\
+ <div id="%(sprite)s" class="case-wrapper"><a href="#!%(link)s">\
+ <div class="case-border case-%(gradient)s">\
+ <div class="sprite-image sprite-%(sprite)s"></div>\
+ </div></a>\
+ <div class="case-label">%(label)s</div>\
+ </div>', icon));
+ }
+
+ // setup
+
+ for(var i in wn.boot.modules_list) {
+ var m = wn.boot.modules_list[i];
+ if(m!='Setup' && wn.boot.profile.allow_modules.indexOf(m)!=-1)
+ add_icon(m);
+ }
+
+ if(user_roles.indexOf('Accounts Manager')!=-1)
+ add_icon('Dashboard')
+
+ if(user_roles.indexOf('System Manager')!=-1)
+ add_icon('Setup')
+
+ // apps
+ erpnext.desktop.show_pending_notifications();
+
+}
+
+erpnext.desktop.show_pending_notifications = function() {
+ $('#messages a:first').prepend('<div id="msg_count" class="circle" title="Unread Messages">\
+ <span class="circle-text"></span></div>');
+ $('#msg_count').toggle(false);
+ update_messages();
+
+}
+
+pscript.onload_desktop = function() {
+ // load desktop
+ erpnext.desktop.refresh();
+}
+
diff --git a/erpnext/home/page/desktop/desktop.txt b/erpnext/home/page/desktop/desktop.txt
new file mode 100644
index 0000000..f1918b9
--- /dev/null
+++ b/erpnext/home/page/desktop/desktop.txt
@@ -0,0 +1,28 @@
+# Page, desktop
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-24 11:37:43',
+ 'docstatus': 0,
+ 'modified': '2012-02-24 11:37:43',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Home',
+ 'name': '__common__',
+ 'page_name': u'desktop',
+ 'standard': u'Yes',
+ 'title': u'Desktop'
+ },
+
+ # Page, desktop
+ {
+ 'doctype': 'Page',
+ 'name': u'desktop'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/home/page/event_updates/complete_registration.js b/erpnext/home/page/event_updates/complete_registration.js
deleted file mode 100644
index e7e0574..0000000
--- a/erpnext/home/page/event_updates/complete_registration.js
+++ /dev/null
@@ -1,108 +0,0 @@
-// complete my company registration
-// --------------------------------
-pscript.complete_registration = function(is_complete, profile) {
- if(is_complete == 'No'){
- var d = new Dialog(400, 200, "Setup your Account");
- if(user != 'Administrator'){
- d.no_cancel(); // Hide close image
- $('header').toggle(false);
- }
-
- d.make_body([
- ['HTML', 'Your Profile Details', '<h4>Your Profile Details</h4>'],
- ['Data', 'First Name'],
- ['Data', 'Last Name'],
- ['HTML', 'Company Details', '<h4>Create your first company</h4>'],
- ['Data','Company Name','Example: Your Company LLC'],
- ['Data','Company Abbreviation', 'Example: YC (all your acconts will have this as a suffix)'],
- ['Select','Fiscal Year Start Date'],
- ['Select','Default Currency'],
- ['Button','Save'],
- ]);
-
- // if company name is set, set the input value
- // and disable it
- if(wn.control_panel.company_name) {
- d.widgets['Company Name'].value = wn.control_panel.company_name;
- d.widgets['Company Name'].disabled = 1;
- }
-
- if(profile && profile.length>0) {
- if(profile[0].first_name && profile[0].first_name!='None') {
- d.widgets['First Name'].value = profile[0].first_name;
- }
-
- if(profile[0].last_name && profile[0].last_name!='None') {
- d.widgets['Last Name'].value = profile[0].last_name;
- }
- }
-
-
- //d.widgets['Save'].disabled = true; // disable Save button
- pscript.make_dialog_field(d);
-
- // submit details
- d.widgets['Save'].onclick = function()
- {
- d.widgets['Save'].set_working();
-
- flag = pscript.validate_fields(d);
- if(flag)
- {
- var args = [
- d.widgets['Company Name'].value,
- d.widgets['Company Abbreviation'].value,
- d.widgets['Fiscal Year Start Date'].value,
- d.widgets['Default Currency'].value,
- d.widgets['First Name'].value,
- d.widgets['Last Name'].value
- ];
-
- $c_obj('Setup Control','setup_account',JSON.stringify(args),function(r, rt){
- sys_defaults = r.message;
- user_fullname = r.message.user_fullname;
- d.hide();
- $('header').toggle(true);
- page_body.wntoolbar.set_user_name();
- });
- } else {
- d.widgets['Save'].done_working();
- }
- }
- d.show();
- }
-}
-
-// make dialog fields
-// ------------------
-pscript.make_dialog_field = function(d)
-{
- // fiscal year format
- fisc_format = d.widgets['Fiscal Year Start Date'];
- add_sel_options(fisc_format, ['', '1st Jan', '1st Apr', '1st Jul', '1st Oct']);
-
- // default currency
- currency_list = ['', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AZN', 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BRL', 'BSD', 'BTN', 'BYR', 'BZD', 'CAD', 'CDF', 'CFA', 'CFP', 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CUC', 'CZK', 'DJF', 'DKK', 'DOP', 'DZD', 'EEK', 'EGP', 'ERN', 'ETB', 'EUR', 'EURO', 'FJD', 'FKP', 'FMG', 'GBP', 'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GQE', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF', 'IDR', 'ILS', 'INR', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LTL', 'LVL', 'LYD', 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MYR', 'MZM', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NRs', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG', 'QAR', 'RMB', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SCR', 'SDG', 'SDR', 'SEK', 'SGD', 'SHP', 'SOS', 'SRD', 'STD', 'SYP', 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TRY', 'TTD', 'TWD', 'TZS', 'UAE', 'UAH', 'UGX', 'USD', 'USh', 'UYU', 'UZS', 'VEB', 'VND', 'VUV', 'WST', 'XAF', 'XCD', 'XDR', 'XOF', 'XPF', 'YEN', 'YER', 'YTL', 'ZAR', 'ZMK', 'ZWR'];
- currency = d.widgets['Default Currency'];
- add_sel_options(currency, currency_list);
-}
-
-
-// validate fields
-// ---------------
-pscript.validate_fields = function(d)
-{
- var lst = ['First Name', 'Company Name', 'Company Abbreviation', 'Fiscal Year Start Date', 'Default Currency'];
- var msg = 'Please enter the following fields';
- var flag = 1;
- for(var i=0; i<lst.length; i++)
- {
- if(!d.widgets[lst[i]].value || d.widgets[lst[i]].value=='None'){
- flag = 0;
- msg = msg + NEWLINE + lst[i];
- }
- }
-
- if(!flag) alert(msg);
- return flag;
-}
diff --git a/erpnext/home/page/event_updates/event_updates.js b/erpnext/home/page/event_updates/event_updates.js
index 15f84d9..d86a1d8 100644
--- a/erpnext/home/page/event_updates/event_updates.js
+++ b/erpnext/home/page/event_updates/event_updates.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript['onload_Event Updates'] = function() {
if(user=='Guest') {
loadpage('Login Page');
@@ -13,15 +29,15 @@
// ==================================
pscript.home_make_body = function() {
- var wrapper = page_body.pages['Event Updates'];
+ var wrapper = wn.pages['Event Updates'];
// body
- wrapper.main_tab = make_table(wrapper,1,2,'100%',['70%','30%']);
- $y(wrapper.main_tab, {tableLayout:'fixed'});
-
- wrapper.body = $a($td(wrapper.main_tab, 0, 0), 'div', 'layout_wrapper');
-
+ $(wrapper).addClass('layout-wrapper').addClass('layout-wrapper-background')
+
+ wrapper.body = $a(wrapper, 'div', 'layout-main-section');
wrapper.head = $a(wrapper.body, 'div');
+ wrapper.side_section =$a(wrapper, 'div', 'layout-side-section');
+ $a(wrapper, 'div', '', {clear:'both'});
wrapper.banner_area = $a(wrapper.head, 'div');
@@ -31,7 +47,7 @@
// ==================================
pscript.home_set_banner = function(wrapper) {
- var wrapper = page_body.pages['Event Updates'];
+ var wrapper = wn.pages['Event Updates'];
var cp = wn.control_panel;
// banner
@@ -45,8 +61,8 @@
// ==================================
pscript.home_make_widgets = function() {
- var wrapper = page_body.pages['Event Updates'];
- var cell = $td(wrapper.main_tab, 0, 1);
+ var wrapper = wn.pages['Event Updates'];
+ var cell = wrapper.side_section;
// sidebar
sidebar = new wn.widgets.PageSidebar(cell, {
@@ -579,7 +595,7 @@
}
pscript.home_make_status = function() {
- var wrapper = page_body.pages['Event Updates'];
+ var wrapper = wn.pages['Event Updates'];
// get values
$c_page('home', 'event_updates', 'get_status_details', user,
@@ -609,7 +625,7 @@
$.extend(this, {
make: function(status) {
me.status = status;
- me.wrapper = page_body.pages['Event Updates'].setup_wizard_area;
+ me.wrapper = wn.pages['Event Updates'].setup_wizard_area;
$ds(me.wrapper);
me.make_percent(status.percent);
me.make_suggestion(status.ret);
diff --git a/erpnext/home/page/event_updates/event_updates.py b/erpnext/home/page/event_updates/event_updates.py
index 05f3d93..05f1cfc 100644
--- a/erpnext/home/page/event_updates/event_updates.py
+++ b/erpnext/home/page/event_updates/event_updates.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import cint
@@ -16,7 +32,7 @@
return webnotes.conn.sql("""\
SELECT name, comment
FROM `tabComment Widget Record`
- WHERE comment_doctype='My Company'
+ WHERE comment_doctype IN ('My Company', 'Message')
AND comment_docname = %s
AND ifnull(docstatus,0)=0
""", webnotes.user.name, as_list=1)
diff --git a/erpnext/home/page/my_company/my_company.js b/erpnext/home/page/my_company/my_company.js
index 298b313..8217cc7 100644
--- a/erpnext/home/page/my_company/my_company.js
+++ b/erpnext/home/page/my_company/my_company.js
@@ -1,5 +1,21 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript['onload_My Company'] = function() {
- var wrapper = page_body.pages['My Company'];
+ var wrapper = wn.pages['My Company'];
// body
wrapper.className = 'layout_wrapper';
@@ -96,7 +112,7 @@
}
pscript.myc_refresh = function() {
- page_body.pages['My Company'].member_list.lst.run();
+ wn.pages['My Company'].member_list.lst.run();
}
pscript.myc_make_list= function(wrapper) {
@@ -105,7 +121,7 @@
pscript.get_fullname=function(uid) {
if(uid=='Administrator') return uid;
- return page_body.pages['My Company'].member_list.member_items[uid].fullname;
+ return wn.pages['My Company'].member_list.member_items[uid].fullname;
}
@@ -724,7 +740,7 @@
this.user = $a(this.comment, 'span', 'link_type', {fontWeight:'bold'}, pscript.get_fullname(det.owner));
this.user.onclick = function() {
- page_body.pages['My Company'].member_list.show_profile(me.det.owner);
+ wn.pages['My Company'].member_list.show_profile(me.det.owner);
}
var st = (!det.docstatus ? {fontWeight: 'bold'} : null);
@@ -742,253 +758,3 @@
-// ========================== Role object =====================================
-
-pscript.all_roles = null;
-
-RoleObj = function(profile_id){
- this.roles_dict = {};
- this.profile_id = profile_id;
- this.setup_done = 0;
-
- var d = new Dialog(500,500,'Assign Roles');
- d.make_body([
- ['HTML','roles']
- ]);
-
- this.dialog = d;
- this.make_role_body(profile_id);
- this.make_help_body();
-
- this.body.innerHTML = '<span style="color:#888">Loading...</span> <img src="lib/images/ui/button-load.gif">'
- var me=this;
-
- d.onshow = function() {
- if(!me.setup_done)
- me.get_all_roles(me.profile_id);
- }
-}
-
-// make role body
-RoleObj.prototype.make_role_body = function(id){
- var me = this;
- var d = this.dialog;
- this.role_div = $a(d.widgets['roles'],'div');
-
- this.head = $a(this.role_div,'div','',{marginLeft:'4px', marginBottom:'4px',fontWeight:'bold'});
- this.body = $a(this.role_div,'div');
- this.footer = $a(this.role_div,'div');
-
- this.update_btn = $btn(this.footer,'Update',function() { me.update_roles(me.profile_id); },{marginRight:'4px'},'',1);
-}
-
-// make help body
-RoleObj.prototype.make_help_body = function(){
- var me = this;
-
- var d = this.dialog;
- this.help_div = $a(d.widgets['roles'],'div');
-
- var head = $a(this.help_div,'div'); this.help_div.head = head;
- var body = $a(this.help_div,'div'); this.help_div.body = body;
- var tail = $a(this.help_div,'div'); this.help_div.tail = tail;
-
- var back_btn = $btn(tail,'Back', function() {
- // back to assign roles
- $(me.role_div).slideToggle('medium');
- $(me.help_div).slideToggle('medium');
- });
- this.help_div.back_btn = back_btn;
- $dh(this.help_div);
-}
-
-// get all roles
-RoleObj.prototype.get_all_roles = function(id){
- if(pscript.all_roles) {
- this.make_roles(id);
- return;
- }
-
- var me = this;
- var callback = function(r,rt){
- pscript.all_roles = r.message;
- me.make_roles(id);
- }
- $c_obj('Company Control','get_all_roles','',callback);
-}
-
-// make roles
-RoleObj.prototype.make_roles = function(id){
- var me = this;
- var list = pscript.all_roles;
- me.setup_done = 1;
- me.body.innerHTML = '';
-
- var tbl = make_table( me.body, cint(list.length / 2) + 1,4,'100%',['5%','45%','5%','45%'],{padding:'4px'});
- var in_right = 0; var ridx = 0;
-
- for(i=0;i<list.length;i++){
- var cidx = in_right * 2;
-
- me.make_checkbox(tbl, ridx, cidx, list[i]);
- me.make_label(tbl, ridx, cidx + 1, list[i]);
-
- // change column
- if(in_right) {in_right = 0; ridx++ } else in_right = 1;
- }
- me.get_user_roles(id);
-}
-
-// make checkbox
-RoleObj.prototype.make_checkbox = function(tbl,ridx,cidx, role){
- var me = this;
-
- var a = $a_input($a($td(tbl, ridx, cidx),'div'),'checkbox');
- a.role = role;
- me.roles_dict[role] = a;
-
- $y(a,{width:'20px'});
- $y($td(tbl, ridx, cidx),{textAlign:'right'});
-}
-
-
-// make label
-RoleObj.prototype.make_label = function(tbl, ridx, cidx, role){
- var me = this;
-
- var t = make_table($td(tbl, ridx, cidx),1,2,null,['16px', null],{marginRight:'5px'});
- var ic = $a($td(t,0,0), 'img','',{cursor:'pointer', marginRight:'5px'});
- ic.src= 'lib/images/icons/help.png';
- ic.role = role;
-
- ic.onclick = function(){
- me.get_permissions(this.role);
- }
- $td(t,0,1).innerHTML= role;
-
-}
-
-// get user roles
-RoleObj.prototype.get_user_roles = function(id){
- var me = this;
- me.head.innerHTML = 'Roles for ' + id;
-
- $ds(me.role_div);
- $dh(me.help_div);
-
- var callback = function(r,rt){
- me.set_user_roles(r.message);
- }
- $c_obj('Company Control','get_user_roles', id,callback);
-}
-
-
-// set user roles
-RoleObj.prototype.set_user_roles = function(list){
- var me = this;
- for(d in me.roles_dict){
- me.roles_dict[d].checked = 0;
- }
- for(l=0; l<list.length; l++){
- me.roles_dict[list[l]].checked = 1;
- }
-}
-
-
-// update roles
-RoleObj.prototype.update_roles = function(id){
- var me = this;
-
-
- if(id == user && has_common(['System Manager'], user_roles) && !me.roles_dict['System Manager'].checked){
- var callback = function(r,rt){
- if(r.message){
- if(r.message > 1){
- var c = confirm("You have unchecked the System Manager role.\nYou will lose administrative rights and will not be able to set roles.\n\nDo you want to continue anyway?");
- if(!c) return;
- }
- else{
- var c = "There should be atleast one user with System Manager role.";
- me.roles_dict['System Manager'].checked = 1;
- }
- }
- me.set_roles(id);
- }
- $c_obj('Company Control','get_sm_count','',callback);
- }
- else{
- me.set_roles(id);
- }
-}
-
-// set roles
-RoleObj.prototype.set_roles = function(id){
-
- var me = this;
- var role_list = [];
-
- for(d in me.roles_dict){
- if(me.roles_dict[d].checked){
- role_list.push(d);
- }
- }
-
- var callback = function(r,rt){
- me.update_btn.done_working();
- me.dialog.hide();
- }
- var arg = {'usr':id, 'role_list':role_list};
- me.update_btn.set_working();
- $c_obj('Company Control','update_roles',docstring(arg), callback);
-
-}
-
-// get permission
-RoleObj.prototype.get_permissions = function(role){
- var me = this;
-
- var callback = function(r,rt){
- $(me.help_div).slideToggle('medium');
- $(me.role_div).slideToggle('medium');
- me.set_permissions(r.message, role);
- }
- $c_obj('Company Control','get_permission',role,callback);
-}
-
-
-// set permission
-RoleObj.prototype.set_permissions = function(perm, role){
- var me = this;
- me.help_div.body.innerHTML ='';
-
- if(perm){
- me.help_div.head.innerHTML = 'Permissions for ' + role + ':<br><br>';
-
- perm_tbl = make_table(me.help_div.body,cint(perm.length)+2,7,'100%',['30%','10%','10%','10%','10%','10%','10%'],{padding:'4px'});
-
- var head_lst = ['Document','Read','Write','Create','Submit','Cancel','Amend'];
-
- for(var i=0; i<(head_lst.length-1);i++){
- $td(perm_tbl,0,i).innerHTML= "<b>"+head_lst[i]+"</b>";
- }
- var accept_img1 = 'lib/images/icons/accept.gif';
- var cancel_img1 = 'lib/images/icons/cancel.gif';
-
- for(i=1; i<perm.length+1; i++){
- $td(perm_tbl,i,0).innerHTML= get_doctype_label(perm[i-1][0]);
-
- for(var j=1;j<(head_lst.length-1);j++){
-
- if(perm[i-1][j]){
- var accept_img = $a($td(perm_tbl,i,j), 'img'); accept_img.src= accept_img1;
- }
- else {
- var cancel_img = $a($td(perm_tbl,i,j), 'img'); cancel_img.src= cancel_img1;
- }
- $y($td(perm_tbl,i,j),{textAlign:'center'});
- }
- }
- }
- else
- me.help_div.head.innerHTML = 'No Permission set for ' + role + '.<br><br>';
-}
diff --git a/erpnext/home/page/my_company/my_company.py b/erpnext/home/page/my_company/my_company.py
index ead5333..f35f475 100644
--- a/erpnext/home/page/my_company/my_company.py
+++ b/erpnext/home/page/my_company/my_company.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import cint, load_json, cstr
diff --git a/erpnext/home/page/profile_settings/profile_settings.js b/erpnext/home/page/profile_settings/profile_settings.js
index 96b2294..8ce94f8 100644
--- a/erpnext/home/page/profile_settings/profile_settings.js
+++ b/erpnext/home/page/profile_settings/profile_settings.js
@@ -1,5 +1,21 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript['onload_profile-settings'] = function() {
- var wrapper = page_body.pages['profile-settings'];
+ var wrapper = wn.pages['profile-settings'];
wrapper.className = 'layout_wrapper';
pscript.myprofile = new MyProfile(wrapper)
}
@@ -10,13 +26,15 @@
this.make = function() {
this.head = new PageHeader(this.wrapper, 'My Profile Settings');
- this.head.add_button('Change Password', this.change_password)
+ this.head.add_button('Change Password', this.change_password);
+ this.head.add_button('Change Background', this.change_background);
+
this.tab = make_table($a(this.wrapper, 'div', '', {marginTop:'19px'}),
1, 2, '90%', ['50%', '50%'], {padding:'11px'})
this.img = $a($td(this.tab, 0, 0), 'img');
set_user_img(this.img, user);
- $btn($a($td(this.tab, 0, 0), 'div', '', {marginTop:'11px'}), 'Change Image', this.change_image)
+ $btn($a($td(this.tab, 0, 0), 'div', '', {marginTop:'11px'}), 'Change Image', this.change_image);
this.make_form();
this.load_details();
@@ -89,32 +107,42 @@
//
this.change_image = function() {
- if(!me.change_dialog) {
-
- var d = new Dialog(400,200,'Set Your Profile Image');
- d.make_body([
- ['HTML','wrapper']
- ]);
-
- var w = d.widgets['wrapper'];
- me.uploader = new Uploader(w,
- {
- modulename:'home.page.profile_settings.profile_settings',
- method: 'set_user_image'
- },
- pscript.user_image_upload, 1)
- me.change_dialog = d;
- }
- me.change_dialog.show();
+ var d = new wn.widgets.Dialog({
+ title: 'Set your Profile'
+ })
+ me.uploader = new Uploader(d.body, {
+ modulename:'home.page.profile_settings.profile_settings',
+ method: 'set_user_image'
+ },
+ pscript.user_image_upload, 1)
+ d.show();
+ pscript.open_dialog = d;
+ }
+
+ this.change_background = function() {
+ var d = new wn.widgets.Dialog({
+ title: 'Set Background Image'
+ })
+ me.uploader = new Uploader(d.body, {
+ modulename:'home.page.profile_settings.profile_settings',
+ method: 'set_user_background'
+ },
+ pscript.background_change, 1)
+ d.show();
+ pscript.open_dialog = d;
}
this.make();
}
+pscript.background_change = function(fid) {
+ //erpnext.set_background_image(fid);
+ pscript.open_dialog.hide();
+}
+
pscript.user_image_upload = function(fid) {
msgprint('File Uploaded');
-
if(fid) {
- pscript.myprofile.change_dialog.hide();
+ pscript.open_dialog.hide();
set_user_img(pscript.myprofile.img, user, null, fid);
}
}
diff --git a/erpnext/home/page/profile_settings/profile_settings.py b/erpnext/home/page/profile_settings/profile_settings.py
index 8ab5b95..fb633fd 100644
--- a/erpnext/home/page/profile_settings/profile_settings.py
+++ b/erpnext/home/page/profile_settings/profile_settings.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import load_json, cint, nowdate
@@ -47,6 +63,31 @@
"""
Set uploaded image as user image
"""
- from webnotes.utils.file_manager import add_file_list, remove_all
- remove_all('Profile', webnotes.session['user'])
- add_file_list('Profile', webnotes.session['user'], fname, fid)
+ from webnotes.utils.file_manager import add_file_list, remove_file
+ user = webnotes.session['user']
+
+ # remove old file
+ old_image = webnotes.conn.get_value('Profile', user, 'user_image')
+ if old_image:
+ remove_file('Profile', user, old_image)
+
+ # add new file
+ add_file_list('Profile', user, fname, fid)
+ webnotes.conn.set_value('Profile', user, 'user_image', fid)
+
+@webnotes.whitelist()
+def set_user_background(fid, fname):
+ """
+ Set uploaded image as user image
+ """
+ from webnotes.utils.file_manager import add_file_list, remove_file
+ user = webnotes.session['user']
+
+ # remove old file
+ old_image = webnotes.conn.get_value('Profile', user, 'background_image')
+ if old_image:
+ remove_file('Profile', user, old_image)
+
+ # add new file
+ add_file_list('Profile', user, fname, fid)
+ webnotes.conn.set_value('Profile', user, 'background_image', fid)
diff --git a/erpnext/home/search_criteria/enquiry_to_follow_up/enquiry_to_follow_up.js b/erpnext/home/search_criteria/enquiry_to_follow_up/enquiry_to_follow_up.js
index bb0e9e5..16c3ec7 100644
--- a/erpnext/home/search_criteria/enquiry_to_follow_up/enquiry_to_follow_up.js
+++ b/erpnext/home/search_criteria/enquiry_to_follow_up/enquiry_to_follow_up.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Enquiry'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
diff --git a/erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.js b/erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.js
index ff22521..94f2ef5 100644
--- a/erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.js
+++ b/erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Lead'+FILTER_SEP +'Status'].df.filter_hide = 1;
this.filter_fields_dict['Lead'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
diff --git a/erpnext/home/search_criteria/lead_to_follow_up/sales_order_overdue.js b/erpnext/home/search_criteria/lead_to_follow_up/sales_order_overdue.js
index 0f86a56..799cd22 100644
--- a/erpnext/home/search_criteria/lead_to_follow_up/sales_order_overdue.js
+++ b/erpnext/home/search_criteria/lead_to_follow_up/sales_order_overdue.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Customer'].df.filter_hide = 0;
diff --git a/erpnext/hr/doctype/appraisal/appraisal.js b/erpnext/hr/doctype/appraisal/appraisal.js
index 78b5fd3..0483c38 100644
--- a/erpnext/hr/doctype/appraisal/appraisal.js
+++ b/erpnext/hr/doctype/appraisal/appraisal.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.add_fetch('employee', 'company', 'company');
cur_frm.cscript.onload = function(doc,cdt,cdn){
diff --git a/erpnext/hr/doctype/appraisal/appraisal.py b/erpnext/hr/doctype/appraisal/appraisal.py
index 51ce9c8..67bd1e6 100644
--- a/erpnext/hr/doctype/appraisal/appraisal.py
+++ b/erpnext/hr/doctype/appraisal/appraisal.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/hr/doctype/attendance/attendance.js b/erpnext/hr/doctype/attendance/attendance.js
index d95c579..4ccc63e 100644
--- a/erpnext/hr/doctype/attendance/attendance.js
+++ b/erpnext/hr/doctype/attendance/attendance.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.add_fetch('employee', 'company', 'company');
//get employee's name based on employee id selected
diff --git a/erpnext/hr/doctype/attendance/attendance.py b/erpnext/hr/doctype/attendance/attendance.py
index 3c687ef..0d0c23c 100644
--- a/erpnext/hr/doctype/attendance/attendance.py
+++ b/erpnext/hr/doctype/attendance/attendance.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.js b/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.js
index c36a72a..6c141cc 100644
--- a/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.js
+++ b/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc,cdt,cdn){
cur_frm.log_div = $a(cur_frm.fields_dict['Import Log1'].wrapper,'div','',{border:'1px solid #CCC', backgroundColor:'#DDD',width : '100%', height : '300px', overflow : 'auto'});
hide_field('Import Log1')
diff --git a/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.py b/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.py
index eb22179..a2105c3 100644
--- a/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.py
+++ b/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/hr/doctype/employee/employee.js b/erpnext/hr/doctype/employee/employee.js
index 2bd8e1e..c696071 100644
--- a/erpnext/hr/doctype/employee/employee.js
+++ b/erpnext/hr/doctype/employee/employee.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// get retirement date
//========================================================
cur_frm.cscript.date_of_birth = function(doc, dt, dn) {
diff --git a/erpnext/hr/doctype/employee/employee.py b/erpnext/hr/doctype/employee/employee.py
index ba602cf..2cf46a6 100644
--- a/erpnext/hr/doctype/employee/employee.py
+++ b/erpnext/hr/doctype/employee/employee.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, generate_hash, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add
diff --git a/erpnext/hr/doctype/employee_profile/employee_profile.js b/erpnext/hr/doctype/employee_profile/employee_profile.js
index aedfc34..ac2a2f4 100644
--- a/erpnext/hr/doctype/employee_profile/employee_profile.js
+++ b/erpnext/hr/doctype/employee_profile/employee_profile.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc, cdt, cdn){
$c('runserverobj', args={'method':'cal_tot_exp','docs':compress_doclist (make_doclist (doc.doctype,doc.name))},
function(r, rt) { refresh_many(['year','months']); });
diff --git a/erpnext/hr/doctype/employee_profile/employee_profile.py b/erpnext/hr/doctype/employee_profile/employee_profile.py
index 130395d..5cc7dd6 100644
--- a/erpnext/hr/doctype/employee_profile/employee_profile.py
+++ b/erpnext/hr/doctype/employee_profile/employee_profile.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/hr/doctype/expense_voucher/expense_voucher.js b/erpnext/hr/doctype/expense_voucher/expense_voucher.js
index bdad2c5..2e03567 100644
--- a/erpnext/hr/doctype/expense_voucher/expense_voucher.js
+++ b/erpnext/hr/doctype/expense_voucher/expense_voucher.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.add_fetch('employee', 'company', 'company');
cur_frm.cscript.onload = function(doc,cdt,cdn){
diff --git a/erpnext/hr/doctype/expense_voucher/expense_voucher.py b/erpnext/hr/doctype/expense_voucher/expense_voucher.py
index 4352cca..b349100 100644
--- a/erpnext/hr/doctype/expense_voucher/expense_voucher.py
+++ b/erpnext/hr/doctype/expense_voucher/expense_voucher.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/hr/doctype/holiday_list/holiday_list.py b/erpnext/hr/doctype/holiday_list/holiday_list.py
index afafcec..2f73159 100644
--- a/erpnext/hr/doctype/holiday_list/holiday_list.py
+++ b/erpnext/hr/doctype/holiday_list/holiday_list.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/hr/doctype/it_checklist/it_checklist.js b/erpnext/hr/doctype/it_checklist/it_checklist.js
index d30e35a..a97ae65 100644
--- a/erpnext/hr/doctype/it_checklist/it_checklist.js
+++ b/erpnext/hr/doctype/it_checklist/it_checklist.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload=function(doc,cdt,cdn){
if(doc.employee && doc.__islocal ==1){
diff --git a/erpnext/hr/doctype/it_checklist/it_checklist.py b/erpnext/hr/doctype/it_checklist/it_checklist.py
index 182e171..4ddfc0a 100644
--- a/erpnext/hr/doctype/it_checklist/it_checklist.py
+++ b/erpnext/hr/doctype/it_checklist/it_checklist.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.js b/erpnext/hr/doctype/leave_allocation/leave_allocation.js
index 9b82cf9..bce7af3 100755
--- a/erpnext/hr/doctype/leave_allocation/leave_allocation.js
+++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// ****************************************** onload ********************************************************
cur_frm.cscript.onload = function(doc, dt, dn) {
if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()});
diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.py b/erpnext/hr/doctype/leave_allocation/leave_allocation.py
index 12fe37a..eb37609 100755
--- a/erpnext/hr/doctype/leave_allocation/leave_allocation.py
+++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/hr/doctype/leave_application/leave_application.js b/erpnext/hr/doctype/leave_application/leave_application.js
index 1eda69f..b7524c8 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.js
+++ b/erpnext/hr/doctype/leave_application/leave_application.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// ****************************************** onload ********************************************************
cur_frm.cscript.onload = function(doc, dt, dn) {
if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()});
diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py
index b1697bf..66647c1 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.py
+++ b/erpnext/hr/doctype/leave_application/leave_application.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
index 2e1f695..54cc8d5 100644
--- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
+++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc,dt,dn){
if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()});
if(!doc.leave_transaction_type) set_multiple(dt,dn,{leave_transaction_type:'Allocation'});
diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py
index 164a062..fe75785 100644
--- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py
+++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/hr/doctype/payroll_rule/payroll_rule.js b/erpnext/hr/doctype/payroll_rule/payroll_rule.js
index 9984ce4..e021338 100644
--- a/erpnext/hr/doctype/payroll_rule/payroll_rule.js
+++ b/erpnext/hr/doctype/payroll_rule/payroll_rule.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//omload function to set values in select field
cur_frm.cscript.onload = function(doc, cdt, cdn){
var mydoc = doc
diff --git a/erpnext/hr/doctype/payroll_rule/payroll_rule.py b/erpnext/hr/doctype/payroll_rule/payroll_rule.py
index 67cbd52..5d6e13f 100644
--- a/erpnext/hr/doctype/payroll_rule/payroll_rule.py
+++ b/erpnext/hr/doctype/payroll_rule/payroll_rule.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/hr/doctype/salary_manager/__init__.py b/erpnext/hr/doctype/salary_manager/__init__.py
index cb6c600..ca974f3 100644
--- a/erpnext/hr/doctype/salary_manager/__init__.py
+++ b/erpnext/hr/doctype/salary_manager/__init__.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
from webnotes import ValidationError
class SalarySlipExistsError(ValidationError): pass
diff --git a/erpnext/hr/doctype/salary_manager/salary_manager.js b/erpnext/hr/doctype/salary_manager/salary_manager.js
index cf470be..91eac1a 100644
--- a/erpnext/hr/doctype/salary_manager/salary_manager.js
+++ b/erpnext/hr/doctype/salary_manager/salary_manager.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
var display_activity_log = function(msg) {
if(!pscript.ss_html)
pscript.ss_html = $a(cur_frm.fields_dict['Activity Log'].wrapper,'div','',{border:'1px solid #CCC', backgroundColor:'#CCC'});
diff --git a/erpnext/hr/doctype/salary_manager/salary_manager.py b/erpnext/hr/doctype/salary_manager/salary_manager.py
index badd69b..107305e 100644
--- a/erpnext/hr/doctype/salary_manager/salary_manager.py
+++ b/erpnext/hr/doctype/salary_manager/salary_manager.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/hr/doctype/salary_manager/test_salary_manager.py b/erpnext/hr/doctype/salary_manager/test_salary_manager.py
index c7d0867..0282bfe 100644
--- a/erpnext/hr/doctype/salary_manager/test_salary_manager.py
+++ b/erpnext/hr/doctype/salary_manager/test_salary_manager.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import unittest
import webnotes
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.js b/erpnext/hr/doctype/salary_slip/salary_slip.js
index c6ae27b..0dc7ad9 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.js
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.add_fetch('employee', 'company', 'company');
// On load
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py
index 3a42dca..e0313a4 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.js b/erpnext/hr/doctype/salary_structure/salary_structure.js
index 8014b69..fe57910 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.js
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.add_fetch('employee', 'company', 'company');
// On load
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.py b/erpnext/hr/doctype/salary_structure/salary_structure.py
index 36a1855..562a885 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.py
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/hr/page/hr_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/hr/page/hr_home/__init__.py
diff --git a/erpnext/hr/page/hr_home/hr_home.html b/erpnext/hr/page/hr_home/hr_home.html
new file mode 100644
index 0000000..7d1f27f
--- /dev/null
+++ b/erpnext/hr/page/hr_home/hr_home.html
@@ -0,0 +1,123 @@
+<div class="layout-wrapper layout-wrapper-background">
+ <div class="layout-main-section">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Human Resources</h1>
+ <hr>
+ <div style="width: 48%; float: left;">
+ <h4><a href="#!List/Attendance">Attendance</a></h4>
+ <p class="help">Attendance Mark</p>
+ <h4><a href="#!List/Leave Application">Leave Application</a></h4>
+ <p class="help">Applications for leave</p>
+ <h4><a href="#!List/Expense Voucher">Expense Voucher</a></h4>
+ <p class="help">Claims for expenses</p>
+ <h4><a href="#!List/Salary Slip">Salary Slip</a></h4>
+ <p class="help">Monthly salary statement</p>
+ <h4><a href="#!List/Appraisal">Appraisal</a></h4>
+ <p class="help">Performance appraisal</p>
+ </div>
+ <div style="width: 48%; float: right;">
+ <h4><a href="#!List/Employee">Employee</a></h4>
+ <p class="help">Employee Master</p>
+ </div>
+ <div style="clear: both"></div>
+ <hr>
+ <h3>Reports</h3>
+ <div class="reports-list"></div>
+ </div>
+ <div class="layout-side-section">
+ <div class="psidebar">
+ <div class="section">
+ <div class="section-head">Leave and Attendance</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "Upload and update attendance from a spreadsheet file (csv)"
+ href="#!Form/Attendance Control Panel/Attendance Control Panel">Upload attendance</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Leave allocation helper"
+ href="#!Form/Leave Control Panel/Leave Control Panel">Allocate Leaves</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Allocate leaves"
+ href="#!List/Leave Allocation">Leave Allocation</a>
+ </div>
+
+ <div class="section-item">
+ <a class="section-link"
+ title = "Type of leaves like casual, sick etc."
+ href="#!List/Leave Type">Leave Type</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "List of holidays"
+ href="#!List/Leave Allocation">Holiday List</a>
+ </div>
+ </div>
+ </div>
+ <div class="section">
+ <div class="section-head">Salary and Payroll</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "Monthly salary template with earnings and deductions"
+ href="#!List/Salary Structure">Salary Structure</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Generate Salary Slips"
+ href="#!Form/Salary Manager/Salary Manager">Process Payroll</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Benefit types like basic salary, allowances etc."
+ href="#!List/Earning Type">Earning Type</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "tax and other salary deductions"
+ href="#!List/Deduction Type">Deduction Type</a>
+ </div>
+ </div>
+ </div>
+ <div class="section">
+ <div class="section-head">Employee Setup</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "Type of employment master"
+ href="#!List/Employment Type">Employment Type</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Template for employee performance appraisals"
+ href="#!List/KRA Template">Key Performance Area (KRA) Template</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Company branches (for employee records)"
+ href="#!List/Branch">Branch</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Company departments"
+ href="#!List/Department">Department</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Company departments"
+ href="#!List/Designation">Designation</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Employee grades"
+ href="#!List/Grade">Grade</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/hr/page/hr_home/hr_home.js b/erpnext/hr/page/hr_home/hr_home.js
new file mode 100644
index 0000000..418ed57
--- /dev/null
+++ b/erpnext/hr/page/hr_home/hr_home.js
@@ -0,0 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+pscript['onload_hr-home'] = function(wrapper) {
+ erpnext.module_page.setup_page('HR', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/hr/page/hr_home/hr_home.txt b/erpnext/hr/page/hr_home/hr_home.txt
new file mode 100644
index 0000000..a5a4ba9
--- /dev/null
+++ b/erpnext/hr/page/hr_home/hr_home.txt
@@ -0,0 +1,28 @@
+# Page, hr-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-21 13:24:05',
+ 'docstatus': 0,
+ 'modified': '2012-02-21 13:24:05',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'HR',
+ 'name': '__common__',
+ 'page_name': u'hr-home',
+ 'standard': u'Yes',
+ 'title': u'Human Resources Home'
+ },
+
+ # Page, hr-home
+ {
+ 'doctype': 'Page',
+ 'name': u'hr-home'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/hr/search_criteria/employee_information/employee_information.py b/erpnext/hr/search_criteria/employee_information/employee_information.py
index 74f8282..74dd259 100644
--- a/erpnext/hr/search_criteria/employee_information/employee_information.py
+++ b/erpnext/hr/search_criteria/employee_information/employee_information.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
for c in range(0,len(colnames)):
l = (len(colnames[c])*9)
if l < 150 : col_width = '150px'
diff --git a/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.js b/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.js
index 24d1774..88d1cb4 100644
--- a/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.js
+++ b/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
this.mytabs.items['Select Columns'].hide();
this.mytabs.tabs['More Filters'].hide();
diff --git a/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.py b/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.py
index 8c0c747..2721a6b 100644
--- a/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.py
+++ b/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
leave_types = sql("""
SELECT name FROM `tabLeave Type`
WHERE
diff --git a/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.js b/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.js
index bb74506..e922a2f 100644
--- a/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.js
+++ b/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
var get_month = function(){
var dict = {0:'Jan', 1:'Feb',2:'Mar',3:'Apr',4:'May',5:'June',6:'July',7:'Aug',8:'Sept',9:'Oct',10:'Nov',11:'Dec'}
diff --git a/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.py b/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.py
index 55fdef0..a45c09d 100644
--- a/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.py
+++ b/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
#add column employee, employee name
#--------------------------------------------------------------------------------------
col =[['Employee','Link','155px','Employee'],['Employee Name','Data','150px','']]
diff --git a/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.js b/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.js
index ee61977..e6dc267 100644
--- a/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.js
+++ b/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
var d = new Date();
diff --git a/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.py b/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.py
index aae4db1..f116d90 100644
--- a/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.py
+++ b/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
status = filter_values.get('status')
month = filter_values.get('month')
diff --git a/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.js b/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.js
index 4b5adec..810fe16 100644
--- a/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.js
+++ b/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.js b/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.js
index d4c0398..388aa7b 100644
--- a/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.js
+++ b/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/hr/search_criteria/salary_register/salary_register.js b/erpnext/hr/search_criteria/salary_register/salary_register.js
index 4119944..c451b27 100644
--- a/erpnext/hr/search_criteria/salary_register/salary_register.js
+++ b/erpnext/hr/search_criteria/salary_register/salary_register.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
fld_lst = ['ID','Employee']
diff --git a/erpnext/hr/search_criteria/salary_register/salary_register.py b/erpnext/hr/search_criteria/salary_register/salary_register.py
index 049708a..c44954c 100644
--- a/erpnext/hr/search_criteria/salary_register/salary_register.py
+++ b/erpnext/hr/search_criteria/salary_register/salary_register.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
sal_slips_ids = ''
for r in res:
if not sal_slips_ids == '': sal_slips_ids +=","
diff --git a/erpnext/knowledge_base/doctype/question/question.py b/erpnext/knowledge_base/doctype/question/question.py
index 5ddee6a..c104cfa 100644
--- a/erpnext/knowledge_base/doctype/question/question.py
+++ b/erpnext/knowledge_base/doctype/question/question.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
diff --git a/erpnext/knowledge_base/page/kb_common/kb_common.js b/erpnext/knowledge_base/page/kb_common/kb_common.js
index 433ea2e..a734f65 100644
--- a/erpnext/knowledge_base/page/kb_common/kb_common.js
+++ b/erpnext/knowledge_base/page/kb_common/kb_common.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// question toolbar
// contains - voting widget / tag list and user info / timestamp
// By XXXXXX on YYYYY
@@ -8,7 +24,6 @@
this.make = function() {
this.wrapper = $a(this.parent, 'div', '', {});
this.line1 = $a(this.wrapper, 'div', '', {color: '#888', fontSize:'11px', margin:'7px 0px'});
- this.line2 = $a(this.wrapper, 'div','',{marginBottom:'7px'});
this.make_timestamp();
this.make_vote();
if(this.with_tags)
@@ -29,7 +44,8 @@
}
this.make_vote = function() {
- new KBPoints(this.line2, this.det.points, this.det._users_voted, this.doctype, this.det.name, this.det.owner);
+ this.line1.innerHTML += ' | '
+ new KBPoints(this.line1, this.det.points, this.det._users_voted, this.doctype, this.det.name, this.det.owner);
}
this.del = function() {
@@ -41,7 +57,8 @@
}
this.make_tags = function() {
- this.tags_area = $a(this.line2, 'span', 'kb-tags')
+ this.line1.innerHTML += ' | '
+ this.tags_area = $a(this.line1, 'span', 'kb-tags')
this.tags = new TagList(this.tags_area,
this.det._user_tags && (this.det._user_tags.split(',')),
this.doctype, this.det.name, 0, kb.set_tag_filter)
@@ -57,7 +74,7 @@
var me = this;
voted = voted ? voted.split(',') : [];
- this.wrapper = $a(parent, 'span', '', {fontSize: '11px', marginRight: '13px'});
+ this.wrapper = $a(parent, 'span', '', {fontSize: '11px', marginRight: '7px', marginLeft: '7px'});
this.render_points = function(p) {
if(!this.points_area)
@@ -99,16 +116,14 @@
$.extend(this, args);
var me = this;
- this.display = $a(me.parent, 'div', me.disp_class, '', me.text);
- this.input = $a(me.parent, 'textarea', me.inp_class, {display:'none'});
+ this.wrapper = $a(me.parent, 'div');
+ this.display = $a(me.wrapper, 'div', me.disp_class, '', me.text);
+ this.input = $a(me.wrapper, 'textarea', me.inp_class, {display:'none'});
- var div = $a(me.parent, 'div', '', {marginTop:'5px', height:'23px'});
+ var div = $a(me.wrapper, 'div', '', {marginTop:'5px', height:'23px'});
// edit text
- this.edit_btn = $a(div, 'span', '', {color:'#333', marginLeft:'-2px', cursor:'pointer', padding:'3px', backgroundColor:'#ddd', cssFloat: 'left'});
- $br(this.edit_btn, '3px')
- $a(this.edit_btn, 'div', 'wn-icon ic-pencil', {marginBottom:'-2px', cssFloat:'left'} );
- $a(this.edit_btn, 'span', 'link_type', {marginLeft:'3px', color:'#555', fontSize:'11px'}, 'Edit');
+ this.edit_btn = $a(div, 'a', '', {cursor:'pointer'}, '[edit]');
this.edit_btn.onclick = function() {
me.input.value = me.display.innerHTML;
diff --git a/erpnext/knowledge_base/page/question_view/question_view.css b/erpnext/knowledge_base/page/question_view/question_view.css
index 0c2526c..4472da7 100644
--- a/erpnext/knowledge_base/page/question_view/question_view.css
+++ b/erpnext/knowledge_base/page/question_view/question_view.css
@@ -24,9 +24,6 @@
}
.qv-question-wrapper {
- margin: 7px 0px 13px 0px;
- padding-bottom: 7px;
- border-bottom: 1px solid #CCC;
}
.qv-add-answer {
@@ -43,7 +40,5 @@
}
.qv-answer {
- margin: 7px 0px 7px 0px;
- padding-bottom: 7px;
- border-bottom: 1px solid #CCC;
+
}
\ No newline at end of file
diff --git a/erpnext/knowledge_base/page/question_view/question_view.html b/erpnext/knowledge_base/page/question_view/question_view.html
new file mode 100644
index 0000000..9939332
--- /dev/null
+++ b/erpnext/knowledge_base/page/question_view/question_view.html
@@ -0,0 +1,13 @@
+<div class="layout-wrapper">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Knowledge Base</h1>
+ <hr>
+ <p style="text-align: right"><a href="#!questions">← Back to Questions</a></p>
+ <div class="qv-question-wrapper">
+ </div>
+ <hr>
+ <div class="qv-answer-wrapper">
+ </div>
+ <div class="add-answer-link"></div>
+ <div class="add-answer-area"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/knowledge_base/page/question_view/question_view.js b/erpnext/knowledge_base/page/question_view/question_view.js
index 422fb30..5783471 100644
--- a/erpnext/knowledge_base/page/question_view/question_view.js
+++ b/erpnext/knowledge_base/page/question_view/question_view.js
@@ -1,14 +1,25 @@
-pscript['onload_question-view'] = function() {
-//
- var w = page_body.pages['question-view'];
- w.className = 'layout_wrapper';
- new PageHeader(w, 'Knowledge Base');
- w.link = $ln($a(w, 'div'), '< Back to all questions', function() { loadpage('questions'); })
- w.body = $a(w, 'div', 'qv-body');
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+pscript['onload_question-view'] = function(wrapper) {
+ wrapper.add_answer_area = $('.add-answer-area').get(0);
}
pscript['refresh_question-view'] = function() {
+ $('.add-answer-area').empty();
// href
var qid = window.location.hash.split('/')[1];
if(qid) {
@@ -17,22 +28,17 @@
}
pscript.question_view = function(qid, qtext) {
- var w = page_body.pages['question-view'];
+ var w = wn.pages['question-view'];
new KBQuestionView(w, qid, qtext);
}
KBQuestionView = function(w, qid, qtext) {
var me = this;
-
- w.body.innerHTML = '';
- w.question_area = $a(w.body, 'div', 'social qv-question-wrapper');
- w.answer_area = $a(w.body, 'div', 'social qv-answer-wrapper');
- w.add_answer_link = $a(w.body, 'div', '', {margin:'3px 0px'});
- w.add_answer_area = $a(w.body, 'div', 'qv-add-answer');
-
+
this.make_question = function() {
+ $(w).find('.qv-question-wrapper').empty();
new EditableText({
- parent: w.question_area,
+ parent: $(w).find('.qv-question-wrapper').get(0),
dt: 'Question',
dn: qid,
fieldname: 'question',
@@ -46,8 +52,9 @@
// answer list
this.make_answer_list = function() {
+ $(w).find('.qv-answer-wrapper').empty();
this.ans_list = new KBAnswerList({
- parent: w.answer_area,
+ parent: $(w).find('.qv-answer-wrapper').get(0),
qid: qid
})
}
@@ -64,11 +71,12 @@
// add a link to open add answer
this.make_answer_box_link = function() {
- $a(w.add_answer_link, 'span', 'link_type', null, '+ Add your answer',
- function() {
- $dh(w.add_answer_link);
- me.make_answer_box();
- });
+ $('.add-answer-link').html('<button class="btn btn-small">\
+ <i class="icon-plus"></i> Add you answer</button>').find('button').click(
+ function() {
+ $(this).toggle(false);
+ me.make_answer_box();
+ });
}
// answer box
@@ -126,7 +134,7 @@
this.list = new wn.widgets.Listing({
parent: me.parent,
as_dict: 1,
- no_results_message: 'No answers yet, be the first one to answer!',
+ no_result_message: 'No answers yet, be the first one to answer!',
render_row: function(body, data) {
new KBAnswer(body, data, me)
},
@@ -135,7 +143,8 @@
+"t2.last_name, t1.modified from tabAnswer t1, tabProfile t2 "
+"where question='%(qid)s' and t1.owner = t2.name "
+"order by t1.points desc, t1.modified desc", {qid: me.qid})
- }
+ },
+ title: 'Answers'
});
this.list.run();
@@ -152,7 +161,7 @@
// points yyy
KBAnswer = function(body, data, ans_list) {
body.className = 'qv-answer';
- new EditableText({
+ var edtxt = new EditableText({
parent: body,
dt: 'Answer',
dn: data.name,
@@ -163,6 +172,8 @@
rich_text: 1
});
+ $(edtxt.wrapper).addClass('well');
+
var div = $a(body, 'div', '', {})
new KBItemToolbar({
parent: div,
diff --git a/erpnext/knowledge_base/page/question_view/question_view.py b/erpnext/knowledge_base/page/question_view/question_view.py
index c711b90..c7d927e 100644
--- a/erpnext/knowledge_base/page/question_view/question_view.py
+++ b/erpnext/knowledge_base/page/question_view/question_view.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import load_json, cstr, now
diff --git a/erpnext/knowledge_base/page/questions/questions.css b/erpnext/knowledge_base/page/questions/questions.css
index b8a80c4..aa97ffc 100644
--- a/erpnext/knowledge_base/page/questions/questions.css
+++ b/erpnext/knowledge_base/page/questions/questions.css
@@ -13,7 +13,6 @@
}
.kb-questions {
- color: #000;
}
.kb-question-details {
diff --git a/erpnext/knowledge_base/page/questions/questions.html b/erpnext/knowledge_base/page/questions/questions.html
index e69de29..c76f490 100644
--- a/erpnext/knowledge_base/page/questions/questions.html
+++ b/erpnext/knowledge_base/page/questions/questions.html
@@ -0,0 +1,19 @@
+<div class="layout-wrapper layout-wrapper-background">
+ <div class="layout-main-section">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Knowledge Base</h1>
+ <hr>
+ <div class="well kb-search-wrapper">
+ <textarea></textarea>
+ <div>
+ <button class="btn btn-small search" onclick="">
+ <i class="icon-search"></i> Search</button>
+ <button class="btn btn-small ask">
+ <i class="icon-question-sign"></i> Ask</button>
+ </div>
+ </div>
+ </div>
+ <div class="layout-side-section">
+ </div>
+ <div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/knowledge_base/page/questions/questions.js b/erpnext/knowledge_base/page/questions/questions.js
index a3dff13..7261cd8 100644
--- a/erpnext/knowledge_base/page/questions/questions.js
+++ b/erpnext/knowledge_base/page/questions/questions.js
@@ -1,22 +1,33 @@
-pscript.onload_questions = function() {
- var w = page_body.pages['questions'];
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+pscript.onload_questions = function(wrapper) {
+ body = $(wrapper).find('.layout-main-section').get(0);
- var tab = make_table(w, 1, 2, '100%', ['75%', '25%'], {});
- var body = $a($td(tab,0,0),'div','layout_wrapper');
-
- new PageHeader(body, 'Knowledge Base');
-
// kb
var kb = new KnowledgeBase(body);
// sidebar
- $y($td(tab, 0, 1), {paddingTop:'53px'});
- this.sidebar = new wn.widgets.PageSidebar($td(tab, 0, 1), {
+ this.sidebar = new wn.widgets.PageSidebar($(wrapper).find('.layout-side-section').get(0), {
sections: [
{
title: 'Top Tags',
render: function(body) {
- new wn.widgets.TagCloud(body, 'Question', function(tag) { kb.set_tag_filter(tag) });
+ new wn.widgets.TagCloud(body, 'Question', function(tag)
+ { kb.set_tag_filter(tag) });
}
}
]
@@ -34,11 +45,14 @@
this.tag_filter_dict = {};
this.make_search_bar = function() {
- this.search = $a($a(w,'div','kb-search-wrapper'), 'textarea');
+ this.search = $(w).find('.kb-search-wrapper textarea').get(0);
- var div = $a(w,'div','kb-btn-wrapper');
- $btn(div, 'Search', function() { me.run() }, {fontSize:'14px'});
- $btn(div, 'Ask', function() { me.ask() }, {fontSize:'14px'});
+ $(w).find('.btn.search').click(function() {
+ me.run();
+ })
+ $(w).find('.btn.ask').click(function() {
+ me.ask();
+ })
}
// ask a new question
diff --git a/erpnext/knowledge_base/page/questions/questions.py b/erpnext/knowledge_base/page/questions/questions.py
index d3f0d7c..1b90fc7 100644
--- a/erpnext/knowledge_base/page/questions/questions.py
+++ b/erpnext/knowledge_base/page/questions/questions.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import load_json, cint, cstr
diff --git a/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py b/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py
index 34fd498..8fee8c5 100644
--- a/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py
+++ b/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/accounts_default_form.py b/erpnext/patches/before_jan_2012/accounts_default_form.py
index dab6923..282ebf5 100644
--- a/erpnext/patches/before_jan_2012/accounts_default_form.py
+++ b/erpnext/patches/before_jan_2012/accounts_default_form.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/auto_indent.py b/erpnext/patches/before_jan_2012/auto_indent.py
index a8488e7..7373c39 100644
--- a/erpnext/patches/before_jan_2012/auto_indent.py
+++ b/erpnext/patches/before_jan_2012/auto_indent.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/c_form_patch.py b/erpnext/patches/before_jan_2012/c_form_patch.py
index 0f8fa22..8c00891 100644
--- a/erpnext/patches/before_jan_2012/c_form_patch.py
+++ b/erpnext/patches/before_jan_2012/c_form_patch.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/delivery_billing_status_patch.py b/erpnext/patches/before_jan_2012/delivery_billing_status_patch.py
index 7de04b7..2213c20 100644
--- a/erpnext/patches/before_jan_2012/delivery_billing_status_patch.py
+++ b/erpnext/patches/before_jan_2012/delivery_billing_status_patch.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
sql = webnotes.conn.sql
diff --git a/erpnext/patches/before_jan_2012/deploy_email_digest.py b/erpnext/patches/before_jan_2012/deploy_email_digest.py
index 02f842c..5adeb97 100644
--- a/erpnext/patches/before_jan_2012/deploy_email_digest.py
+++ b/erpnext/patches/before_jan_2012/deploy_email_digest.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
def execute():
diff --git a/erpnext/patches/before_jan_2012/edigest_enable_income_year_to_date.py b/erpnext/patches/before_jan_2012/edigest_enable_income_year_to_date.py
index 380de83..7d5b856 100644
--- a/erpnext/patches/before_jan_2012/edigest_enable_income_year_to_date.py
+++ b/erpnext/patches/before_jan_2012/edigest_enable_income_year_to_date.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.model.doc import Document
diff --git a/erpnext/patches/before_jan_2012/employeewise_balance_leave_report.py b/erpnext/patches/before_jan_2012/employeewise_balance_leave_report.py
index 59c5940..bab119e 100644
--- a/erpnext/patches/before_jan_2012/employeewise_balance_leave_report.py
+++ b/erpnext/patches/before_jan_2012/employeewise_balance_leave_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
"""
This patch changes criteria name
of search criteria "employeewise_balance_leave_report"
diff --git a/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py b/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py
index e78a82e..aab64a0 100644
--- a/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py
+++ b/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
#Cleanup all unwanted documents and restructure of moduloes
#----------------------------------------------------------
diff --git a/erpnext/patches/before_jan_2012/index_patch.py b/erpnext/patches/before_jan_2012/index_patch.py
index 788b68d..7e1991c 100644
--- a/erpnext/patches/before_jan_2012/index_patch.py
+++ b/erpnext/patches/before_jan_2012/index_patch.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
"""
This patch removes wrong indexs and add proper indexes in tables
"""
diff --git a/erpnext/patches/before_jan_2012/install_print_formats.py b/erpnext/patches/before_jan_2012/install_print_formats.py
index 40a008e..3a18aae 100644
--- a/erpnext/patches/before_jan_2012/install_print_formats.py
+++ b/erpnext/patches/before_jan_2012/install_print_formats.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import os, sys
import webnotes
diff --git a/erpnext/patches/before_jan_2012/lcw_patch.py b/erpnext/patches/before_jan_2012/lcw_patch.py
index 66afafc..b274069 100644
--- a/erpnext/patches/before_jan_2012/lcw_patch.py
+++ b/erpnext/patches/before_jan_2012/lcw_patch.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/p1.py b/erpnext/patches/before_jan_2012/p1.py
index e2304c7..ef8ca4c 100644
--- a/erpnext/patches/before_jan_2012/p1.py
+++ b/erpnext/patches/before_jan_2012/p1.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
if not webnotes.conn.sql("select name from tabDocFormat where parent = 'Receivable Voucher' and format != 'POS Invoice'"):
diff --git a/erpnext/patches/before_jan_2012/packing_slip.py b/erpnext/patches/before_jan_2012/packing_slip.py
index 9285e8a..23c34d9d 100644
--- a/erpnext/patches/before_jan_2012/packing_slip.py
+++ b/erpnext/patches/before_jan_2012/packing_slip.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/price_list_patch.py b/erpnext/patches/before_jan_2012/price_list_patch.py
index 0f485b3..ce2ff4a 100644
--- a/erpnext/patches/before_jan_2012/price_list_patch.py
+++ b/erpnext/patches/before_jan_2012/price_list_patch.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/print_hide_price_list.py b/erpnext/patches/before_jan_2012/print_hide_price_list.py
index 833ab98..8940ef3 100644
--- a/erpnext/patches/before_jan_2012/print_hide_price_list.py
+++ b/erpnext/patches/before_jan_2012/print_hide_price_list.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
webnotes.conn.sql("update `tabDocField` set print_hide = 1 where fieldname in ('price_list_currency', 'plc_conversion_rate')")
diff --git a/erpnext/patches/before_jan_2012/profile_mark_not_in_create.py b/erpnext/patches/before_jan_2012/profile_mark_not_in_create.py
index 8d25047..559266d 100644
--- a/erpnext/patches/before_jan_2012/profile_mark_not_in_create.py
+++ b/erpnext/patches/before_jan_2012/profile_mark_not_in_create.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
def execute():
"""
diff --git a/erpnext/patches/before_jan_2012/project_patch.py b/erpnext/patches/before_jan_2012/project_patch.py
index c5473a0..f4b0ea6 100644
--- a/erpnext/patches/before_jan_2012/project_patch.py
+++ b/erpnext/patches/before_jan_2012/project_patch.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_address.py b/erpnext/patches/before_jan_2012/reload_address.py
index 252339b..3ef80d8 100644
--- a/erpnext/patches/before_jan_2012/reload_address.py
+++ b/erpnext/patches/before_jan_2012/reload_address.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_bom.py b/erpnext/patches/before_jan_2012/reload_bom.py
index f050f3c..f925bc6 100644
--- a/erpnext/patches/before_jan_2012/reload_bom.py
+++ b/erpnext/patches/before_jan_2012/reload_bom.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_doclayer.py b/erpnext/patches/before_jan_2012/reload_doclayer.py
index 8ee4919..4ab077e 100644
--- a/erpnext/patches/before_jan_2012/reload_doclayer.py
+++ b/erpnext/patches/before_jan_2012/reload_doclayer.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
"""
Reload DocLayer, DocLayerField and Print Format doctypes
"""
diff --git a/erpnext/patches/before_jan_2012/reload_email_digest.py b/erpnext/patches/before_jan_2012/reload_email_digest.py
index 2890254..13a2614 100644
--- a/erpnext/patches/before_jan_2012/reload_email_digest.py
+++ b/erpnext/patches/before_jan_2012/reload_email_digest.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
from webnotes.modules.module_manager import reload_doc
reload_doc('Setup', 'DocType', 'Email Digest')
diff --git a/erpnext/patches/before_jan_2012/reload_employeewise_balance_leave_report.py b/erpnext/patches/before_jan_2012/reload_employeewise_balance_leave_report.py
index b03b44b..b60d3d4 100644
--- a/erpnext/patches/before_jan_2012/reload_employeewise_balance_leave_report.py
+++ b/erpnext/patches/before_jan_2012/reload_employeewise_balance_leave_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_flat_bom.py b/erpnext/patches/before_jan_2012/reload_flat_bom.py
index b493610..a46ad5e 100644
--- a/erpnext/patches/before_jan_2012/reload_flat_bom.py
+++ b/erpnext/patches/before_jan_2012/reload_flat_bom.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
from webnotes.modules import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_gl_mapper.py b/erpnext/patches/before_jan_2012/reload_gl_mapper.py
index edb00bc..27f2c58 100644
--- a/erpnext/patches/before_jan_2012/reload_gl_mapper.py
+++ b/erpnext/patches/before_jan_2012/reload_gl_mapper.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_lc_wizard.py b/erpnext/patches/before_jan_2012/reload_lc_wizard.py
index 6b8565e..7645419 100644
--- a/erpnext/patches/before_jan_2012/reload_lc_wizard.py
+++ b/erpnext/patches/before_jan_2012/reload_lc_wizard.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_print_format.py b/erpnext/patches/before_jan_2012/reload_print_format.py
index e3c6adf..37b83a6 100644
--- a/erpnext/patches/before_jan_2012/reload_print_format.py
+++ b/erpnext/patches/before_jan_2012/reload_print_format.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_project_task.py b/erpnext/patches/before_jan_2012/reload_project_task.py
index 019a177..14d39fd 100644
--- a/erpnext/patches/before_jan_2012/reload_project_task.py
+++ b/erpnext/patches/before_jan_2012/reload_project_task.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
"""
Reload Task Doctype of Project Module
"""
diff --git a/erpnext/patches/before_jan_2012/reload_reco.py b/erpnext/patches/before_jan_2012/reload_reco.py
index 6b9ecc4..9335992 100644
--- a/erpnext/patches/before_jan_2012/reload_reco.py
+++ b/erpnext/patches/before_jan_2012/reload_reco.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_rv.py b/erpnext/patches/before_jan_2012/reload_rv.py
index 7b47b4c..f41db49 100644
--- a/erpnext/patches/before_jan_2012/reload_rv.py
+++ b/erpnext/patches/before_jan_2012/reload_rv.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_support_ticket.py b/erpnext/patches/before_jan_2012/reload_support_ticket.py
index 85145bd..803754f 100644
--- a/erpnext/patches/before_jan_2012/reload_support_ticket.py
+++ b/erpnext/patches/before_jan_2012/reload_support_ticket.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/remove_duplicate_table_mapper_detail.py b/erpnext/patches/before_jan_2012/remove_duplicate_table_mapper_detail.py
index aaddd99..fcc40d1 100644
--- a/erpnext/patches/before_jan_2012/remove_duplicate_table_mapper_detail.py
+++ b/erpnext/patches/before_jan_2012/remove_duplicate_table_mapper_detail.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
"""
Removes duplicate entries created in
"""
diff --git a/erpnext/patches/before_jan_2012/remove_extra_button_from_email_digest.py b/erpnext/patches/before_jan_2012/remove_extra_button_from_email_digest.py
index 7005db9..1129f06 100644
--- a/erpnext/patches/before_jan_2012/remove_extra_button_from_email_digest.py
+++ b/erpnext/patches/before_jan_2012/remove_extra_button_from_email_digest.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
webnotes.conn.sql("""
diff --git a/erpnext/patches/before_jan_2012/remove_old_cp_email_settings.py b/erpnext/patches/before_jan_2012/remove_old_cp_email_settings.py
index 5736c9c..17d9c33 100644
--- a/erpnext/patches/before_jan_2012/remove_old_cp_email_settings.py
+++ b/erpnext/patches/before_jan_2012/remove_old_cp_email_settings.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
"""
remove control panel email settings if automail.webnotestech.com
diff --git a/erpnext/patches/before_jan_2012/remove_page_break_from_defaults.py b/erpnext/patches/before_jan_2012/remove_page_break_from_defaults.py
index 8d842e3..4687c1e 100644
--- a/erpnext/patches/before_jan_2012/remove_page_break_from_defaults.py
+++ b/erpnext/patches/before_jan_2012/remove_page_break_from_defaults.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
webnotes.conn.sql("""delete from `tabDefaultValue` where defkey in ('page_break', 'projects', 'packing_details', 'discounts', 'brands', 'item_batch_nos', 'after_sales_installations', 'item_searial_nos', 'item_group_in_details', 'exports', 'imports', 'item_advanced', 'sales_extras', 'more_info', 'quality', 'manufacturing', 'pos', 'item_serial_nos', 'purchase_discounts', 'recurring_invoice') and parent = 'Control Panel'""")
diff --git a/erpnext/patches/before_jan_2012/remove_previous_field_property_setter.py b/erpnext/patches/before_jan_2012/remove_previous_field_property_setter.py
index 677188e..c8e0029 100644
--- a/erpnext/patches/before_jan_2012/remove_previous_field_property_setter.py
+++ b/erpnext/patches/before_jan_2012/remove_previous_field_property_setter.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
def execute():
webnotes.conn.sql("""\
diff --git a/erpnext/patches/before_jan_2012/repost_account_bal.py b/erpnext/patches/before_jan_2012/repost_account_bal.py
index 34edc04..e44a49a 100644
--- a/erpnext/patches/before_jan_2012/repost_account_bal.py
+++ b/erpnext/patches/before_jan_2012/repost_account_bal.py
@@ -1,16 +1,25 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
sql = webnotes.conn.sql
from webnotes.model.code import get_obj
- # stop session
- webnotes.conn.set_global('__session_status', 'stop')
- webnotes.conn.set_global('__session_status_message', 'Patch is running in background. \nPlease wait until it completed...\n')
-
- webnotes.conn.commit()
- webnotes.conn.begin()
-
# repost
comp = sql("select name from tabCompany where docstatus!=2")
fy = sql("select name from `tabFiscal Year` order by year_start_date asc")
@@ -21,11 +30,9 @@
fy_obj.doc.past_year = prev_fy
fy_obj.doc.company = c[0]
fy_obj.doc.save()
+
+ fy_obj = get_obj('Fiscal Year', f[0])
fy_obj.repost()
prev_fy = f[0]
sql("commit")
sql("start transaction")
-
- # free session
- webnotes.conn.set_global('__session_status', '')
- webnotes.conn.set_global('__session_status_message', '')
diff --git a/erpnext/patches/before_jan_2012/repost_stock.py b/erpnext/patches/before_jan_2012/repost_stock.py
index a19494c..2c62039 100644
--- a/erpnext/patches/before_jan_2012/repost_stock.py
+++ b/erpnext/patches/before_jan_2012/repost_stock.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
sql = webnotes.conn.sql
diff --git a/erpnext/patches/before_jan_2012/sal_man_patch.py b/erpnext/patches/before_jan_2012/sal_man_patch.py
index aef6251..b8f5301 100644
--- a/erpnext/patches/before_jan_2012/sal_man_patch.py
+++ b/erpnext/patches/before_jan_2012/sal_man_patch.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
diff --git a/erpnext/patches/before_jan_2012/task_email_notification.py b/erpnext/patches/before_jan_2012/task_email_notification.py
index e6a7afa..8d1a078 100644
--- a/erpnext/patches/before_jan_2012/task_email_notification.py
+++ b/erpnext/patches/before_jan_2012/task_email_notification.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/update_0_idx.py b/erpnext/patches/before_jan_2012/update_0_idx.py
index 9c31f1d..ec38b8a 100644
--- a/erpnext/patches/before_jan_2012/update_0_idx.py
+++ b/erpnext/patches/before_jan_2012/update_0_idx.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
def execute():
doc_type_list = webnotes.conn.sql("""SELECT DISTINCT parent FROM `tabDocField` where idx=0""")
diff --git a/erpnext/patches/before_jan_2012/update_gle_against_voucher_for_jv.py b/erpnext/patches/before_jan_2012/update_gle_against_voucher_for_jv.py
index 5a03ec7..6f6f6b9 100644
--- a/erpnext/patches/before_jan_2012/update_gle_against_voucher_for_jv.py
+++ b/erpnext/patches/before_jan_2012/update_gle_against_voucher_for_jv.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.model.code import get_obj
diff --git a/erpnext/patches/jan_mar_2012/account_type_patch.py b/erpnext/patches/jan_mar_2012/account_type_patch.py
index 81552f0..2029a3a 100644
--- a/erpnext/patches/jan_mar_2012/account_type_patch.py
+++ b/erpnext/patches/jan_mar_2012/account_type_patch.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
webnotes.conn.sql("""update `tabAccount`
diff --git a/erpnext/patches/jan_mar_2012/add_roles_to_admin.py b/erpnext/patches/jan_mar_2012/add_roles_to_admin.py
new file mode 100644
index 0000000..402675a
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/add_roles_to_admin.py
@@ -0,0 +1,10 @@
+def execute():
+ """
+ Adds various roles to Administrator. This patch is for making master db
+ ready for on premise installation
+ """
+ import webnotes
+ from webnotes.model.code import get_obj
+ from webnotes.model.doc import Document
+ sc = get_obj('Setup Control', 'Setup Control')
+ sc.add_roles(Document('Profile', 'Administrator'))
diff --git a/erpnext/patches/jan_mar_2012/allocated_to_profile.py b/erpnext/patches/jan_mar_2012/allocated_to_profile.py
index ac95c2b..32c7a2c 100644
--- a/erpnext/patches/jan_mar_2012/allocated_to_profile.py
+++ b/erpnext/patches/jan_mar_2012/allocated_to_profile.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
"""
Changes allocated_to option to Profile in
diff --git a/erpnext/patches/jan_mar_2012/apps/todo_item.py b/erpnext/patches/jan_mar_2012/apps/todo_item.py
index f2239f5..6eec6fd 100644
--- a/erpnext/patches/jan_mar_2012/apps/todo_item.py
+++ b/erpnext/patches/jan_mar_2012/apps/todo_item.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
"""
* Reload ToDo Item
diff --git a/erpnext/patches/jan_mar_2012/cancel_purchase_returned.py b/erpnext/patches/jan_mar_2012/cancel_purchase_returned.py
index 8404f19..8a6aaa8 100644
--- a/erpnext/patches/jan_mar_2012/cancel_purchase_returned.py
+++ b/erpnext/patches/jan_mar_2012/cancel_purchase_returned.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
"""
Set docstatus = 2 where status = 'Purchase Returned' for serial no
diff --git a/erpnext/patches/jan_mar_2012/clear_session_cache.py b/erpnext/patches/jan_mar_2012/clear_session_cache.py
index cdcbb14..2071ae5 100644
--- a/erpnext/patches/jan_mar_2012/clear_session_cache.py
+++ b/erpnext/patches/jan_mar_2012/clear_session_cache.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
webnotes.conn.sql("""
diff --git a/erpnext/patches/jan_mar_2012/convert_tables_to_utf8.py b/erpnext/patches/jan_mar_2012/convert_tables_to_utf8.py
index 1ae94a7..dad5da4 100644
--- a/erpnext/patches/jan_mar_2012/convert_tables_to_utf8.py
+++ b/erpnext/patches/jan_mar_2012/convert_tables_to_utf8.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
def execute():
diff --git a/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py b/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py
index b55acd4..4671143 100644
--- a/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py
+++ b/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
def execute():
@@ -31,7 +47,7 @@
GROUP BY sales_partner HAVING SUM(IFNULL(is_primary_contact, 0))=0
)
""", as_list=1)
- names = ", ".join(['"' + str(r[0]) + '"' for r in res if r])
+ names = ", ".join(['"' + unicode(r[0]) + '"' for r in res if r])
if names: webnotes.conn.sql("UPDATE `tabContact` SET is_primary_contact=1 WHERE name IN (%s)" % names)
def patch_primary_address():
@@ -54,5 +70,5 @@
AND SUM(IFNULL(is_shipping_address, 0))=0
)
""", as_list=1)
- names = ", ".join(['"' + str(r[0]) + '"' for r in res if r])
+ names = ", ".join(['"' + unicode(r[0]) + '"' for r in res if r])
if names: webnotes.conn.sql("UPDATE `tabAddress` SET is_primary_address=1 WHERE name IN (%s)" % names)
diff --git a/erpnext/patches/jan_mar_2012/delete_pur_of_service.py b/erpnext/patches/jan_mar_2012/delete_pur_of_service.py
index eecece6..da31300 100644
--- a/erpnext/patches/jan_mar_2012/delete_pur_of_service.py
+++ b/erpnext/patches/jan_mar_2012/delete_pur_of_service.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.model import delete_doc
diff --git a/erpnext/patches/jan_mar_2012/deploy_packing_slip.py b/erpnext/patches/jan_mar_2012/deploy_packing_slip.py
index 94bda6e..7a28ef8 100644
--- a/erpnext/patches/jan_mar_2012/deploy_packing_slip.py
+++ b/erpnext/patches/jan_mar_2012/deploy_packing_slip.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py b/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py
index eae0d21..a6f7a7c 100644
--- a/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py
+++ b/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
def execute():
"""
diff --git a/erpnext/patches/jan_mar_2012/email_settings_reload.py b/erpnext/patches/jan_mar_2012/email_settings_reload.py
index bfe3efe..ec6f05d 100644
--- a/erpnext/patches/jan_mar_2012/email_settings_reload.py
+++ b/erpnext/patches/jan_mar_2012/email_settings_reload.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
"""
* Change type of mail_port field to int
diff --git a/erpnext/patches/jan_mar_2012/fix_packing_slip.py b/erpnext/patches/jan_mar_2012/fix_packing_slip.py
index 98eb825..fb3a4da 100644
--- a/erpnext/patches/jan_mar_2012/fix_packing_slip.py
+++ b/erpnext/patches/jan_mar_2012/fix_packing_slip.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
"""
* Change DN to PS mapper
diff --git a/erpnext/patches/jan_mar_2012/jan_production_patches.py b/erpnext/patches/jan_mar_2012/jan_production_patches.py
index 8795cc3..d57fb9e 100644
--- a/erpnext/patches/jan_mar_2012/jan_production_patches.py
+++ b/erpnext/patches/jan_mar_2012/jan_production_patches.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
def execute():
"""
diff --git a/erpnext/patches/jan_mar_2012/label_cleanup.py b/erpnext/patches/jan_mar_2012/label_cleanup.py
new file mode 100644
index 0000000..93536fa
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/label_cleanup.py
@@ -0,0 +1,47 @@
+def execute():
+ import webnotes
+ from webnotes.model import delete_doc
+ from webnotes.modules.module_manager import reload_doc
+
+ dt = {
+ 'selling': ['quotation', 'sales_order', 'quotation_detail', 'sales_order_detail'],
+ 'stock': ['delivery_note', 'delivery_note_detail', 'purchase_receipt', 'purchase_receipt_detail'],
+ 'accounts': ['receivable_voucher', 'payable_voucher', 'rv_detail', 'pv_detail', 'rv_tax_detail', 'purchase_tax_detail'],
+ 'buying': ['purchase_order', 'po_detail']
+ }
+ for m in dt:
+ for d in dt[m]:
+ reload_doc(m, 'doctype', d)
+
+
+ webnotes.conn.sql("""delete from `tabDocField`
+ where label in ('Note1', 'OT Notes', 'Note', 'Note HTML', 'Rates HTML')
+ and parent in ('Quotation', 'Sales Order', 'Delivery Note', 'Receivable Voucher', 'Purchase Order')""")
+
+
+ del_flds = {
+ 'Sales Order Detail': "'delivery_date', 'confirmation_date'",
+ 'Delivery Note': "'supplier', 'supplier_address', 'purchase_receipt_no', 'purchase_order_no', 'transaction_date'",
+ 'Receivable Voucher': "'voucher_date'",
+ 'Payable Voucher': "'voucher_date'",
+ 'Purchase Receipt': "'transaction_date'"
+ }
+
+ del_labels = {
+ 'Delivery Note': "'Supplier Details'",
+ 'Purchase Receipt': "'Get Currrent Stock'"
+ }
+
+ for d in del_flds:
+ webnotes.conn.sql("delete from `tabDocField` where fieldname in (%s) and parent = %s", (del_flds[d], d))
+
+ for d in del_labels:
+ webnotes.conn.sql("delete from `tabDocField` where label in (%s) and parent = %s", (del_labels[d], d))
+
+ delete_doc('DocType', 'Update Delivery Date Detail')
+
+ # Reload print formats
+ reload_doc('accounts', 'Print Format', 'Sales Invoice Classic')
+ reload_doc('accounts', 'Print Format', 'Sales Invoice Modern')
+ reload_doc('accounts', 'Print Format', 'Sales Invoice Spartan')
+
diff --git a/erpnext/patches/jan_mar_2012/map_conversion_rate.py b/erpnext/patches/jan_mar_2012/map_conversion_rate.py
index 1a00bde..0b947b3 100644
--- a/erpnext/patches/jan_mar_2012/map_conversion_rate.py
+++ b/erpnext/patches/jan_mar_2012/map_conversion_rate.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.model.code import get_obj
from webnotes.model.doc import addchild
diff --git a/erpnext/patches/jan_mar_2012/navupdate.py b/erpnext/patches/jan_mar_2012/navupdate.py
new file mode 100644
index 0000000..1cfa879
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/navupdate.py
@@ -0,0 +1,59 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import webnotes
+import _mysql_exceptions
+
+def execute():
+ from webnotes.modules import reload_doc
+ reload_doc('accounts', 'page', 'accounts_home')
+ reload_doc('selling', 'page', 'selling_home')
+ reload_doc('buying', 'page', 'buying_home')
+ reload_doc('stock', 'page', 'stock_home')
+ reload_doc('hr', 'page', 'hr_home')
+ reload_doc('support', 'page', 'support_home')
+ reload_doc('production', 'page', 'production_home')
+ reload_doc('projects', 'page', 'projects_home')
+ reload_doc('website', 'page', 'website_home')
+ reload_doc('home', 'page', 'desktop')
+ reload_doc('utilities', 'page', 'todo')
+ reload_doc('utilities', 'page', 'calendar')
+ reload_doc('utilities', 'page', 'messages')
+ reload_doc('setup', 'page', 'modules_setup')
+ reload_doc('utilities', 'page', 'users')
+ reload_doc('home', 'page', 'activity')
+ reload_doc('home', 'page', 'attributions')
+ reload_doc('core', 'doctype', 'profile')
+
+ # update user_image in profile
+ for p in webnotes.conn.sql("""select name, file_list from tabProfile
+ where ifnull(file_list,'')!=''"""):
+ fid = p[1].split('\n')[0].split(',')[1]
+ webnotes.conn.set_value('Profile', p[0], 'user_image', fid)
+
+ webnotes.conn.set_value('Control Panel', 'Control Panel', 'home_page',
+ 'desktop')
+
+ webnotes.conn.commit()
+
+ try:
+ webnotes.conn.sql("""create table __SchedulerLog (
+ `timestamp` timestamp,
+ method varchar(200),
+ error text
+ ) engine=MyISAM""")
+ except _mysql_exceptions.OperationalError, e:
+ pass
diff --git a/erpnext/patches/jan_mar_2012/no_copy_patch.py b/erpnext/patches/jan_mar_2012/no_copy_patch.py
index 5e97ae3..fb12824 100644
--- a/erpnext/patches/jan_mar_2012/no_copy_patch.py
+++ b/erpnext/patches/jan_mar_2012/no_copy_patch.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
webnotes.conn.sql("update `tabDocField` set no_copy = 1 where fieldname = 'insert_after' and parent = 'Custom Field'")
diff --git a/erpnext/patches/jan_mar_2012/pending_patches.py b/erpnext/patches/jan_mar_2012/pending_patches.py
index 970af74..351200f 100644
--- a/erpnext/patches/jan_mar_2012/pending_patches.py
+++ b/erpnext/patches/jan_mar_2012/pending_patches.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.model.code import get_obj
diff --git a/erpnext/patches/jan_mar_2012/pos_setting_patch.py b/erpnext/patches/jan_mar_2012/pos_setting_patch.py
index c202ab7..c974b35 100644
--- a/erpnext/patches/jan_mar_2012/pos_setting_patch.py
+++ b/erpnext/patches/jan_mar_2012/pos_setting_patch.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
webnotes.conn.sql("update `tabDocField` set `default` = 1 where fieldname = 'conversion_rate' and parent = 'POS Setting'")
diff --git a/erpnext/patches/jan_mar_2012/print_hide_totals.py b/erpnext/patches/jan_mar_2012/print_hide_totals.py
index 5d1854d..4299cb4 100644
--- a/erpnext/patches/jan_mar_2012/print_hide_totals.py
+++ b/erpnext/patches/jan_mar_2012/print_hide_totals.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
def execute():
diff --git a/erpnext/patches/jan_mar_2012/production_cleanup.py b/erpnext/patches/jan_mar_2012/production_cleanup.py
index f50278f..d0a5879 100644
--- a/erpnext/patches/jan_mar_2012/production_cleanup.py
+++ b/erpnext/patches/jan_mar_2012/production_cleanup.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/reload_doctype.py b/erpnext/patches/jan_mar_2012/reload_doctype.py
index a63039a..51241b8 100644
--- a/erpnext/patches/jan_mar_2012/reload_doctype.py
+++ b/erpnext/patches/jan_mar_2012/reload_doctype.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/reload_item.py b/erpnext/patches/jan_mar_2012/reload_item.py
index 158b67d..c45b818 100644
--- a/erpnext/patches/jan_mar_2012/reload_item.py
+++ b/erpnext/patches/jan_mar_2012/reload_item.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/reload_po_pr_mapper.py b/erpnext/patches/jan_mar_2012/reload_po_pr_mapper.py
index c97f20c..4ed252b 100644
--- a/erpnext/patches/jan_mar_2012/reload_po_pr_mapper.py
+++ b/erpnext/patches/jan_mar_2012/reload_po_pr_mapper.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/remove_archive.py b/erpnext/patches/jan_mar_2012/remove_archive.py
index 1b914d5..5f5cea6 100644
--- a/erpnext/patches/jan_mar_2012/remove_archive.py
+++ b/erpnext/patches/jan_mar_2012/remove_archive.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# TODO take backup before running this patch
def execute():
"""
diff --git a/erpnext/patches/jan_mar_2012/remove_get_tds_button.py b/erpnext/patches/jan_mar_2012/remove_get_tds_button.py
index 268c9ef..fe804c0 100644
--- a/erpnext/patches/jan_mar_2012/remove_get_tds_button.py
+++ b/erpnext/patches/jan_mar_2012/remove_get_tds_button.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
"""
Remove One Get TDS button, which is appearing twice in JV
diff --git a/erpnext/patches/jan_mar_2012/rename_doctype_indent.py b/erpnext/patches/jan_mar_2012/rename_doctype_indent.py
index 511424f..01aeebf 100644
--- a/erpnext/patches/jan_mar_2012/rename_doctype_indent.py
+++ b/erpnext/patches/jan_mar_2012/rename_doctype_indent.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
def execute():
"""
diff --git a/erpnext/patches/jan_mar_2012/serial_no_add_opt.py b/erpnext/patches/jan_mar_2012/serial_no_add_opt.py
index 92011b0..947c28d 100644
--- a/erpnext/patches/jan_mar_2012/serial_no_add_opt.py
+++ b/erpnext/patches/jan_mar_2012/serial_no_add_opt.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
opts = webnotes.conn.sql("""\
diff --git a/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py b/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py
index bd86411..e4078aa 100644
--- a/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py
+++ b/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/subcon_default_val.py b/erpnext/patches/jan_mar_2012/subcon_default_val.py
index c0bee4c..8164b0a 100644
--- a/erpnext/patches/jan_mar_2012/subcon_default_val.py
+++ b/erpnext/patches/jan_mar_2012/subcon_default_val.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
webnotes.conn.sql("""
diff --git a/erpnext/patches/jan_mar_2012/website/all.py b/erpnext/patches/jan_mar_2012/website/all.py
index 1443f36..47be62a 100644
--- a/erpnext/patches/jan_mar_2012/website/all.py
+++ b/erpnext/patches/jan_mar_2012/website/all.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import patches.jan_mar_2012.website.login
import patches.jan_mar_2012.website.feed
import patches.jan_mar_2012.website.website
diff --git a/erpnext/patches/jan_mar_2012/website/allow_product_delete.py b/erpnext/patches/jan_mar_2012/website/allow_product_delete.py
index fbef48f..effec2e 100644
--- a/erpnext/patches/jan_mar_2012/website/allow_product_delete.py
+++ b/erpnext/patches/jan_mar_2012/website/allow_product_delete.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
"""
Allow deletion of products
diff --git a/erpnext/patches/jan_mar_2012/website/analytics.py b/erpnext/patches/jan_mar_2012/website/analytics.py
index 68ccfcf..b8afb59 100644
--- a/erpnext/patches/jan_mar_2012/website/analytics.py
+++ b/erpnext/patches/jan_mar_2012/website/analytics.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
from webnotes.modules import reload_doc
reload_doc('website', 'doctype', 'website_settings')
diff --git a/erpnext/patches/jan_mar_2012/website/cleanups.py b/erpnext/patches/jan_mar_2012/website/cleanups.py
index b7b7736..16297d2 100644
--- a/erpnext/patches/jan_mar_2012/website/cleanups.py
+++ b/erpnext/patches/jan_mar_2012/website/cleanups.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
def execute():
diff --git a/erpnext/patches/jan_mar_2012/website/domain_list.py b/erpnext/patches/jan_mar_2012/website/domain_list.py
index fabbdce..25f50e2 100644
--- a/erpnext/patches/jan_mar_2012/website/domain_list.py
+++ b/erpnext/patches/jan_mar_2012/website/domain_list.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
def execute():
import webnotes
from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/website/feed.py b/erpnext/patches/jan_mar_2012/website/feed.py
index c913c49..4af0140 100644
--- a/erpnext/patches/jan_mar_2012/website/feed.py
+++ b/erpnext/patches/jan_mar_2012/website/feed.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.model.doc import Document
from webnotes.modules import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/website/file_data_rename.py b/erpnext/patches/jan_mar_2012/website/file_data_rename.py
index 2cd5e68..dc4110b 100644
--- a/erpnext/patches/jan_mar_2012/website/file_data_rename.py
+++ b/erpnext/patches/jan_mar_2012/website/file_data_rename.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
def execute():
@@ -53,3 +69,12 @@
if file_list and "/" in file_list:
webnotes.conn.sql("UPDATE `%s` SET file_list='%s' WHERE name='%s'" \
% (tab, file_list.replace('/', '-'), name))
+
+ singles = webnotes.conn.sql("""SELECT doctype, value FROM `tabSingles`
+ WHERE field='file_list'""")
+ for doctype, file_list in singles:
+ if file_list and "/" in file_list:
+ webnotes.conn.sql("""UPDATE `tabSingles` SET value='%s'
+ WHERE doctype='%s' AND field='file_list'"""
+ % (file_list.replace('/', '-'), doctype))
+
diff --git a/erpnext/patches/jan_mar_2012/website/getfile_rename.py b/erpnext/patches/jan_mar_2012/website/getfile_rename.py
index 15aa815..769ac37 100644
--- a/erpnext/patches/jan_mar_2012/website/getfile_rename.py
+++ b/erpnext/patches/jan_mar_2012/website/getfile_rename.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
def execute():
diff --git a/erpnext/patches/jan_mar_2012/website/login.py b/erpnext/patches/jan_mar_2012/website/login.py
index 97cd323..babd550 100644
--- a/erpnext/patches/jan_mar_2012/website/login.py
+++ b/erpnext/patches/jan_mar_2012/website/login.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.model.doc import Document
from webnotes.modules import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/website/website.py b/erpnext/patches/jan_mar_2012/website/website.py
index 320c31e..c6403e5 100644
--- a/erpnext/patches/jan_mar_2012/website/website.py
+++ b/erpnext/patches/jan_mar_2012/website/website.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# website patch
import webnotes
diff --git a/erpnext/patches/old_patches/customer_address.py b/erpnext/patches/old_patches/customer_address.py
index 41c97b8..44568ce 100644
--- a/erpnext/patches/old_patches/customer_address.py
+++ b/erpnext/patches/old_patches/customer_address.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.model.doc import Document
diff --git a/erpnext/patches/old_patches/doctype_permission_patch.py b/erpnext/patches/old_patches/doctype_permission_patch.py
index 2bb7cf1..0953864 100644
--- a/erpnext/patches/old_patches/doctype_permission_patch.py
+++ b/erpnext/patches/old_patches/doctype_permission_patch.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
def set_doctype_permissions():
diff --git a/erpnext/patches/old_patches/feed_patch.py b/erpnext/patches/old_patches/feed_patch.py
index 9d8ab0b..1edac88 100644
--- a/erpnext/patches/old_patches/feed_patch.py
+++ b/erpnext/patches/old_patches/feed_patch.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# long patches
import webnotes
diff --git a/erpnext/patches/old_patches/patch_1.py b/erpnext/patches/old_patches/patch_1.py
index 9173ca5..4176bf5 100644
--- a/erpnext/patches/old_patches/patch_1.py
+++ b/erpnext/patches/old_patches/patch_1.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
"""
Old patches for reference
"""
diff --git a/erpnext/patches/old_patches/rename_search_criteria.py b/erpnext/patches/old_patches/rename_search_criteria.py
index e7cf1d9..0cd23ed 100644
--- a/erpnext/patches/old_patches/rename_search_criteria.py
+++ b/erpnext/patches/old_patches/rename_search_criteria.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.model.code import get_obj
def execute():
diff --git a/erpnext/patches/old_patches/replacecode.py b/erpnext/patches/old_patches/replacecode.py
index ff9e10d..0043f9c 100644
--- a/erpnext/patches/old_patches/replacecode.py
+++ b/erpnext/patches/old_patches/replacecode.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import os
def replace_code(old, new):
diff --git a/erpnext/patches/patch.py b/erpnext/patches/patch.py
index 2563915..744b102 100644
--- a/erpnext/patches/patch.py
+++ b/erpnext/patches/patch.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# REMEMBER to update this
# ========================
diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py
index e83d2a6..021cf00 100644
--- a/erpnext/patches/patch_list.py
+++ b/erpnext/patches/patch_list.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
patch_list = [
{
'patch_module': 'patches.jan_mar_2012',
@@ -105,4 +121,50 @@
'patch_file': 'fix_packing_slip',
'description': 'Update Mapper Delivery Note-Packing Slip'
},
+ {
+ 'patch_module': 'patches.jan_mar_2012.apps',
+ 'patch_file': 'todo_item',
+ 'description': 'Reloads todo item'
+ },
+ {
+ 'patch_module': 'patches.jan_mar_2012',
+ 'patch_file': 'convert_tables_to_utf8',
+ 'description': 'Convert tables to UTF-8'
+ },
+ {
+ 'patch_module': 'patches.jan_mar_2012',
+ 'patch_file': 'pending_patches',
+ },
+ {
+ 'patch_module': 'patches.jan_mar_2012',
+ 'patch_file': 'pos_setting_patch',
+ },
+ {
+ 'patch_module': 'patches.jan_mar_2012',
+ 'patch_file': 'reload_doctype',
+ },
+ {
+ 'patch_module': 'patches.jan_mar_2012',
+ 'patch_file': 'reload_po_pr_mapper',
+ },
+ {
+ 'patch_module': 'patches.jan_mar_2012',
+ 'patch_file': 'delete_pur_of_service',
+ 'description': 'Deletes purpose of service'
+ },
+ {
+ 'patch_module': 'patches.jan_mar_2012',
+ 'patch_file': 'navupdate',
+ 'description': 'New Navigation Pages'
+ },
+ {
+ 'patch_module': 'patches.jan_mar_2012',
+ 'patch_file': 'label_cleanup',
+ 'description': 'Remove extra fields and new dynamic labels'
+ },
+ {
+ 'patch_module': 'patches.jan_mar_2012',
+ 'patch_file': 'add_roles_to_admin',
+ 'description': 'Add Roles to Administrator'
+ },
]
diff --git a/erpnext/patches/print_formats/SalesInvoiceClassic.html b/erpnext/patches/print_formats/SalesInvoiceClassic.html
index 78cb815..d40f801 100644
--- a/erpnext/patches/print_formats/SalesInvoiceClassic.html
+++ b/erpnext/patches/print_formats/SalesInvoiceClassic.html
@@ -200,7 +200,7 @@
<td><table width=100% cellspacing=0><tbody>
<tr>
<td width=40%><b>Invoice Date</b></td>
- <td><script>date.str_to_user(doc.voucher_date)</script></td>
+ <td><script>date.str_to_user(doc.posting_date)</script></td>
<tr>
<tr>
<td><b>Due Date</b></td>
diff --git a/erpnext/patches/print_formats/SalesInvoiceModern.html b/erpnext/patches/print_formats/SalesInvoiceModern.html
index cef84ac..ac66423 100644
--- a/erpnext/patches/print_formats/SalesInvoiceModern.html
+++ b/erpnext/patches/print_formats/SalesInvoiceModern.html
@@ -227,7 +227,7 @@
</tr>
<tr>
<td width=40%><b>Invoice Date</b></td>
- <td><script>date.str_to_user(doc.voucher_date)</script></td>
+ <td><script>date.str_to_user(doc.posting_date)</script></td>
<tr>
<tr>
<td><b>Due Date</b></td>
diff --git a/erpnext/patches/print_formats/SalesInvoiceSpartan.html b/erpnext/patches/print_formats/SalesInvoiceSpartan.html
index 7d13674..81e1c38 100644
--- a/erpnext/patches/print_formats/SalesInvoiceSpartan.html
+++ b/erpnext/patches/print_formats/SalesInvoiceSpartan.html
@@ -222,7 +222,7 @@
<td><table width=100% cellspacing=0><tbody>
<tr>
<td width=40%><b>Invoice Date</b></td>
- <td><script>date.str_to_user(doc.voucher_date)</script></td>
+ <td><script>date.str_to_user(doc.posting_date)</script></td>
<tr>
<tr>
<td><b>Due Date</b></td>
diff --git a/erpnext/production/doctype/bill_of_materials/bill_of_materials.js b/erpnext/production/doctype/bill_of_materials/bill_of_materials.js
index 1342140..ae61147 100644
--- a/erpnext/production/doctype/bill_of_materials/bill_of_materials.js
+++ b/erpnext/production/doctype/bill_of_materials/bill_of_materials.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// On REFRESH
cur_frm.cscript.refresh = function(doc,dt,dn){
if(!doc.__islocal) {
diff --git a/erpnext/production/doctype/bill_of_materials/bill_of_materials.py b/erpnext/production/doctype/bill_of_materials/bill_of_materials.py
index decb9fe..3f0bb9e 100644
--- a/erpnext/production/doctype/bill_of_materials/bill_of_materials.py
+++ b/erpnext/production/doctype/bill_of_materials/bill_of_materials.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import cint, cstr, flt, get_defaults, getdate, now, nowdate
from webnotes.model.doc import Document, addchild, getchildren, make_autoname
diff --git a/erpnext/production/doctype/bom_control/bom_control.py b/erpnext/production/doctype/bom_control/bom_control.py
index a880d72..d8a9e59 100644
--- a/erpnext/production/doctype/bom_control/bom_control.py
+++ b/erpnext/production/doctype/bom_control/bom_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.js b/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.js
index f01fdfd..41cb17c 100644
--- a/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.js
+++ b/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// Get Query functions
cur_frm.fields_dict['s_bom'].get_query = function(doc) {
diff --git a/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.py b/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.py
index 9b64b77..c7ab0d3 100644
--- a/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.py
+++ b/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/production/doctype/production_control/production_control.py b/erpnext/production/doctype/production_control/production_control.py
index f3e1492..c051d1e 100644
--- a/erpnext/production/doctype/production_control/production_control.py
+++ b/erpnext/production/doctype/production_control/production_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/production/doctype/production_order/production_order.js b/erpnext/production/doctype/production_order/production_order.js
index 9ff72ef..227f3ca 100644
--- a/erpnext/production/doctype/production_order/production_order.js
+++ b/erpnext/production/doctype/production_order/production_order.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc, dt, dn) {
if (!doc.posting_date) doc.transaction_date = dateutil.obj_to_str(new Date());
diff --git a/erpnext/production/doctype/production_order/production_order.py b/erpnext/production/doctype/production_order/production_order.py
index ff9de8f..ded32ff 100644
--- a/erpnext/production/doctype/production_order/production_order.py
+++ b/erpnext/production/doctype/production_order/production_order.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/production/doctype/production_planning_tool/production_planning_tool.js b/erpnext/production/doctype/production_planning_tool/production_planning_tool.js
index 6083dcb..e52c853 100644
--- a/erpnext/production/doctype/production_planning_tool/production_planning_tool.js
+++ b/erpnext/production/doctype/production_planning_tool/production_planning_tool.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.item_code = function(doc,cdt,cdn) {
var d = locals[cdt][cdn];
if (d.item_code) {
diff --git a/erpnext/production/doctype/production_planning_tool/production_planning_tool.py b/erpnext/production/doctype/production_planning_tool/production_planning_tool.py
index c2a609d..4e4832f 100644
--- a/erpnext/production/doctype/production_planning_tool/production_planning_tool.py
+++ b/erpnext/production/doctype/production_planning_tool/production_planning_tool.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import cint, cstr, flt, getdate, now, nowdate
from webnotes.model.doc import addchild
diff --git a/erpnext/production/doctype/update_delivery_date/update_delivery_date.js b/erpnext/production/doctype/update_delivery_date/update_delivery_date.js
index 372d6da..394f76c 100644
--- a/erpnext/production/doctype/update_delivery_date/update_delivery_date.js
+++ b/erpnext/production/doctype/update_delivery_date/update_delivery_date.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//get query select Territory
//=======================================================================================================================
cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
diff --git a/erpnext/production/doctype/update_delivery_date/update_delivery_date.py b/erpnext/production/doctype/update_delivery_date/update_delivery_date.py
index 7cfe588..c7c2e48 100644
--- a/erpnext/production/doctype/update_delivery_date/update_delivery_date.py
+++ b/erpnext/production/doctype/update_delivery_date/update_delivery_date.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/production/doctype/workstation/workstation.js b/erpnext/production/doctype/workstation/workstation.js
index 6ffef4a..3cad944 100644
--- a/erpnext/production/doctype/workstation/workstation.js
+++ b/erpnext/production/doctype/workstation/workstation.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/production/doctype/workstation/workstation.py b/erpnext/production/doctype/workstation/workstation.py
index 45851de..d92f6ac 100644
--- a/erpnext/production/doctype/workstation/workstation.py
+++ b/erpnext/production/doctype/workstation/workstation.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/production/page/bill_of_materials/bill_of_materials.js b/erpnext/production/page/bill_of_materials/bill_of_materials.js
index c40fa11..aba5666 100644
--- a/erpnext/production/page/bill_of_materials/bill_of_materials.js
+++ b/erpnext/production/page/bill_of_materials/bill_of_materials.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript['onload_Bill of Materials'] = function() {
wn.require('lib/js/legacy/widgets/tree.js');
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/production/page/production_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/production/page/production_home/__init__.py
diff --git a/erpnext/production/page/production_home/production_home.html b/erpnext/production/page/production_home/production_home.html
new file mode 100644
index 0000000..13e2468
--- /dev/null
+++ b/erpnext/production/page/production_home/production_home.html
@@ -0,0 +1,58 @@
+<div class="layout-wrapper layout-wrapper-background">
+ <div class="layout-main-section">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Production</h1>
+ <hr>
+ <div style="width: 48%; float: left;">
+ <h4><a href="#!List/Production Order">Production Order</a></h4>
+ <p class="help">Orders for manufacturing</p>
+ <h4><a href="#!Form/Production Planning Tool/Production Planning Tool">Production Plan</a></h4>
+ <p class="help">Generate Purchase Requisition (MRP) and Production Orders</p>
+ </div>
+ <div style="width: 48%; float: right;">
+ <h4><a href="#!List/Bill Of Materials">Bill of Materials</a></h4>
+ <p class="help">Bill of Materials (BOM) Master</p>
+ <h4><a href="#!List/Item">Item</a></h4>
+ <p class="help">Item Master</p>
+ </div>
+ <div style="clear: both"></div>
+ <hr>
+ <h3>Reports</h3>
+ <div class="reports-list"></div>
+ </div>
+ <div class="layout-side-section">
+ <div class="psidebar">
+ <div class="section">
+ <div class="section-head">Setup</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "Workstation master"
+ href="#!List/Workstation">Workstations</a>
+ </div>
+ </div>
+ </div>
+ <div class="section">
+ <div class="section-head">Tools</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "browse bill of materials in a tree"
+ href="#!Bill of Materials">BOM Browser</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Replace item/sub-assembly from a sub-assembly from all BOMs"
+ href="#!Form/BOM Replace Utility/BOM Replace Utility">BOM Replace Item</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Update delivery dates in all Sales Orders"
+ href="#!Form/Update Delivery Date/Update Delivery Date">Update Delivery Dates</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/production/page/production_home/production_home.js b/erpnext/production/page/production_home/production_home.js
new file mode 100644
index 0000000..5367815
--- /dev/null
+++ b/erpnext/production/page/production_home/production_home.js
@@ -0,0 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+pscript['onload_production-home'] = function(wrapper) {
+ erpnext.module_page.setup_page('Production', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/production/page/production_home/production_home.txt b/erpnext/production/page/production_home/production_home.txt
new file mode 100644
index 0000000..4f6cabb
--- /dev/null
+++ b/erpnext/production/page/production_home/production_home.txt
@@ -0,0 +1,28 @@
+# Page, production-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-21 13:24:34',
+ 'docstatus': 0,
+ 'modified': '2012-02-21 13:24:34',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Production',
+ 'name': '__common__',
+ 'page_name': u'production-home',
+ 'standard': u'Yes',
+ 'title': u'Production Home'
+ },
+
+ # Page, production-home
+ {
+ 'doctype': 'Page',
+ 'name': u'production-home'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/production/search_criteria/delivery_plan/delivery_plan.js b/erpnext/production/search_criteria/delivery_plan/delivery_plan.js
index 970dd51..63d0da8 100644
--- a/erpnext/production/search_criteria/delivery_plan/delivery_plan.js
+++ b/erpnext/production/search_criteria/delivery_plan/delivery_plan.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
//to hide all filters
diff --git a/erpnext/production/search_criteria/itemwise_production_report/itemwise_production_report.js b/erpnext/production/search_criteria/itemwise_production_report/itemwise_production_report.js
index 10ec7fb..4998fad 100644
--- a/erpnext/production/search_criteria/itemwise_production_report/itemwise_production_report.js
+++ b/erpnext/production/search_criteria/itemwise_production_report/itemwise_production_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
//to hide all filters
diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js
index b286cd7..801ba56 100644
--- a/erpnext/projects/doctype/project/project.js
+++ b/erpnext/projects/doctype/project/project.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//-------------------------- Onload ---------------------------
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py
index 4504191..2e3e3e6 100644
--- a/erpnext/projects/doctype/project/project.py
+++ b/erpnext/projects/doctype/project/project.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/projects/doctype/project_activity/project_activity.js b/erpnext/projects/doctype/project_activity/project_activity.js
index bc256a1..ed2b1df 100644
--- a/erpnext/projects/doctype/project_activity/project_activity.js
+++ b/erpnext/projects/doctype/project_activity/project_activity.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc, dt, dn) {
// created?
if(cur_frm.mylist) {
diff --git a/erpnext/projects/doctype/project_activity/project_activity.py b/erpnext/projects/doctype/project_activity/project_activity.py
index af94ec8..d90dfa9 100644
--- a/erpnext/projects/doctype/project_activity/project_activity.py
+++ b/erpnext/projects/doctype/project_activity/project_activity.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/projects/doctype/project_control/project_control.py b/erpnext/projects/doctype/project_control/project_control.py
index ed192d2..a1fdf11 100644
--- a/erpnext/projects/doctype/project_control/project_control.py
+++ b/erpnext/projects/doctype/project_control/project_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/projects/doctype/ticket/ticket.js b/erpnext/projects/doctype/ticket/ticket.js
index 323643b..322b8a1 100644
--- a/erpnext/projects/doctype/ticket/ticket.js
+++ b/erpnext/projects/doctype/ticket/ticket.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc,cdt,cdn){
if(!doc.senders_name) {
doc.senders_name = user_fullname;
diff --git a/erpnext/projects/doctype/ticket/ticket.py b/erpnext/projects/doctype/ticket/ticket.py
index 24c9750..51a9875 100644
--- a/erpnext/projects/doctype/ticket/ticket.py
+++ b/erpnext/projects/doctype/ticket/ticket.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/projects/doctype/timesheet/timesheet.js b/erpnext/projects/doctype/timesheet/timesheet.js
index 4140698..a49b5a1 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.js
+++ b/erpnext/projects/doctype/timesheet/timesheet.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// ======================= OnLoad =============================================
cur_frm.cscript.onload = function(doc,cdt,cdn){
diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py
index f07975c..ec58a46 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.py
+++ b/erpnext/projects/doctype/timesheet/timesheet.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/projects/page/projects/projects.js b/erpnext/projects/page/projects/projects.js
index 5f4c52d..3778a34 100644
--- a/erpnext/projects/page/projects/projects.js
+++ b/erpnext/projects/page/projects/projects.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript.queries_bg_dict = {
'Urgent':'RED',
'High':'ORANGE',
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/projects/page/projects_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/projects/page/projects_home/__init__.py
diff --git a/erpnext/projects/page/projects_home/projects_home.html b/erpnext/projects/page/projects_home/projects_home.html
new file mode 100644
index 0000000..37da61f
--- /dev/null
+++ b/erpnext/projects/page/projects_home/projects_home.html
@@ -0,0 +1,38 @@
+<div class="layout-wrapper layout-wrapper-background">
+ <div class="layout-main-section">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Projects</h1>
+ <hr>
+ <div style="width: 48%; float: left;">
+ <h4><a href="#!List/Project">Project</a></h4>
+ <p class="help">Project master</p>
+ <h4><a href="#!List/Task">Task</a></h4>
+ <p class="help">Project activity / task</p>
+ <h4><a href="#!List/Task">Timesheet</a></h4>
+ <p class="help">Timesheet for tasks</p>
+ </div>
+ <div style="width: 48%; float: right;">
+ <h4><a href="#!Projects">Gantt Chart</a></h4>
+ <p class="help">Gantt chart of all tasks</p>
+ </div>
+ <div style="clear: both"></div>
+ <hr>
+ <h3>Reports</h3>
+ <div class="reports-list"></div>
+ </div>
+ <div class="layout-side-section">
+ <div class="psidebar">
+ <div class="section">
+ <div class="section-head">Setup</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "Types of activities for Time Sheets"
+ href="#!List/Activity Type">Activity Type</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/projects/page/projects_home/projects_home.js b/erpnext/projects/page/projects_home/projects_home.js
new file mode 100644
index 0000000..73d6e33
--- /dev/null
+++ b/erpnext/projects/page/projects_home/projects_home.js
@@ -0,0 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+pscript['onload_projects-home'] = function(wrapper) {
+ erpnext.module_page.setup_page('Projects', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/projects/page/projects_home/projects_home.txt b/erpnext/projects/page/projects_home/projects_home.txt
new file mode 100644
index 0000000..665ac99
--- /dev/null
+++ b/erpnext/projects/page/projects_home/projects_home.txt
@@ -0,0 +1,28 @@
+# Page, projects-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-21 13:24:22',
+ 'docstatus': 0,
+ 'modified': '2012-02-21 13:24:22',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Projects',
+ 'name': '__common__',
+ 'page_name': u'projects-home',
+ 'standard': u'Yes',
+ 'title': u'Projects Home'
+ },
+
+ # Page, projects-home
+ {
+ 'doctype': 'Page',
+ 'name': u'projects-home'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/projects/search_criteria/dispatch_report/dispatch_report.js b/erpnext/projects/search_criteria/dispatch_report/dispatch_report.js
index f2ffe9f..a31d6e4 100644
--- a/erpnext/projects/search_criteria/dispatch_report/dispatch_report.js
+++ b/erpnext/projects/search_criteria/dispatch_report/dispatch_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.mytabs.items['Select Columns'].hide()
//this.mytabs.items['More Filters'].hide()
diff --git a/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.js b/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.js
index 594c5c0..77ce624 100644
--- a/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.js
+++ b/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.js b/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.js
index f518e4b..e04a7c6 100644
--- a/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.js
+++ b/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.js b/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.js
index 19ffe09..0401c28 100644
--- a/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.js
+++ b/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
//hide all filters
//------------------------------------------------
diff --git a/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.py b/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.py
index 60a09d1..2147699 100644
--- a/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.py
+++ b/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
based_on = filter_values.get('based_on')
# make default columns
#for r in res:
diff --git a/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.js b/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.js
index 0d3a598..83951b5 100644
--- a/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.js
+++ b/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
//hide all filters
//------------------------------------------------
diff --git a/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.py b/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.py
index 0999ac4..15a20a7 100644
--- a/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.py
+++ b/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
based_on = filter_values.get('based_on')
cols=[]
diff --git a/erpnext/projects/search_criteria/timesheet_report/timesheet_report.js b/erpnext/projects/search_criteria/timesheet_report/timesheet_report.js
index 1cfe178..12d9680 100644
--- a/erpnext/projects/search_criteria/timesheet_report/timesheet_report.js
+++ b/erpnext/projects/search_criteria/timesheet_report/timesheet_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Timesheet Detail'+FILTER_SEP +'Project Name'].df.in_first_page = 1;
this.filter_fields_dict['Timesheet Detail'+FILTER_SEP +'Task Id'].df.in_first_page = 1;
diff --git a/erpnext/sandbox/test_leave.py b/erpnext/sandbox/test_leave.py
index cc2149f..407b0f1 100644
--- a/erpnext/sandbox/test_leave.py
+++ b/erpnext/sandbox/test_leave.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import unittest
import webnotes
diff --git a/erpnext/sandbox/test_stock_entry.py b/erpnext/sandbox/test_stock_entry.py
index d1e0097..7721a3e 100644
--- a/erpnext/sandbox/test_stock_entry.py
+++ b/erpnext/sandbox/test_stock_entry.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import unittest
import webnotes
diff --git a/erpnext/sandbox/test_stock_reco.py b/erpnext/sandbox/test_stock_reco.py
index bcde49e..1d78277 100644
--- a/erpnext/sandbox/test_stock_reco.py
+++ b/erpnext/sandbox/test_stock_reco.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import unittest
import webnotes
diff --git a/erpnext/sandbox/testdata/leaves.py b/erpnext/sandbox/testdata/leaves.py
index 8d44ffb..d8ed122 100644
--- a/erpnext/sandbox/testdata/leaves.py
+++ b/erpnext/sandbox/testdata/leaves.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
from webnotes.model.doc import Document
emp = Document(
diff --git a/erpnext/sandbox/testdata/masters.py b/erpnext/sandbox/testdata/masters.py
index 7f2d67c..368e6e4 100644
--- a/erpnext/sandbox/testdata/masters.py
+++ b/erpnext/sandbox/testdata/masters.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
"""
All master data in one place, can be created by 1 function call
diff --git a/erpnext/sandbox/testdata/sle_data.py b/erpnext/sandbox/testdata/sle_data.py
index eab0376..3469c10 100644
--- a/erpnext/sandbox/testdata/sle_data.py
+++ b/erpnext/sandbox/testdata/sle_data.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
from webnotes.model.doc import Document
# Existing SLE data
diff --git a/erpnext/sandbox/testdata/stock_entry.py b/erpnext/sandbox/testdata/stock_entry.py
index 3316016..91aaed4 100644
--- a/erpnext/sandbox/testdata/stock_entry.py
+++ b/erpnext/sandbox/testdata/stock_entry.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
from webnotes.model.doc import Document
# Material Receipt
diff --git a/erpnext/sandbox/testdata/stock_reco.py b/erpnext/sandbox/testdata/stock_reco.py
index efcbbc5..14e28ff 100644
--- a/erpnext/sandbox/testdata/stock_reco.py
+++ b/erpnext/sandbox/testdata/stock_reco.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
from webnotes.model.doc import Document
# Stock Reconciliation
diff --git a/erpnext/selling/doctype/campaign/campaign.js b/erpnext/selling/doctype/campaign/campaign.js
index 6ffef4a..3cad944 100644
--- a/erpnext/selling/doctype/campaign/campaign.js
+++ b/erpnext/selling/doctype/campaign/campaign.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/selling/doctype/campaign/campaign.txt b/erpnext/selling/doctype/campaign/campaign.txt
index 1f1c3a0..8810cb8 100644
--- a/erpnext/selling/doctype/campaign/campaign.txt
+++ b/erpnext/selling/doctype/campaign/campaign.txt
@@ -5,164 +5,84 @@
{
'creation': '2010-08-08 17:08:54',
'docstatus': 0,
- 'modified': '2010-09-20 14:06:57',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-20 18:06:32',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocType
{
+ '_last_update': u'1326102553',
'allow_trash': 1,
- 'autoname': 'field:campaign_name',
- 'colour': 'White:FFF',
+ 'autoname': u'field:campaign_name',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
- 'document_type': 'Master',
- 'module': 'Selling',
+ 'document_type': u'Master',
+ 'module': u'Selling',
'name': '__common__',
- 'section_style': 'Simple',
- 'server_code_error': ' ',
+ 'section_style': u'Simple',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'version': 6
+ 'version': 7
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Campaign',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
- },
-
- # These values are common for all DocPerm
- {
- 'amend': 0,
- 'doctype': 'DocPerm',
- 'name': '__common__',
- 'parent': 'Campaign',
- 'parentfield': 'permissions',
- 'parenttype': 'DocType',
- 'read': 1,
- 'submit': 0
+ 'parent': u'Campaign',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# DocType, Campaign
{
'doctype': 'DocType',
- 'name': 'Campaign'
- },
-
- # DocPerm
- {
- 'cancel': 0,
- 'create': 0,
- 'doctype': 'DocPerm',
- 'idx': 1,
- 'permlevel': 1,
- 'role': 'Sales Manager',
- 'write': 0
- },
-
- # DocPerm
- {
- 'cancel': 0,
- 'create': 0,
- 'doctype': 'DocPerm',
- 'idx': 2,
- 'permlevel': 0,
- 'role': 'Sales Manager',
- 'write': 0
- },
-
- # DocPerm
- {
- 'cancel': 0,
- 'create': 0,
- 'doctype': 'DocPerm',
- 'idx': 3,
- 'permlevel': 1,
- 'role': 'Sales Master Manager',
- 'write': 0
- },
-
- # DocPerm
- {
- 'cancel': 0,
- 'create': 0,
- 'doctype': 'DocPerm',
- 'idx': 4,
- 'permlevel': 1,
- 'role': 'Sales User',
- 'write': 0
- },
-
- # DocPerm
- {
- 'cancel': 0,
- 'create': 0,
- 'doctype': 'DocPerm',
- 'idx': 5,
- 'permlevel': 0,
- 'role': 'Sales User',
- 'write': 0
- },
-
- # DocPerm
- {
- 'cancel': 1,
- 'create': 1,
- 'doctype': 'DocPerm',
- 'idx': 6,
- 'permlevel': 0,
- 'role': 'Sales Master Manager',
- 'write': 1
+ 'name': u'Campaign'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'trash_reason',
- 'fieldtype': 'Small Text',
- 'idx': 1,
- 'label': 'Trash Reason',
- 'oldfieldname': 'trash_reason',
- 'oldfieldtype': 'Small Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'trash_reason',
+ 'fieldtype': u'Small Text',
+ 'label': u'Trash Reason',
+ 'oldfieldname': u'trash_reason',
+ 'oldfieldtype': u'Small Text',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 2,
- 'label': 'Campaign',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Campaign',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'campaign_name',
- 'fieldtype': 'Data',
- 'idx': 3,
- 'label': 'Campaign Name',
- 'oldfieldname': 'campaign_name',
- 'oldfieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'campaign_name',
+ 'fieldtype': u'Data',
+ 'label': u'Campaign Name',
+ 'oldfieldname': u'campaign_name',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'reqd': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'description',
- 'fieldtype': 'Text',
- 'idx': 4,
- 'label': 'Description',
- 'oldfieldname': 'description',
- 'oldfieldtype': 'Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'description',
+ 'fieldtype': u'Text',
+ 'label': u'Description',
+ 'oldfieldname': u'description',
+ 'oldfieldtype': u'Text',
'permlevel': 0,
- 'width': '300px'
+ 'width': u'300px'
}
]
\ No newline at end of file
diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js
index 7e689dd..89b95fa 100644
--- a/erpnext/selling/doctype/customer/customer.js
+++ b/erpnext/selling/doctype/customer/customer.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
$import(Contact Control)
/* ********************************* onload ********************************************* */
diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py
index 2c804e5..4530cf5 100644
--- a/erpnext/selling/doctype/customer/customer.py
+++ b/erpnext/selling/doctype/customer/customer.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/selling/doctype/customer/customer.txt b/erpnext/selling/doctype/customer/customer.txt
index 24271ee..346b4d1 100644
--- a/erpnext/selling/doctype/customer/customer.txt
+++ b/erpnext/selling/doctype/customer/customer.txt
@@ -5,47 +5,48 @@
{
'creation': '2010-08-08 17:08:56',
'docstatus': 0,
- 'modified': '2011-07-20 10:42:05',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-29 13:24:31',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocType
{
- '_last_update': '1309508837',
+ '_last_update': u'1330501485',
'allow_print': 0,
'allow_trash': 1,
- 'colour': 'White:FFF',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
- 'document_type': 'Master',
- 'module': 'Selling',
+ 'document_type': u'Master',
+ 'module': u'Selling',
'name': '__common__',
- 'search_fields': 'customer_name,customer_group,country,territory',
- 'section_style': 'Tabbed',
- 'server_code_error': ' ',
+ 'search_fields': u'customer_name,customer_group,country,territory',
+ 'section_style': u'Tabbed',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'subject': "eval:'%(customer_name)s'=='%(name)s' ? ' ' : '%(customer_name)s'",
- 'tag_fields': 'customer_group,customer_type',
- 'version': 433
+ 'subject': u'eval:"%(customer_name)s"=="%(name)s" ? "" : "%(customer_name)s"',
+ 'tag_fields': u'customer_group,customer_type',
+ 'version': 434
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Customer',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'Customer',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
'amend': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'name': '__common__',
- 'parent': 'Customer',
- 'parentfield': 'permissions',
- 'parenttype': 'DocType',
+ 'parent': u'Customer',
+ 'parentfield': u'permissions',
+ 'parenttype': u'DocType',
'read': 1,
'submit': 0
},
@@ -53,17 +54,16 @@
# DocType, Customer
{
'doctype': 'DocType',
- 'name': 'Customer'
+ 'name': u'Customer'
},
# DocPerm
{
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
- 'idx': 1,
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Sales Manager',
+ 'role': u'Sales Manager',
'write': 0
},
@@ -71,10 +71,9 @@
{
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
- 'idx': 2,
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Sales Manager',
+ 'role': u'Sales Manager',
'write': 0
},
@@ -82,10 +81,9 @@
{
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
- 'idx': 3,
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Sales User',
+ 'role': u'Sales User',
'write': 0
},
@@ -93,10 +91,9 @@
{
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
- 'idx': 4,
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Sales User',
+ 'role': u'Sales User',
'write': 0
},
@@ -104,10 +101,9 @@
{
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
- 'idx': 5,
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Sales Master Manager',
+ 'role': u'Sales Master Manager',
'write': 1
},
@@ -115,38 +111,35 @@
{
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
- 'idx': 6,
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Sales Master Manager',
+ 'role': u'Sales Master Manager',
'write': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Note: You Can Manage Multiple Address or Contacts via Addresses & Contacts',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 1,
- 'label': 'Basic Info',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Note: You Can Manage Multiple Address or Contacts via Addresses & Contacts',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Basic Info',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0,
'reqd': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'customer_name',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_name',
+ 'fieldtype': u'Data',
'hidden': 0,
- 'idx': 2,
'in_filter': 1,
- 'label': 'Customer Name',
+ 'label': u'Customer Name',
'no_copy': 1,
- 'oldfieldname': 'customer_name',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'customer_name',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 0,
'report_hide': 0,
@@ -156,330 +149,312 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'customer_type',
- 'fieldtype': 'Select',
- 'idx': 3,
- 'label': 'Customer Type',
- 'oldfieldname': 'customer_type',
- 'oldfieldtype': 'Select',
- 'options': '\nCompany\nIndividual',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_type',
+ 'fieldtype': u'Select',
+ 'label': u'Customer Type',
+ 'oldfieldname': u'customer_type',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nCompany\nIndividual',
'permlevel': 0,
'reqd': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'naming_series',
- 'fieldtype': 'Select',
- 'idx': 4,
- 'label': 'Series',
+ 'doctype': u'DocField',
+ 'fieldname': u'naming_series',
+ 'fieldtype': u'Select',
+ 'label': u'Series',
'no_copy': 1,
- 'options': '\nCUST\nCUSTMUM\nCUSTOM',
+ 'options': u'\nCUST\nCUSTMUM',
'permlevel': 0,
'print_hide': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Fetch lead which will be converted into customer.',
- 'doctype': 'DocField',
- 'fieldname': 'lead_name',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'description': u'Fetch lead which will be converted into customer.',
+ 'doctype': u'DocField',
+ 'fieldname': u'lead_name',
+ 'fieldtype': u'Link',
'hidden': 0,
- 'idx': 5,
'in_filter': 1,
- 'label': 'Lead Ref',
+ 'label': u'Lead Ref',
'no_copy': 1,
- 'oldfieldname': 'lead_name',
- 'oldfieldtype': 'Link',
- 'options': 'Lead',
+ 'oldfieldname': u'lead_name',
+ 'oldfieldtype': u'Link',
+ 'options': u'Lead',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'idx': 6,
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': '<a href="javascript:cur_frm.cscript.CGHelp();">To manage Customer Groups, click here</a>',
- 'doctype': 'DocField',
- 'fieldname': 'customer_group',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'description': u'<a href="javascript:cur_frm.cscript.CGHelp();">To manage Customer Groups, click here</a>',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_group',
+ 'fieldtype': u'Link',
'hidden': 0,
- 'idx': 7,
'in_filter': 1,
- 'label': 'Customer Group',
- 'oldfieldname': 'customer_group',
- 'oldfieldtype': 'Link',
- 'options': 'Customer Group',
+ 'label': u'Customer Group',
+ 'oldfieldname': u'customer_group',
+ 'oldfieldtype': u'Link',
+ 'options': u'Customer Group',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': '<a href="javascript:cur_frm.cscript.TerritoryHelp();">To manage Territory, click here</a>',
- 'doctype': 'DocField',
- 'fieldname': 'territory',
- 'fieldtype': 'Link',
- 'idx': 8,
- 'label': 'Territory',
- 'oldfieldname': 'territory',
- 'oldfieldtype': 'Link',
- 'options': 'Territory',
+ 'colour': u'White:FFF',
+ 'description': u'<a href="javascript:cur_frm.cscript.TerritoryHelp();">To manage Territory, click here</a>',
+ 'doctype': u'DocField',
+ 'fieldname': u'territory',
+ 'fieldtype': u'Link',
+ 'label': u'Territory',
+ 'oldfieldname': u'territory',
+ 'oldfieldtype': u'Link',
+ 'options': u'Territory',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 9,
- 'label': 'Address & Contacts',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Address & Contacts',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'depends_on': 'eval:doc.__islocal',
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'idx': 10,
- 'label': 'Address Desc',
- 'options': '<em>Addresses will appear only when you save the customer</em>',
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:doc.__islocal',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Address Desc',
+ 'options': u'<em>Addresses will appear only when you save the customer</em>',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'idx': 11,
- 'label': 'Address HTML',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Address HTML',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'idx': 12,
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'colour': 'White:FFF',
- 'depends_on': 'eval:doc.__islocal',
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'idx': 13,
- 'label': 'Contact Desc',
- 'options': '<em>Contact Details will appear only when you save the customer</em>',
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:doc.__islocal',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Contact Desc',
+ 'options': u'<em>Contact Details will appear only when you save the customer</em>',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'idx': 14,
- 'label': 'Contact HTML',
- 'oldfieldtype': 'HTML',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Contact HTML',
+ 'oldfieldtype': u'HTML',
'permlevel': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 15,
- 'label': 'More Info',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'More Info',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'To create an Account Head under a different company, then set the company and click the button below.',
- 'doctype': 'DocField',
- 'fieldname': 'company',
- 'fieldtype': 'Link',
- 'idx': 16,
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'To create an Account Head under a different company, select the company and save customer.',
+ 'doctype': u'DocField',
+ 'fieldname': u'company',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Company',
- 'oldfieldname': 'company',
- 'oldfieldtype': 'Link',
- 'options': 'Company',
+ 'label': u'Company',
+ 'oldfieldname': u'company',
+ 'oldfieldtype': u'Link',
+ 'options': u'Company',
'permlevel': 0,
'reqd': 1,
- 'search_index': 0
+ 'search_index': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': "Your Customer's TAX registration numbers (if applicable) or any general information",
- 'doctype': 'DocField',
- 'fieldname': 'customer_details',
- 'fieldtype': 'Text',
- 'idx': 17,
- 'label': 'Customer Details',
- 'oldfieldname': 'customer_details',
- 'oldfieldtype': 'Code',
+ 'colour': u'White:FFF',
+ 'description': u"Your Customer's TAX registration numbers (if applicable) or any general information",
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_details',
+ 'fieldtype': u'Text',
+ 'label': u'Customer Details',
+ 'oldfieldname': u'customer_details',
+ 'oldfieldtype': u'Code',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'idx': 18,
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'credit_days',
- 'fieldtype': 'Int',
- 'idx': 19,
- 'label': 'Credit Days',
- 'oldfieldname': 'credit_days',
- 'oldfieldtype': 'Int',
+ 'doctype': u'DocField',
+ 'fieldname': u'credit_days',
+ 'fieldtype': u'Int',
+ 'label': u'Credit Days',
+ 'oldfieldname': u'credit_days',
+ 'oldfieldtype': u'Int',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'credit_limit',
- 'fieldtype': 'Currency',
- 'idx': 20,
- 'label': 'Credit Limit',
- 'oldfieldname': 'credit_limit',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'credit_limit',
+ 'fieldtype': u'Currency',
+ 'label': u'Credit Limit',
+ 'oldfieldname': u'credit_limit',
+ 'oldfieldtype': u'Currency',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'website',
- 'fieldtype': 'Data',
- 'idx': 21,
- 'label': 'Website',
+ 'doctype': u'DocField',
+ 'fieldname': u'website',
+ 'fieldtype': u'Data',
+ 'label': u'Website',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 22,
- 'label': 'Sales Team',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Sales Team',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'default_sales_partner',
- 'fieldtype': 'Link',
- 'idx': 23,
- 'label': 'Default Sales Partner',
- 'oldfieldname': 'default_sales_partner',
- 'oldfieldtype': 'Link',
- 'options': 'Sales Partner',
+ 'doctype': u'DocField',
+ 'fieldname': u'default_sales_partner',
+ 'fieldtype': u'Link',
+ 'label': u'Default Sales Partner',
+ 'oldfieldname': u'default_sales_partner',
+ 'oldfieldtype': u'Link',
+ 'options': u'Sales Partner',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'default_commission_rate',
- 'fieldtype': 'Currency',
- 'idx': 24,
- 'label': 'Default Commission Rate',
- 'oldfieldname': 'default_commission_rate',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'default_commission_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Default Commission Rate',
+ 'oldfieldname': u'default_commission_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'sales_team',
- 'fieldtype': 'Table',
- 'idx': 25,
- 'label': 'Sales Team Details',
- 'oldfieldname': 'sales_team',
- 'oldfieldtype': 'Table',
- 'options': 'Sales Team',
+ 'doctype': u'DocField',
+ 'fieldname': u'sales_team',
+ 'fieldtype': u'Table',
+ 'label': u'Sales Team Details',
+ 'oldfieldname': u'sales_team',
+ 'oldfieldtype': u'Table',
+ 'options': u'Sales Team',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'depends_on': 'eval:!doc.__islocal',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 26,
- 'label': 'Transaction History',
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Transaction History',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'depends_on': 'eval:!doc.__islocal',
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'idx': 27,
- 'label': 'History HTML',
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'History HTML',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'trash_reason',
- 'fieldtype': 'Small Text',
- 'idx': 28,
- 'label': 'Trash Reason',
- 'oldfieldname': 'trash_reason',
- 'oldfieldtype': 'Small Text',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'trash_reason',
+ 'fieldtype': u'Small Text',
+ 'label': u'Trash Reason',
+ 'oldfieldname': u'trash_reason',
+ 'oldfieldtype': u'Small Text',
'permlevel': 1
}
]
\ No newline at end of file
diff --git a/erpnext/selling/doctype/enquiry/enquiry.js b/erpnext/selling/doctype/enquiry/enquiry.js
index f7159ab..c3f0a0b 100644
--- a/erpnext/selling/doctype/enquiry/enquiry.js
+++ b/erpnext/selling/doctype/enquiry/enquiry.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
$import(SMS Control)
cur_frm.cscript.refresh = function(doc, cdt, cdn){
diff --git a/erpnext/selling/doctype/enquiry/enquiry.py b/erpnext/selling/doctype/enquiry/enquiry.py
index 5748525..6d655fb 100644
--- a/erpnext/selling/doctype/enquiry/enquiry.py
+++ b/erpnext/selling/doctype/enquiry/enquiry.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/selling/doctype/industry_type/industry_type.js b/erpnext/selling/doctype/industry_type/industry_type.js
index 6ffef4a..3cad944 100644
--- a/erpnext/selling/doctype/industry_type/industry_type.js
+++ b/erpnext/selling/doctype/industry_type/industry_type.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/selling/doctype/installation_note/installation_note.js b/erpnext/selling/doctype/installation_note/installation_note.js
index 3fe7998..5486857 100644
--- a/erpnext/selling/doctype/installation_note/installation_note.js
+++ b/erpnext/selling/doctype/installation_note/installation_note.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.tname = "Installed Item Details";
cur_frm.cscript.fname = "installed_item_details";
diff --git a/erpnext/selling/doctype/installation_note/installation_note.py b/erpnext/selling/doctype/installation_note/installation_note.py
index 58b7d91..0b5f3c2 100644
--- a/erpnext/selling/doctype/installation_note/installation_note.py
+++ b/erpnext/selling/doctype/installation_note/installation_note.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/selling/doctype/lead/lead.js b/erpnext/selling/doctype/lead/lead.js
index 888c030..7255636 100644
--- a/erpnext/selling/doctype/lead/lead.js
+++ b/erpnext/selling/doctype/lead/lead.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// Module CRM
$import(SMS Control)
diff --git a/erpnext/selling/doctype/lead/lead.py b/erpnext/selling/doctype/lead/lead.py
index 14d14e1..e5d2633 100644
--- a/erpnext/selling/doctype/lead/lead.py
+++ b/erpnext/selling/doctype/lead/lead.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/selling/doctype/plot_control/plot_control.py b/erpnext/selling/doctype/plot_control/plot_control.py
index d403053..468f3c1 100644
--- a/erpnext/selling/doctype/plot_control/plot_control.py
+++ b/erpnext/selling/doctype/plot_control/plot_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js
index e39b5f0..7f40782 100644
--- a/erpnext/selling/doctype/quotation/quotation.js
+++ b/erpnext/selling/doctype/quotation/quotation.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// Module CRM
cur_frm.cscript.tname = "Quotation Detail";
cur_frm.cscript.fname = "quotation_details";
@@ -31,12 +47,14 @@
hide_field(['customer','customer_address','contact_person', 'customer_name','contact_display', 'customer_group']);
}
}
-
}
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
- // defined in sales_common.js
- cur_frm.cscript.update_item_details(doc, cdt, cdn);
+ var callback = function(doc, dt, dn) {
+ // defined in sales_common.js
+ cur_frm.cscript.update_item_details(doc, dt, dn);
+ }
+ cur_frm.cscript.hide_price_list_currency(doc, dt, dn, callback);
}
// hide - unhide fields based on lead or customer..
@@ -68,6 +86,9 @@
cur_frm.clear_custom_buttons();
+ if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn);
+
+
if(doc.docstatus == 1 && doc.status!='Order Lost') {
cur_frm.add_custom_button('Make Sales Order', cur_frm.cscript['Make Sales Order']);
cur_frm.add_custom_button('Set as Lost', cur_frm.cscript['Declare Order Lost']);
diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py
index 795ef79..de4056d 100644
--- a/erpnext/selling/doctype/quotation/quotation.py
+++ b/erpnext/selling/doctype/quotation/quotation.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
@@ -60,14 +76,17 @@
# Get Item Details
# -----------------
- def get_item_details(self, item_code=None):
- if item_code:
- return get_obj('Sales Common').get_item_details(item_code, self)
+ def get_item_details(self, args=None):
+ args = args and eval(args) or {}
+ if args.get('item_code'):
+ return get_obj('Sales Common').get_item_details(args, self)
else:
obj = get_obj('Sales Common')
for doc in self.doclist:
if doc.fields.get('item_code'):
- ret = obj.get_item_details(doc.item_code, self)
+ arg = {'item_code':doc.fields.get('item_code'), 'income_account':doc.fields.get('income_account'),
+ 'cost_center': doc.fields.get('cost_center'), 'warehouse': doc.fields.get('warehouse')};
+ ret = obj.get_item_details(arg, self)
for r in ret:
if not doc.fields.get(r):
doc.fields[r] = ret[r]
@@ -77,6 +96,8 @@
# --------------------------------------------------------------
def get_adj_percent(self, arg=''):
get_obj('Sales Common').get_adj_percent(self)
+
+
# OTHER CHARGES TRIGGER FUNCTIONS
@@ -204,7 +225,6 @@
def on_update(self):
# Add to calendar
- #if self.doc.contact_date and self.doc.last_contact_date != self.doc.contact_date:
if self.doc.contact_date and self.doc.contact_date_ref != self.doc.contact_date:
if self.doc.contact_by:
self.add_calendar_event()
diff --git a/erpnext/selling/doctype/quotation/quotation.txt b/erpnext/selling/doctype/quotation/quotation.txt
index d1054bf..07642e8 100644
--- a/erpnext/selling/doctype/quotation/quotation.txt
+++ b/erpnext/selling/doctype/quotation/quotation.txt
@@ -5,87 +5,68 @@
{
'creation': '2010-08-08 17:09:17',
'docstatus': 0,
- 'modified': '2012-01-09 16:52:51',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-27 17:14:54',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Quotation',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'Quotation',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# These values are common for all DocType
{
- '_last_update': '1325570646',
+ '_last_update': u'1330069750',
'allow_attach': 1,
'allow_email': 0,
'allow_trash': 1,
- 'colour': 'White:FFF',
- 'default_print_format': 'Standard',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
- 'document_type': 'Transaction',
+ 'document_type': u'Transaction',
'hide_toolbar': 0,
'is_transaction_doc': 1,
'max_attachments': 1,
- 'module': 'Selling',
+ 'module': u'Selling',
'name': '__common__',
'read_only_onload': 1,
- 'search_fields': 'status,transaction_date,customer,lead,order_type',
- 'section_style': 'Tabbed',
- 'server_code_error': ' ',
+ 'search_fields': u'status,transaction_date,customer,lead,order_type',
+ 'section_style': u'Tabbed',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'subject': 'To %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s',
- 'tag_fields': 'status',
- 'version': 599
+ 'subject': u'To %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s',
+ 'tag_fields': u'status',
+ 'version': 617
},
# These values are common for all DocFormat
{
- 'doctype': 'DocFormat',
+ 'doctype': u'DocFormat',
'name': '__common__',
- 'parent': 'Quotation',
- 'parentfield': 'formats',
- 'parenttype': 'DocType'
+ 'parent': u'Quotation',
+ 'parentfield': u'formats',
+ 'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'name': '__common__',
- 'parent': 'Quotation',
- 'parentfield': 'permissions',
- 'parenttype': 'DocType'
+ 'parent': u'Quotation',
+ 'parentfield': u'permissions',
+ 'parenttype': u'DocType',
+ 'read': 1
},
# DocType, Quotation
{
'doctype': 'DocType',
- 'name': 'Quotation'
- },
-
- # DocPerm
- {
- 'doctype': 'DocPerm',
- 'permlevel': 0,
- 'role': 'user print'
- },
-
- # DocPerm
- {
- 'amend': 0,
- 'cancel': 0,
- 'create': 0,
- 'doctype': 'DocPerm',
- 'permlevel': 1,
- 'read': 1,
- 'role': 'Sales Manager',
- 'submit': 0,
- 'write': 0
+ 'name': u'Quotation'
},
# DocPerm
@@ -93,10 +74,9 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'read': 1,
- 'role': 'Sales Manager',
+ 'role': u'Sales Manager',
'submit': 1,
'write': 1
},
@@ -106,34 +86,19 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'read': 1,
- 'role': 'Sales User',
+ 'role': u'Sales User',
'submit': 1,
'write': 1
},
# DocPerm
{
- 'amend': 0,
- 'cancel': 0,
- 'create': 0,
- 'doctype': 'DocPerm',
- 'permlevel': 1,
- 'read': 1,
- 'role': 'Sales User',
- 'submit': 0,
- 'write': 0
- },
-
- # DocPerm
- {
- 'doctype': 'DocPerm',
- 'match': 'customer_name',
+ 'doctype': u'DocPerm',
+ 'match': u'customer_name',
'permlevel': 0,
- 'read': 1,
- 'role': 'Customer'
+ 'role': u'Customer'
},
# DocPerm
@@ -141,92 +106,81 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'read': 1,
- 'role': 'Maintenance Manager',
+ 'role': u'Maintenance Manager',
'submit': 1,
'write': 1
},
# DocPerm
{
- 'doctype': 'DocPerm',
- 'permlevel': 1,
- 'read': 1,
- 'role': 'Maintenance Manager'
- },
-
- # DocPerm
- {
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'read': 1,
- 'role': 'Maintenance User',
+ 'role': u'Maintenance User',
'submit': 1,
'write': 1
},
# DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'read': 1,
- 'role': 'Maintenance User'
+ 'role': u'All'
},
# DocFormat
{
- 'doctype': 'DocFormat',
- 'format': 'Quotation Classic'
+ 'doctype': u'DocFormat',
+ 'format': u'Quotation Classic'
},
# DocFormat
{
- 'doctype': 'DocFormat',
- 'format': 'Quotation Modern'
+ 'doctype': u'DocFormat',
+ 'format': u'Quotation Modern'
},
# DocFormat
{
- 'doctype': 'DocFormat',
- 'format': 'Quotation Spartan'
+ 'doctype': u'DocFormat',
+ 'format': u'Quotation Spartan'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Basic Info',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Basic Info',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'To manage multiple series please go to Setup > Manage Series',
- 'doctype': 'DocField',
- 'fieldname': 'naming_series',
- 'fieldtype': 'Select',
- 'label': 'Series',
+ 'colour': u'White:FFF',
+ 'description': u'To manage multiple series please go to Setup > Manage Series',
+ 'doctype': u'DocField',
+ 'fieldname': u'naming_series',
+ 'fieldtype': u'Select',
+ 'label': u'Series',
'no_copy': 1,
- 'oldfieldname': 'naming_series',
- 'oldfieldtype': 'Select',
- 'options': 'QTN',
+ 'oldfieldname': u'naming_series',
+ 'oldfieldtype': u'Select',
+ 'options': u'QTN',
'permlevel': 0,
'print_hide': 1,
'reqd': 1
@@ -234,120 +188,121 @@
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'quotation_to',
- 'fieldtype': 'Select',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'quotation_to',
+ 'fieldtype': u'Select',
'in_filter': 1,
- 'label': 'Quotation To',
- 'oldfieldname': 'quotation_to',
- 'oldfieldtype': 'Select',
- 'options': '\nLead\nCustomer',
+ 'label': u'Quotation To',
+ 'oldfieldname': u'quotation_to',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nLead\nCustomer',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
'reqd': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'customer',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer',
+ 'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
- 'label': 'Customer',
- 'oldfieldname': 'customer',
- 'oldfieldtype': 'Link',
- 'options': 'Customer',
+ 'label': u'Customer',
+ 'oldfieldname': u'customer',
+ 'oldfieldtype': u'Link',
+ 'options': u'Customer',
'permlevel': 0,
'print_hide': 1,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'customer_address',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_address',
+ 'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
- 'label': 'Customer Address',
- 'options': 'Address',
+ 'label': u'Customer Address',
+ 'options': u'Address',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'contact_person',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_person',
+ 'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
- 'label': 'Contact Person',
- 'oldfieldname': 'contact_person',
- 'oldfieldtype': 'Link',
- 'options': 'Contact',
+ 'label': u'Contact Person',
+ 'oldfieldname': u'contact_person',
+ 'oldfieldtype': u'Link',
+ 'options': u'Contact',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'customer_name',
- 'fieldtype': 'Data',
- 'label': 'Name',
- 'permlevel': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'lead',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'lead',
+ 'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
- 'label': 'Lead',
- 'oldfieldname': 'lead',
- 'oldfieldtype': 'Link',
- 'options': 'Lead',
+ 'label': u'Lead',
+ 'oldfieldname': u'lead',
+ 'oldfieldtype': u'Link',
+ 'options': u'Lead',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'lead_name',
- 'fieldtype': 'Text',
- 'label': 'Name',
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:doc.lead',
+ 'doctype': u'DocField',
+ 'fieldname': u'lead_name',
+ 'fieldtype': u'Text',
+ 'label': u'Name',
'permlevel': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'address_display',
- 'fieldtype': 'Small Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_name',
+ 'fieldtype': u'Data',
+ 'label': u'Name',
+ 'permlevel': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'address_display',
+ 'fieldtype': u'Small Text',
'hidden': 0,
'in_filter': 0,
- 'label': 'Address',
- 'oldfieldname': 'customer_address',
- 'oldfieldtype': 'Small Text',
+ 'label': u'Address',
+ 'oldfieldname': u'customer_address',
+ 'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
@@ -356,78 +311,79 @@
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'contact_display',
- 'fieldtype': 'Small Text',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_display',
+ 'fieldtype': u'Small Text',
'in_filter': 0,
- 'label': 'Contact',
+ 'label': u'Contact',
'permlevel': 1,
'print_hide': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'contact_mobile',
- 'fieldtype': 'Text',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_mobile',
+ 'fieldtype': u'Text',
'hidden': 0,
- 'label': 'Mobile No',
+ 'label': u'Mobile No',
'permlevel': 1,
'print_hide': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'contact_email',
- 'fieldtype': 'Text',
- 'label': 'Contact Email',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_email',
+ 'fieldtype': u'Text',
+ 'label': u'Contact Email',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'default': 'Today',
- 'description': 'The date at which current entry is made in system.',
- 'doctype': 'DocField',
- 'fieldname': 'transaction_date',
- 'fieldtype': 'Date',
+ 'default': u'Today',
+ 'description': u'The date at which current entry is made in system.',
+ 'doctype': u'DocField',
+ 'fieldname': u'transaction_date',
+ 'fieldtype': u'Date',
'in_filter': 1,
- 'label': 'Quotation Date',
+ 'label': u'Quotation Date',
'no_copy': 1,
- 'oldfieldname': 'transaction_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'transaction_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'reqd': 1,
'search_index': 1,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'order_type',
- 'fieldtype': 'Select',
+ 'colour': u'White:FFF',
+ 'default': u'Sales',
+ 'doctype': u'DocField',
+ 'fieldname': u'order_type',
+ 'fieldtype': u'Select',
'in_filter': 1,
- 'label': 'Order Type',
- 'oldfieldname': 'order_type',
- 'oldfieldtype': 'Select',
- 'options': '\nSales\nMaintenance',
+ 'label': u'Order Type',
+ 'oldfieldname': u'order_type',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nSales\nMaintenance',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
@@ -437,17 +393,17 @@
# DocField
{
'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'default': 'Draft',
- 'doctype': 'DocField',
- 'fieldname': 'status',
- 'fieldtype': 'Select',
+ 'colour': u'White:FFF',
+ 'default': u'Draft',
+ 'doctype': u'DocField',
+ 'fieldname': u'status',
+ 'fieldtype': u'Select',
'in_filter': 1,
- 'label': 'Status',
+ 'label': u'Status',
'no_copy': 1,
- 'oldfieldname': 'status',
- 'oldfieldtype': 'Select',
- 'options': '\nDraft\nSubmitted\nOrder Confirmed\nOrder Lost\nCancelled',
+ 'oldfieldname': u'status',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nDraft\nSubmitted\nOrder Confirmed\nOrder Lost\nCancelled',
'permlevel': 1,
'print_hide': 1,
'reqd': 1,
@@ -456,110 +412,76 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'amended_from',
- 'fieldtype': 'Data',
- 'label': 'Amended From',
+ 'doctype': u'DocField',
+ 'fieldname': u'amended_from',
+ 'fieldtype': u'Data',
+ 'label': u'Amended From',
'no_copy': 1,
- 'oldfieldname': 'amended_from',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'amended_from',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'description': 'The date at which current entry is corrected in the system.',
- 'doctype': 'DocField',
- 'fieldname': 'amendment_date',
- 'fieldtype': 'Date',
- 'label': 'Amendment Date',
+ 'description': u'The date at which current entry is corrected in the system.',
+ 'doctype': u'DocField',
+ 'fieldname': u'amendment_date',
+ 'fieldtype': u'Date',
+ 'label': u'Amendment Date',
'no_copy': 1,
- 'oldfieldname': 'amendment_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'amendment_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': "To create Quotation against Enquiry, Select Enquiry No. and click on 'Pull Enquiry Details' ",
- 'doctype': 'DocField',
- 'fieldname': 'enq_no',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'description': u'Will be fetched from Customer',
+ 'doctype': u'DocField',
+ 'fieldname': u'territory',
+ 'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
- 'label': 'Enquiry No',
- 'no_copy': 0,
- 'oldfieldname': 'enq_no',
- 'oldfieldtype': 'Link',
- 'options': 'Enquiry',
- 'permlevel': 0,
- 'print_hide': 0,
- 'report_hide': 0,
- 'search_index': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'hidden': 0,
- 'label': 'Pull Enquiry Detail',
- 'no_copy': 0,
- 'oldfieldtype': 'Button',
- 'permlevel': 0,
- 'print_hide': 0,
- 'report_hide': 0,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Will be fetched from Customer',
- 'doctype': 'DocField',
- 'fieldname': 'territory',
- 'fieldtype': 'Link',
- 'hidden': 0,
- 'in_filter': 1,
- 'label': 'Territory',
- 'options': 'Territory',
+ 'label': u'Territory',
+ 'options': u'Territory',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'customer_group',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_group',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Customer Group',
- 'oldfieldname': 'customer_group',
- 'oldfieldtype': 'Link',
- 'options': 'Customer Group',
+ 'label': u'Customer Group',
+ 'oldfieldname': u'customer_group',
+ 'oldfieldtype': u'Link',
+ 'options': u'Customer Group',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'search_index': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Items',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Items',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 0,
'search_index': 0
@@ -567,33 +489,33 @@
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Select the price list as entered in "Price List" master. This will pull the reference rates of items against this price list as specified in "Item" master.',
- 'doctype': 'DocField',
- 'fieldname': 'price_list_name',
- 'fieldtype': 'Select',
+ 'colour': u'White:FFF',
+ 'description': u'Select the price list as entered in "Price List" master. This will pull the reference rates of items against this price list as specified in "Item" master.',
+ 'doctype': u'DocField',
+ 'fieldname': u'price_list_name',
+ 'fieldtype': u'Select',
'in_filter': 1,
- 'label': 'Price List',
- 'oldfieldname': 'price_list_name',
- 'oldfieldtype': 'Select',
- 'options': 'link:Price List',
+ 'label': u'Price List',
+ 'oldfieldname': u'price_list_name',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Price List',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Select the currency in which price list is maintained',
- 'doctype': 'DocField',
- 'fieldname': 'price_list_currency',
- 'fieldtype': 'Select',
- 'label': 'Price List Currency',
- 'options': 'link:Currency',
+ 'colour': u'White:FFF',
+ 'description': u'Select the currency in which price list is maintained',
+ 'doctype': u'DocField',
+ 'fieldname': u'price_list_currency',
+ 'fieldtype': u'Select',
+ 'label': u'Price List Currency',
+ 'options': u'link:Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1
@@ -601,12 +523,12 @@
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Rate at which Price list currency is converted to your currency',
- 'doctype': 'DocField',
- 'fieldname': 'plc_conversion_rate',
- 'fieldtype': 'Currency',
- 'label': 'Price List Currency Conversion Rate',
+ 'colour': u'White:FFF',
+ 'description': u"Rate at which Price list currency is converted to company's base currency",
+ 'doctype': u'DocField',
+ 'fieldname': u'plc_conversion_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Price List Currency Conversion Rate',
'permlevel': 0,
'print_hide': 1,
'reqd': 1
@@ -614,365 +536,373 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': "Customer's currency - If you want to select a currency that is not the default currency, then you must also specify the Currency Conversion Rate.",
- 'doctype': 'DocField',
- 'fieldname': 'currency',
- 'fieldtype': 'Select',
+ 'colour': u'White:FFF',
+ 'description': u"Customer's currency - If you want to select a currency that is not the default currency, then you must also specify the Currency Conversion Rate.",
+ 'doctype': u'DocField',
+ 'fieldname': u'currency',
+ 'fieldtype': u'Select',
'in_filter': 1,
- 'label': 'Currency',
- 'oldfieldname': 'currency',
- 'oldfieldtype': 'Select',
- 'options': 'link:Currency',
+ 'label': u'Currency',
+ 'oldfieldname': u'currency',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'default': '1.00',
- 'description': "Rate at which customer's currency is converted to your currency",
- 'doctype': 'DocField',
- 'fieldname': 'conversion_rate',
- 'fieldtype': 'Currency',
- 'label': 'Currency Conversion Rate',
- 'oldfieldname': 'conversion_rate',
- 'oldfieldtype': 'Currency',
+ 'colour': u'White:FFF',
+ 'default': u'1.00',
+ 'description': u"Rate at which customer's currency is converted to company's base currency",
+ 'doctype': u'DocField',
+ 'fieldname': u'conversion_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Conversion Rate',
+ 'oldfieldname': u'conversion_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Clear Table',
- 'oldfieldtype': 'Button',
- 'options': 'clear_quotation_details',
+ 'colour': u'White:FFF',
+ 'description': u"To create Quotation against Enquiry, Select Enquiry No. and click on 'Pull Enquiry Details' ",
+ 'doctype': u'DocField',
+ 'fieldname': u'enq_no',
+ 'fieldtype': u'Link',
+ 'hidden': 0,
+ 'in_filter': 1,
+ 'label': u'Enquiry No',
+ 'no_copy': 0,
+ 'oldfieldname': u'enq_no',
+ 'oldfieldtype': u'Link',
+ 'options': u'Enquiry',
'permlevel': 0,
- 'print_hide': 1
+ 'print_hide': 0,
+ 'report_hide': 0,
+ 'search_index': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'options': 'Simple',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'hidden': 0,
+ 'label': u'Pull Enquiry Detail',
+ 'no_copy': 0,
+ 'oldfieldtype': u'Button',
+ 'permlevel': 0,
+ 'print_hide': 0,
+ 'report_hide': 0,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'options': u'Simple',
'permlevel': 0
},
# DocField
{
'allow_on_submit': 1,
- 'colour': 'White:FFF',
- 'description': 'Field Descriptions for Quotation Details\n\n<b>Ref Rate: </b>Rate in your selected Price List. Price Lists help you track discounts.\n\n<b>Page Break:</b> If you want to break the page on this item in the Print Format',
- 'doctype': 'DocField',
- 'fieldname': 'quotation_details',
- 'fieldtype': 'Table',
- 'label': 'Quotation Details',
- 'oldfieldname': 'quotation_details',
- 'oldfieldtype': 'Table',
- 'options': 'Quotation Detail',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'quotation_details',
+ 'fieldtype': u'Table',
+ 'label': u'Quotation Details',
+ 'oldfieldname': u'quotation_details',
+ 'oldfieldtype': u'Table',
+ 'options': u'Quotation Detail',
'permlevel': 0,
- 'width': '40px'
+ 'width': u'40px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'net_total',
- 'fieldtype': 'Currency',
- 'label': 'Net Total*',
- 'no_copy': 0,
- 'oldfieldname': 'net_total',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 0,
- 'reqd': 0,
- 'width': '100px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Re-Calculate Values',
- 'oldfieldtype': 'Button',
- 'permlevel': 0,
- 'print_hide': 1,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'Note HTML',
- 'oldfieldtype': 'HTML',
- 'options': '<div style="margin-top:16px"><b>Note :</b> * In Base Currency\n</div>',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Clear Table',
+ 'oldfieldtype': u'Button',
+ 'options': u'clear_quotation_details',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Taxes',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Re-Calculate Values',
+ 'oldfieldtype': u'Button',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'net_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Net Total*',
+ 'no_copy': 0,
+ 'oldfieldname': u'net_total',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 0,
+ 'reqd': 0,
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Note HTML',
+ 'oldfieldtype': u'HTML',
+ 'options': u'<div style="margin-top:16px"><b>Note :</b> * In Base Currency\n</div>',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Taxes',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'charge',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'charge',
+ 'fieldtype': u'Link',
'hidden': 0,
- 'label': 'Select Charges Master',
- 'oldfieldname': 'charge',
- 'oldfieldtype': 'Link',
- 'options': 'Other Charges',
+ 'label': u'Select Charges Master',
+ 'oldfieldname': u'charge',
+ 'oldfieldtype': u'Link',
+ 'options': u'Other Charges',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
'hidden': 0,
- 'label': 'Get Charges',
- 'oldfieldtype': 'Button',
+ 'label': u'Get Charges',
+ 'oldfieldtype': u'Button',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'other_charges',
- 'fieldtype': 'Table',
- 'label': 'Other Charges',
- 'oldfieldname': 'other_charges',
- 'oldfieldtype': 'Table',
- 'options': 'RV Tax Detail',
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges',
+ 'fieldtype': u'Table',
+ 'label': u'Other Charges',
+ 'oldfieldname': u'other_charges',
+ 'oldfieldtype': u'Table',
+ 'options': u'RV Tax Detail',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Calculate Charges',
- 'oldfieldtype': 'Button',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Calculate Charges',
+ 'oldfieldtype': u'Button',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'other_charges_total',
- 'fieldtype': 'Currency',
- 'label': 'Charges Total*',
- 'oldfieldname': 'other_charges_total',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Charges Total*',
+ 'oldfieldname': u'other_charges_total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'grand_total',
- 'fieldtype': 'Currency',
- 'label': 'Grand Total*',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Other Charges Calculation',
+ 'oldfieldtype': u'HTML',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Totals',
+ 'oldfieldtype': u'Section Break',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'grand_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Grand Total*',
'no_copy': 0,
- 'oldfieldname': 'grand_total',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'grand_total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 0,
- 'width': '200px'
+ 'width': u'200px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'Other Charges Calculation',
- 'oldfieldtype': 'HTML',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'OT Notes',
- 'oldfieldtype': 'HTML',
- 'options': '<div style="margin-top:16px"><b>Note :</b> * In Base Currency\n</div>',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Totals',
- 'oldfieldtype': 'Section Break',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'rounded_total',
- 'fieldtype': 'Currency',
- 'label': 'Rounded Total',
+ 'doctype': u'DocField',
+ 'fieldname': u'rounded_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Rounded Total',
'no_copy': 0,
- 'oldfieldname': 'rounded_total',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'rounded_total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
- 'trigger': 'Client',
- 'width': '200px'
+ 'trigger': u'Client',
+ 'width': u'200px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'In Words will be visible once you save the Quotation.',
- 'doctype': 'DocField',
- 'fieldname': 'in_words',
- 'fieldtype': 'Data',
- 'label': 'In Words',
+ 'colour': u'White:FFF',
+ 'description': u'In Words will be visible once you save the Quotation.',
+ 'doctype': u'DocField',
+ 'fieldname': u'in_words',
+ 'fieldtype': u'Data',
+ 'label': u'In Words',
'no_copy': 0,
- 'oldfieldname': 'in_words',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'in_words',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
- 'width': '200px'
+ 'width': u'200px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
'print_hide': 1,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'grand_total_export',
- 'fieldtype': 'Currency',
- 'label': 'Grand Total (Export)',
+ 'doctype': u'DocField',
+ 'fieldname': u'grand_total_export',
+ 'fieldtype': u'Currency',
+ 'label': u'Grand Total',
'no_copy': 0,
- 'oldfieldname': 'grand_total_export',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'grand_total_export',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
- 'width': '200px'
+ 'width': u'200px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'rounded_total_export',
- 'fieldtype': 'Currency',
- 'label': 'Rounded Total (Export)',
+ 'doctype': u'DocField',
+ 'fieldname': u'rounded_total_export',
+ 'fieldtype': u'Currency',
+ 'label': u'Rounded Total',
'no_copy': 0,
- 'oldfieldname': 'rounded_total_export',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'rounded_total_export',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
- 'width': '200px'
+ 'width': u'200px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'In Words (Export) will be visible once you save the Quotation.',
- 'doctype': 'DocField',
- 'fieldname': 'in_words_export',
- 'fieldtype': 'Data',
- 'label': 'In Words (Export)',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'in_words_export',
+ 'fieldtype': u'Data',
+ 'label': u'In Words',
'no_copy': 0,
- 'oldfieldname': 'in_words_export',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'in_words_export',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
- 'width': '200px'
+ 'width': u'200px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Add Terms and Conditions for the Quotation like Payment Terms, Validity of Offer etc. You can also prepare a master Term Sheet and use the Template',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Terms',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Add Terms and Conditions for the Quotation like Payment Terms, Validity of Offer etc. You can also prepare a master Term Sheet and use the Template',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Terms',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 0
},
# DocField
{
- 'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'letter_head',
- 'fieldtype': 'Select',
- 'label': 'Letter Head',
- 'oldfieldname': 'letter_head',
- 'oldfieldtype': 'Select',
- 'options': 'link:Letter Head',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'tc_name',
- 'fieldtype': 'Link',
- 'label': 'Select Terms',
- 'oldfieldname': 'tc_name',
- 'oldfieldtype': 'Link',
- 'options': 'Term',
+ 'doctype': u'DocField',
+ 'fieldname': u'tc_name',
+ 'fieldtype': u'Link',
+ 'label': u'Select Terms',
+ 'oldfieldname': u'tc_name',
+ 'oldfieldtype': u'Link',
+ 'options': u'Term',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
@@ -980,79 +910,93 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Get Terms',
- 'oldfieldtype': 'Button',
- 'options': 'get_tc_details',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Terms',
+ 'oldfieldtype': u'Button',
+ 'options': u'get_tc_details',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'Terms HTML',
- 'oldfieldtype': 'HTML',
- 'options': 'You can add Terms and Notes that will be printed in the Transaction',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Terms HTML',
+ 'oldfieldtype': u'HTML',
+ 'options': u'You can add Terms and Notes that will be printed in the Transaction',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'terms',
- 'fieldtype': 'Text Editor',
- 'label': 'Term Details',
- 'oldfieldname': 'terms',
- 'oldfieldtype': 'Text Editor',
+ 'doctype': u'DocField',
+ 'fieldname': u'terms',
+ 'fieldtype': u'Text Editor',
+ 'label': u'Term Details',
+ 'oldfieldname': u'terms',
+ 'oldfieldtype': u'Text Editor',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Filling in additional information about the Quotation will help you analyze your data better.',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'More Info',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Filling in additional information about the Quotation will help you analyze your data better.',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'More Info',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Select the relevant company name if you have multiple companies.',
- 'doctype': 'DocField',
- 'fieldname': 'company',
- 'fieldtype': 'Link',
+ 'allow_on_submit': 1,
+ 'doctype': u'DocField',
+ 'fieldname': u'letter_head',
+ 'fieldtype': u'Select',
+ 'label': u'Letter Head',
+ 'oldfieldname': u'letter_head',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Letter Head',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Select the relevant company name if you have multiple companies.',
+ 'doctype': u'DocField',
+ 'fieldname': u'company',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Company',
- 'oldfieldname': 'company',
- 'oldfieldtype': 'Link',
- 'options': 'Company',
+ 'label': u'Company',
+ 'oldfieldname': u'company',
+ 'oldfieldtype': u'Link',
+ 'options': u'Company',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0,
- 'trigger': 'Client',
- 'width': '150px'
+ 'trigger': u'Client',
+ 'width': u'150px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'fiscal_year',
- 'fieldtype': 'Select',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'fiscal_year',
+ 'fieldtype': u'Select',
'in_filter': 1,
- 'label': 'Fiscal Year',
- 'oldfieldname': 'fiscal_year',
- 'oldfieldtype': 'Select',
- 'options': 'link:Fiscal Year',
+ 'label': u'Fiscal Year',
+ 'oldfieldname': u'fiscal_year',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Fiscal Year',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
@@ -1061,15 +1005,15 @@
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'enq_det',
- 'fieldtype': 'Text',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'enq_det',
+ 'fieldtype': u'Text',
'hidden': 1,
- 'label': 'Enquiry Detail',
+ 'label': u'Enquiry Detail',
'no_copy': 0,
- 'oldfieldname': 'enq_det',
- 'oldfieldtype': 'Text',
+ 'oldfieldname': u'enq_det',
+ 'oldfieldtype': u'Text',
'permlevel': 1,
'print_hide': 1,
'report_hide': 0
@@ -1077,16 +1021,16 @@
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'source',
- 'fieldtype': 'Select',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'source',
+ 'fieldtype': u'Select',
'hidden': 0,
- 'label': 'Source',
+ 'label': u'Source',
'no_copy': 0,
- 'oldfieldname': 'source',
- 'oldfieldtype': 'Select',
- 'options': "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
+ 'oldfieldname': u'source',
+ 'oldfieldtype': u'Select',
+ 'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
'permlevel': 0,
'print_hide': 1,
'report_hide': 0
@@ -1094,16 +1038,16 @@
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'campaign',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'campaign',
+ 'fieldtype': u'Link',
'hidden': 0,
- 'label': 'Campaign',
+ 'label': u'Campaign',
'no_copy': 0,
- 'oldfieldname': 'campaign',
- 'oldfieldtype': 'Link',
- 'options': 'Campaign',
+ 'oldfieldname': u'campaign',
+ 'oldfieldtype': u'Link',
+ 'options': u'Campaign',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0
@@ -1111,15 +1055,54 @@
# DocField
{
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'cancel_reason',
+ 'fieldtype': u'Data',
+ 'label': u'Cancel Reason',
+ 'no_copy': 1,
+ 'oldfieldname': u'cancel_reason',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'report_hide': 0
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'order_lost_reason',
+ 'fieldtype': u'Small Text',
+ 'label': u'Order Lost Reason',
+ 'no_copy': 1,
+ 'oldfieldname': u'order_lost_reason',
+ 'oldfieldtype': u'Small Text',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'select_print_heading',
- 'fieldtype': 'Link',
- 'label': 'Select Print Heading',
+ 'doctype': u'DocField',
+ 'fieldname': u'select_print_heading',
+ 'fieldtype': u'Link',
+ 'label': u'Select Print Heading',
'no_copy': 1,
- 'oldfieldname': 'select_print_heading',
- 'oldfieldtype': 'Link',
- 'options': 'Print Heading',
+ 'oldfieldname': u'select_print_heading',
+ 'oldfieldtype': u'Link',
+ 'options': u'Print Heading',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
@@ -1127,105 +1110,66 @@
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'cancel_reason',
- 'fieldtype': 'Data',
- 'label': 'Cancel Reason',
- 'no_copy': 1,
- 'oldfieldname': 'cancel_reason',
- 'oldfieldtype': 'Data',
- 'permlevel': 1,
- 'print_hide': 1,
- 'report_hide': 0
+ 'description': u'Your sales person who will contact the customer/lead in future',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_by',
+ 'fieldtype': u'Link',
+ 'label': u'Next Contact By',
+ 'oldfieldname': u'contact_by',
+ 'oldfieldtype': u'Link',
+ 'options': u'Profile',
+ 'permlevel': 0,
+ 'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'order_lost_reason',
- 'fieldtype': 'Small Text',
- 'label': 'Order Lost Reason',
+ 'description': u'Your sales person will get a reminder on this date to contact the customer/lead',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_date',
+ 'fieldtype': u'Date',
+ 'label': u'Next Contact Date',
+ 'oldfieldname': u'contact_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Date on which the lead/customer was last contacted',
+ 'doctype': u'DocField',
+ 'fieldname': u'last_contact_date',
+ 'fieldtype': u'Date',
+ 'label': u'Last Contact Date',
'no_copy': 1,
- 'oldfieldname': 'order_lost_reason',
- 'oldfieldtype': 'Small Text',
+ 'oldfieldname': u'last_contact_date',
+ 'oldfieldtype': u'Date',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
- 'permlevel': 0,
- 'print_hide': 1,
- 'width': '50%'
- },
-
- # DocField
- {
- 'description': 'Your sales person who will contact the customer/lead in future',
- 'doctype': 'DocField',
- 'fieldname': 'contact_by',
- 'fieldtype': 'Link',
- 'label': 'Next Contact By',
- 'oldfieldname': 'contact_by',
- 'oldfieldtype': 'Link',
- 'options': 'Profile',
+ 'doctype': u'DocField',
+ 'fieldname': u'to_discuss',
+ 'fieldtype': u'Small Text',
+ 'label': u'To Discuss',
+ 'oldfieldname': u'to_discuss',
+ 'oldfieldtype': u'Small Text',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'description': 'Your sales person will get a reminder on this date to contact the customer/lead',
- 'doctype': 'DocField',
- 'fieldname': 'contact_date',
- 'fieldtype': 'Date',
- 'label': 'Next Contact Date',
- 'oldfieldname': 'contact_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Date on which the lead/customer was last contacted',
- 'doctype': 'DocField',
- 'fieldname': 'last_contact_date',
- 'fieldtype': 'Date',
- 'label': 'Last Contact Date',
- 'no_copy': 1,
- 'oldfieldname': 'last_contact_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'to_discuss',
- 'fieldtype': 'Small Text',
- 'label': 'To Discuss',
- 'oldfieldname': 'to_discuss',
- 'oldfieldtype': 'Small Text',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Keep a track on communications regarding this Quotation. This will help you remember earlier communications in case the Customer comes back again',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Communication History',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Keep a track on communications regarding this Quotation. This will help you remember earlier communications in case the Customer comes back again',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Communication History',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 1
},
@@ -1233,27 +1177,27 @@
# DocField
{
'allow_on_submit': 1,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'follow_up',
- 'fieldtype': 'Table',
- 'label': 'Follow up',
- 'oldfieldname': 'follow_up',
- 'oldfieldtype': 'Table',
- 'options': 'Follow up',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'follow_up',
+ 'fieldtype': u'Table',
+ 'label': u'Follow up',
+ 'oldfieldname': u'follow_up',
+ 'oldfieldtype': u'Table',
+ 'options': u'Follow up',
'permlevel': 0,
'print_hide': 1,
- 'width': '40px'
+ 'width': u'40px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'file_list',
- 'fieldtype': 'Small Text',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'file_list',
+ 'fieldtype': u'Small Text',
'hidden': 1,
- 'label': 'File List',
+ 'label': u'File List',
'no_copy': 1,
'permlevel': 0,
'print_hide': 1
diff --git a/erpnext/selling/doctype/quotation_detail/quotation_detail.txt b/erpnext/selling/doctype/quotation_detail/quotation_detail.txt
index 23c86fa..8c78f48 100644
--- a/erpnext/selling/doctype/quotation_detail/quotation_detail.txt
+++ b/erpnext/selling/doctype/quotation_detail/quotation_detail.txt
@@ -5,343 +5,330 @@
{
'creation': '2010-08-08 17:09:18',
'docstatus': 0,
- 'modified': '2011-02-23 11:28:36',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-24 13:21:21',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocType
{
- 'autoname': 'QUOD/.#####',
- 'colour': 'White:FFF',
+ 'autoname': u'QUOD/.#####',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
'is_transaction_doc': 0,
'istable': 1,
- 'module': 'Selling',
+ 'module': u'Selling',
'name': '__common__',
- 'section_style': 'Tray',
- 'server_code_error': ' ',
+ 'section_style': u'Tray',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'version': 26
+ 'version': 30
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Quotation Detail',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'Quotation Detail',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# DocType, Quotation Detail
{
'doctype': 'DocType',
- 'name': 'Quotation Detail'
+ 'name': u'Quotation Detail'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_code',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_code',
+ 'fieldtype': u'Link',
'hidden': 0,
- 'idx': 1,
'in_filter': 1,
- 'label': 'Item Code',
- 'oldfieldname': 'item_code',
- 'oldfieldtype': 'Link',
- 'options': 'Item',
+ 'label': u'Item Code',
+ 'oldfieldname': u'item_code',
+ 'oldfieldtype': u'Link',
+ 'options': u'Item',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
'search_index': 1,
- 'trigger': 'Client',
- 'width': '150px'
+ 'trigger': u'Client',
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_name',
- 'fieldtype': 'Data',
- 'idx': 2,
+ 'doctype': u'DocField',
+ 'fieldname': u'item_name',
+ 'fieldtype': u'Data',
'in_filter': 1,
- 'label': 'Item Name',
- 'oldfieldname': 'item_name',
- 'oldfieldtype': 'Data',
+ 'label': u'Item Name',
+ 'oldfieldname': u'item_name',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'search_index': 0,
- 'width': '150px'
+ 'search_index': 1,
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'description',
- 'fieldtype': 'Small Text',
- 'idx': 3,
- 'label': 'Description',
- 'oldfieldname': 'description',
- 'oldfieldtype': 'Small Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'description',
+ 'fieldtype': u'Small Text',
+ 'label': u'Description',
+ 'oldfieldname': u'description',
+ 'oldfieldtype': u'Small Text',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
- 'width': '300px'
+ 'width': u'300px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'qty',
- 'fieldtype': 'Currency',
- 'idx': 4,
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'ref_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Price List Rate',
+ 'oldfieldname': u'ref_rate',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 0,
+ 'trigger': u'Client',
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'adj_rate',
+ 'fieldtype': u'Float',
+ 'label': u'Discount (%)',
+ 'oldfieldname': u'adj_rate',
+ 'oldfieldtype': u'Float',
+ 'permlevel': 0,
+ 'print_hide': 0,
+ 'trigger': u'Client',
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'export_rate',
+ 'fieldtype': u'Currency',
'in_filter': 0,
- 'label': 'Quantity',
- 'oldfieldname': 'qty',
- 'oldfieldtype': 'Currency',
+ 'label': u'Rate',
+ 'oldfieldname': u'export_rate',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 0,
+ 'print_hide': 0,
+ 'reqd': 0,
+ 'search_index': 0,
+ 'trigger': u'Client',
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'qty',
+ 'fieldtype': u'Currency',
+ 'in_filter': 0,
+ 'label': u'Quantity',
+ 'oldfieldname': u'qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
'search_index': 0,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'stock_uom',
- 'fieldtype': 'Data',
- 'idx': 5,
- 'label': 'UOM',
- 'oldfieldname': 'stock_uom',
- 'oldfieldtype': 'Data',
- 'permlevel': 1,
- 'reqd': 0,
- 'width': '100px'
- },
-
- # DocField
- {
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'ref_rate',
- 'fieldtype': 'Currency',
- 'idx': 6,
- 'label': 'Ref Rate',
- 'oldfieldname': 'ref_rate',
- 'oldfieldtype': 'Currency',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 0,
- 'trigger': 'Client',
- 'width': '100px'
- },
-
- # DocField
- {
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'adj_rate',
- 'fieldtype': 'Float',
- 'idx': 7,
- 'label': 'Discount (%)',
- 'oldfieldname': 'adj_rate',
- 'oldfieldtype': 'Float',
- 'permlevel': 0,
- 'print_hide': 1,
- 'trigger': 'Client',
- 'width': '100px'
- },
-
- # DocField
- {
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'export_rate',
- 'fieldtype': 'Currency',
- 'idx': 8,
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'export_amount',
+ 'fieldtype': u'Currency',
'in_filter': 0,
- 'label': 'Rate',
- 'oldfieldname': 'export_rate',
- 'oldfieldtype': 'Currency',
- 'permlevel': 0,
- 'print_hide': 0,
- 'reqd': 0,
- 'search_index': 0,
- 'trigger': 'Client',
- 'width': '100px'
- },
-
- # DocField
- {
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'export_amount',
- 'fieldtype': 'Currency',
- 'idx': 9,
- 'in_filter': 0,
- 'label': 'Amount',
- 'oldfieldname': 'export_amount',
- 'oldfieldtype': 'Currency',
+ 'label': u'Amount',
+ 'oldfieldname': u'export_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
'search_index': 0,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'base_ref_rate',
- 'fieldtype': 'Currency',
- 'idx': 10,
- 'label': 'Ref Rate*',
- 'oldfieldname': 'base_ref_rate',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'base_ref_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Price List Rate*',
+ 'oldfieldname': u'base_ref_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'basic_rate',
- 'fieldtype': 'Currency',
- 'idx': 11,
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'basic_rate',
+ 'fieldtype': u'Currency',
'in_filter': 0,
- 'label': 'Basic Rate*',
- 'oldfieldname': 'basic_rate',
- 'oldfieldtype': 'Currency',
+ 'label': u'Basic Rate*',
+ 'oldfieldname': u'basic_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
'search_index': 0,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'amount',
- 'fieldtype': 'Currency',
- 'idx': 12,
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'stock_uom',
+ 'fieldtype': u'Data',
+ 'label': u'UOM',
+ 'oldfieldname': u'stock_uom',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 0,
+ 'reqd': 0,
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'amount',
+ 'fieldtype': u'Currency',
'in_filter': 0,
- 'label': 'Amount*',
- 'oldfieldname': 'amount',
- 'oldfieldtype': 'Currency',
+ 'label': u'Amount*',
+ 'oldfieldname': u'amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 0,
'search_index': 0,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_group',
- 'fieldtype': 'Link',
- 'idx': 13,
+ 'doctype': u'DocField',
+ 'fieldname': u'item_group',
+ 'fieldtype': u'Link',
+ 'hidden': 1,
'in_filter': 1,
- 'label': 'Item Group',
- 'oldfieldname': 'item_group',
- 'oldfieldtype': 'Link',
- 'options': 'Item Group',
+ 'label': u'Item Group',
+ 'oldfieldname': u'item_group',
+ 'oldfieldtype': u'Link',
+ 'options': u'Item Group',
'permlevel': 1,
'print_hide': 1,
- 'search_index': 0
+ 'search_index': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'brand',
- 'fieldtype': 'Link',
- 'idx': 14,
+ 'doctype': u'DocField',
+ 'fieldname': u'brand',
+ 'fieldtype': u'Link',
+ 'hidden': 1,
'in_filter': 1,
- 'label': 'Brand',
- 'oldfieldname': 'brand',
- 'oldfieldtype': 'Link',
- 'options': 'Brand',
+ 'label': u'Brand',
+ 'oldfieldname': u'brand',
+ 'oldfieldtype': u'Link',
+ 'options': u'Brand',
'permlevel': 1,
'print_hide': 1,
- 'search_index': 0,
- 'width': '150px'
+ 'search_index': 1,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'item_tax_rate',
+ 'fieldtype': u'Small Text',
+ 'hidden': 1,
+ 'label': u'Item Tax Rate',
+ 'oldfieldname': u'item_tax_rate',
+ 'oldfieldtype': u'Small Text',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'report_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'prevdoc_docname',
+ 'fieldtype': u'Data',
+ 'label': u'Against Docname',
+ 'no_copy': 1,
+ 'oldfieldname': u'prevdoc_docname',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'report_hide': 0,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'prevdoc_doctype',
+ 'fieldtype': u'Data',
+ 'hidden': 1,
+ 'label': u'Against Doctype',
+ 'no_copy': 1,
+ 'oldfieldname': u'prevdoc_doctype',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'report_hide': 0,
+ 'width': u'150px'
},
# DocField
{
'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'page_break',
- 'fieldtype': 'Check',
+ 'doctype': u'DocField',
+ 'fieldname': u'page_break',
+ 'fieldtype': u'Check',
'hidden': 0,
- 'idx': 15,
- 'label': 'Page Break',
+ 'label': u'Page Break',
'no_copy': 1,
- 'oldfieldname': 'page_break',
- 'oldfieldtype': 'Check',
+ 'oldfieldname': u'page_break',
+ 'oldfieldtype': u'Check',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'item_tax_rate',
- 'fieldtype': 'Small Text',
- 'hidden': 1,
- 'idx': 16,
- 'label': 'Item Tax Rate',
- 'oldfieldname': 'item_tax_rate',
- 'oldfieldtype': 'Small Text',
- 'permlevel': 1,
- 'print_hide': 1,
- 'report_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'prevdoc_docname',
- 'fieldtype': 'Data',
- 'idx': 17,
- 'label': 'Against Docname',
- 'no_copy': 1,
- 'oldfieldname': 'prevdoc_docname',
- 'oldfieldtype': 'Data',
- 'permlevel': 1,
- 'print_hide': 1,
- 'report_hide': 0,
- 'width': '150px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'prevdoc_doctype',
- 'fieldtype': 'Data',
- 'hidden': 1,
- 'idx': 18,
- 'label': 'Against Doctype',
- 'no_copy': 1,
- 'oldfieldname': 'prevdoc_doctype',
- 'oldfieldtype': 'Data',
- 'permlevel': 1,
- 'print_hide': 1,
- 'report_hide': 0,
- 'width': '150px'
}
]
\ No newline at end of file
diff --git a/erpnext/selling/doctype/sales_common/sales_common.js b/erpnext/selling/doctype/sales_common/sales_common.js
index cdcec5b..b9bff5c 100644
--- a/erpnext/selling/doctype/sales_common/sales_common.js
+++ b/erpnext/selling/doctype/sales_common/sales_common.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// Preset
// ------
// cur_frm.cscript.tname - Details table name
@@ -45,7 +61,7 @@
doc = locals[doc.doctype][doc.name];
if(!cur_frm.doc.__islocal) return;
var children = getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname);
- if(children) {
+ if(children.length) {
$c_obj(make_doclist(doc.doctype, doc.name), 'get_item_details', '',
function(r, rt) {
if(!r.exc) {
@@ -58,14 +74,6 @@
}
-// -----------------
-// Shipping Address
-// -----------------
-
-cur_frm.add_fetch('company', 'default_currency', 'currency');
-cur_frm.add_fetch('company', 'default_currency', 'price_list_currency');
-
-
// ============== Customer and its primary contact Details ============================
cur_frm.cscript.customer = function(doc, cdt, cdn) {
@@ -83,6 +91,91 @@
}
}
+
+var set_dynamic_label_par = function(doc, cdt, cdn, base_curr) {
+ //parent flds
+ par_cols_base = {'net_total': 'Net Total', 'other_charges_total': 'Other Charges Total',
+ 'grand_total': 'Grand Total', 'rounded_total': 'Rounded Total', 'in_words': 'In Words'}
+ par_cols_export = {'grand_total_export': 'Grand Total', 'rounded_total_export': 'Rounded Total', 'in_words_export': 'In Words'};
+
+ for (d in par_cols_base) cur_frm.fields_dict[d].label_area.innerHTML = par_cols_base[d]+' (' + base_curr + ')';
+ for (d in par_cols_export) cur_frm.fields_dict[d].label_area.innerHTML = par_cols_export[d]+' (' + doc.currency + ')';
+ cur_frm.fields_dict['conversion_rate'].label_area.innerHTML = "Conversion Rate (" + doc.currency +' -> '+ base_curr + ')';
+ cur_frm.fields_dict['plc_conversion_rate'].label_area.innerHTML = 'Price List Currency Conversion Rate (' + doc.price_list_currency +' -> '+ base_curr + ')';
+
+ if (doc.doctype == 'Receivable Voucher') {
+ cur_frm.fields_dict['total_advance'].label_area.innerHTML = 'Total Advance (' + base_curr + ')';
+ cur_frm.fields_dict['outstanding_amount'].label_area.innerHTML = 'Outstanding Amount (' + base_curr + ')';
+ }
+}
+
+
+var set_dynamic_label_child = function(doc, cdt, cdn, base_curr) {
+ // item table flds
+ item_cols_base = {'basic_rate': 'Basic Rate', 'base_ref_rate': 'Price List Rate', 'amount': 'Amount'};
+ item_cols_export = {'export_rate': 'Basic Rate', 'ref_rate': 'Price List Rate', 'export_amount': 'Amount'};
+
+ for (d in item_cols_base) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_base[d]+' ('+base_curr+')');
+ for (d in item_cols_export) $('[data-grid-fieldname="'+cur_frm.cscript.tname+'-'+d+'"]').html(item_cols_export[d]+' ('+doc.currency+')');
+
+ var hide = (doc.currency == sys_defaults['currency']) ? false : true;
+ for (f in item_cols_base) cur_frm.fields_dict[cur_frm.cscript.fname].grid.set_column_disp(f, hide);
+
+ //tax table flds
+ tax_cols = {'tax_amount': 'Amount', 'total': 'Total'};
+ for (d in tax_cols) $('[data-grid-fieldname="RV Tax Detail-'+d+'"]').html(tax_cols[d]+' ('+base_curr+')');
+
+ if (doc.doctype == 'Receivable Voucher') {
+ // advance table flds
+ adv_cols = {'advance_amount': 'Advance Amount', 'allocated_amount': 'Allocated Amount'}
+ for (d in adv_cols) $('[data-grid-fieldname="Advance Adjustment Detail-'+d+'"]').html(adv_cols[d]+' ('+base_curr+')');
+ }
+}
+
+// Change label dynamically based on currency
+//------------------------------------------------------------------
+
+cur_frm.cscript.dynamic_label = function(doc, cdt, cdn, base_curr, callback) {
+ set_dynamic_label_par(doc, cdt, cdn, base_curr);
+ set_dynamic_label_child(doc, cdt, cdn, base_curr);
+
+ if (callback) callback(doc, cdt, cdn);
+}
+
+
+// hide / unhide price list currency based on availability of price list in customer's currency
+//---------------------------------------------------------------------------------------------------
+
+cur_frm.cscript.hide_price_list_currency = function(doc, cdt, cdn, callback1) {
+ if (doc.price_list_name && doc.currency) {
+ wn.call({
+ method: 'selling.doctype.sales_common.sales_common.get_price_list_currency',
+ args: {'price_list':doc.price_list_name, 'company': doc.company},
+ callback: function(r, rt) {
+ pl_currency = r.message[0]?r.message[0]:[];
+ if (pl_currency.length==1) {
+ if (pl_currency[0] == doc.currency) set_multiple(cdt, cdn, {price_list_currency:doc.currency, plc_conversion_rate:doc.conversion_rate});
+ else if (pl_currency[0] = r.message[1]) set_multiple(cdt, cdn, {price_list_currency:pl_currency[0], plc_conversion_rate:1})
+ hide_field(['price_list_currency', 'plc_conversion_rate']);
+ } else unhide_field(['price_list_currency', 'plc_conversion_rate']);
+
+ if (r.message[1] == doc.currency) {
+ set_multiple(cdt, cdn, {conversion_rate:1});
+ hide_field(['conversion_rate', 'grand_total_export', 'in_words_export', 'rounded_total_export']);
+ } else unhide_field(['conversion_rate', 'grand_total_export', 'in_words_export', 'rounded_total_export']);
+
+ if (r.message[1] == doc.price_list_currency) {
+ set_multiple(cdt, cdn, {plc_conversion_rate:1});
+ hide_field('plc_conversion_rate');
+ } else unhide_field('plc_conversion_rate');
+
+ cur_frm.cscript.dynamic_label(doc, cdt, cdn, r.message[1], callback1);
+ }
+ })
+ }
+}
+
+
//====================opens territory tree page ==================
cur_frm.cscript.TerritoryHelp = function(doc,dt,dn){
var call_back = function(){
@@ -107,29 +200,44 @@
// =====================================================================================================
// ********************* CURRENCY ******************************
-cur_frm.cscript.currency = function(doc, cdt, cdn) {
- cur_frm.cscript.price_list_name(doc, cdt, cdn);
+cur_frm.cscript.currency = function(doc, cdt, cdn) {
+ cur_frm.cscript.price_list_name(doc, cdt, cdn);
}
cur_frm.cscript.price_list_currency = cur_frm.cscript.currency;
cur_frm.cscript.conversion_rate = cur_frm.cscript.currency;
cur_frm.cscript.plc_conversion_rate = cur_frm.cscript.currency;
+cur_frm.cscript.company = function(doc, dt, dn) {
+ wn.call({
+ method: 'selling.doctype.sales_common.sales_common.get_comp_base_currency',
+ args: {company:doc.company},
+ callback: function(r, rt) {
+ var doc = locals[dt][dn];
+ set_multiple(doc.doctype, doc.name, {currency:r.message, price_list_currency:r.message});
+ cur_frm.cscript.currency(doc, cdt, cdn);
+ }
+ });
+}
+
// ******************** PRICE LIST ******************************
cur_frm.cscript.price_list_name = function(doc, cdt, cdn) {
- var fname = cur_frm.cscript.fname;
- var cl = getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname);
- if(doc.price_list_name && doc.currency && doc.price_list_currency && doc.conversion_rate && doc.plc_conversion_rate && cl.length) {
- $c_obj(make_doclist(doc.doctype, doc.name), 'get_adj_percent', '',
- function(r, rt) {
- refresh_field(fname);
- var doc = locals[cdt][cdn];
- cur_frm.cscript.recalc(doc,3); //this is to re-calculate BASIC RATE and AMOUNT on basis of changed REF RATE
- }
- );
+ var callback = function() {
+ var fname = cur_frm.cscript.fname;
+ var cl = getchildren(cur_frm.cscript.tname, doc.name, cur_frm.cscript.fname);
+ if(doc.price_list_name && doc.currency && doc.price_list_currency && doc.conversion_rate && doc.plc_conversion_rate) {
+ $c_obj(make_doclist(doc.doctype, doc.name), 'get_adj_percent', '',
+ function(r, rt) {
+ refresh_field(fname);
+ var doc = locals[cdt][cdn];
+ cur_frm.cscript.recalc(doc,3); //this is to re-calculate BASIC RATE and AMOUNT on basis of changed REF RATE
+ }
+ );
+ }
}
+ cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn, callback);
}
@@ -155,7 +263,8 @@
var callback = function(r, rt){
cur_frm.cscript.recalc(doc, 1);
}
- get_server_fields('get_item_details',d.item_code, fname,doc,cdt,cdn,1,callback);
+ var args = {'item_code':d.item_code, 'income_account':d.income_account, 'cost_center': d.cost_center, 'warehouse': d.warehouse};
+ get_server_fields('get_item_details',JSON.stringify(args), fname,doc,cdt,cdn,1,callback);
}
}
if(cur_frm.cscript.custom_item_code){
diff --git a/erpnext/selling/doctype/sales_common/sales_common.py b/erpnext/selling/doctype/sales_common/sales_common.py
index 2ae1ab3..a5017c2 100644
--- a/erpnext/selling/doctype/sales_common/sales_common.py
+++ b/erpnext/selling/doctype/sales_common/sales_common.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
@@ -108,13 +124,13 @@
# Get Item Details
# ===============================================================
- def get_item_details(self, item_code, obj):
+ def get_item_details(self, args, obj):
import json
if not obj.doc.price_list_name:
msgprint("Please Select Price List before selecting Items")
raise Exception
- item = webnotes.conn.sql("select description, item_name, brand, item_group, stock_uom, default_warehouse, default_income_account, default_sales_cost_center, description_html from `tabItem` where name = '%s' and (ifnull(end_of_life,'')='' or end_of_life > now() or end_of_life = '0000-00-00') and (is_sales_item = 'Yes' or is_service_item = 'Yes')" % (item_code), as_dict=1)
- tax = webnotes.conn.sql("select tax_type, tax_rate from `tabItem Tax` where parent = %s" , item_code)
+ item = webnotes.conn.sql("select description, item_name, brand, item_group, stock_uom, default_warehouse, default_income_account, default_sales_cost_center, description_html from `tabItem` where name = '%s' and (ifnull(end_of_life,'')='' or end_of_life > now() or end_of_life = '0000-00-00') and (is_sales_item = 'Yes' or is_service_item = 'Yes')" % (args['item_code']), as_dict=1)
+ tax = webnotes.conn.sql("select tax_type, tax_rate from `tabItem Tax` where parent = %s" , args['item_code'])
t = {}
for x in tax: t[x[0]] = flt(x[1])
ret = {
@@ -124,9 +140,9 @@
'brand' : item and item[0]['brand'] or '',
'stock_uom' : item and item[0]['stock_uom'] or '',
'reserved_warehouse' : item and item[0]['default_warehouse'] or '',
- 'warehouse' : item and item[0]['default_warehouse'] or '',
- 'income_account' : item and item[0]['default_income_account'] or '',
- 'cost_center' : item and item[0]['default_sales_cost_center'] or '',
+ 'warehouse' : item and item[0]['default_warehouse'] or args.get('warehouse'),
+ 'income_account' : item and item[0]['default_income_account'] or args.get('income_account'),
+ 'cost_center' : item and item[0]['default_sales_cost_center'] or args.get('cost_center'),
'qty' : 1.00, # this is done coz if item once fetched is fetched again thn its qty shld be reset to 1
'adj_rate' : 0,
'amount' : 0,
@@ -135,7 +151,7 @@
'batch_no' : ''
}
if(obj.doc.price_list_name and item): #this is done to fetch the changed BASIC RATE and REF RATE based on PRICE LIST
- base_ref_rate = self.get_ref_rate(item_code, obj.doc.price_list_name, obj.doc.price_list_currency, obj.doc.plc_conversion_rate)
+ base_ref_rate = self.get_ref_rate(args['item_code'], obj.doc.price_list_name, obj.doc.price_list_currency, obj.doc.plc_conversion_rate)
ret['ref_rate'] = flt(base_ref_rate)/flt(obj.doc.conversion_rate)
ret['export_rate'] = flt(base_ref_rate)/flt(obj.doc.conversion_rate)
ret['base_ref_rate'] = flt(base_ref_rate)
@@ -158,6 +174,8 @@
d.basic_rate = flt(base_ref_rate)
d.base_ref_rate = flt(base_ref_rate)
d.export_rate = flt(base_ref_rate)/flt(obj.doc.conversion_rate)
+ d.amount = flt(d.qty)*flt(base_ref_rate)
+ d.export_amount = flt(d.qty)*flt(base_ref_rate)/flt(obj.doc.conversion_rate)
# Load Default Taxes
@@ -751,3 +769,17 @@
where
name="%(name)s"
""" % args)
+
+
+@webnotes.whitelist()
+def get_comp_base_currency(arg=None):
+ """ get default currency of company"""
+ return webnotes.conn.sql("select default_currency from `tabCompany` where name = %s", webnotes.form_dict['company'])[0][0]
+
+@webnotes.whitelist()
+def get_price_list_currency(arg=None):
+ """ Get all currency in which price list is maintained"""
+ plc = webnotes.conn.sql("select distinct ref_currency from `tabRef Rate Detail` where price_list_name = %s", webnotes.form_dict['price_list'])
+ plc = [d[0] for d in plc]
+ base_currency = get_comp_base_currency(webnotes.form_dict['company'])
+ return plc, base_currency
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index f5f8b58..a04423d 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// Module CRM
cur_frm.cscript.tname = "Sales Order Detail";
@@ -22,21 +38,29 @@
if(doc.__islocal){
hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','shipping_address']);
}
-
}
cur_frm.cscript.onload_post_render = function(doc, cdt, cdn) {
- if(doc.__islocal) {
- // defined in sales_common.js
- cur_frm.cscript.update_item_details(doc, cdt, cdn, callback);
+ var callback = function(doc, cdt, cdn) {
+ if(doc.__islocal) {
+ // defined in sales_common.js
+ cur_frm.cscript.update_item_details(doc, cdt, cdn);
+ }
}
+
+ cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn, callback);
+
}
+
// Refresh
//==================
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.clear_custom_buttons();
-
+
+ if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn);
+
+
if(doc.docstatus==1) {
if(doc.status != 'Stopped') {
cur_frm.add_custom_button('Send SMS', cur_frm.cscript['Send SMS']);
@@ -82,7 +106,7 @@
}
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback);
- if(doc.customer) unhide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group','shipping_address']);
+ if(doc.customer) unhide_field(['customer_address', 'contact_person', 'customer_name', 'address_display', 'contact_display', 'contact_mobile', 'contact_email', 'territory','customer_group','shipping_address']);
}
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
@@ -135,13 +159,6 @@
// DOCTYPE TRIGGERS
// ================================================================================================
-/*
-// ***************** get shipping address based on customer selected *****************
-cur_frm.fields_dict['ship_det_no'].get_query = function(doc, cdt, cdn) {
- return 'SELECT `tabShipping Address`.`name`, `tabShipping Address`.`ship_to`, `tabShipping Address`.`shipping_address` FROM `tabShipping Address` WHERE `tabShipping Address`.customer = "'+ doc.customer+'" AND `tabShipping Address`.`docstatus` != 2 AND `tabShipping Address`.`name` LIKE "%s" ORDER BY `tabShipping Address`.name ASC LIMIT 50';
-}
-*/
-
// ***************** Get project name *****************
cur_frm.fields_dict['project_name'].get_query = function(doc, cdt, cdn) {
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index 7bd5cba..c886ec3 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
@@ -85,14 +101,17 @@
# ================================================================================
# Get Item Details
# ----------------
- def get_item_details(self, item_code=None):
- if item_code:
- return get_obj('Sales Common').get_item_details(item_code, self)
+ def get_item_details(self, args=None):
+ args = args and eval(args) or {}
+ if args.get('item_code'):
+ return get_obj('Sales Common').get_item_details(args, self)
else:
obj = get_obj('Sales Common')
for doc in self.doclist:
if doc.fields.get('item_code'):
- ret = obj.get_item_details(doc.item_code, self)
+ arg = {'item_code':doc.fields.get('item_code'), 'income_account':doc.fields.get('income_account'),
+ 'cost_center': doc.fields.get('cost_center'), 'warehouse': doc.fields.get('warehouse')};
+ ret = obj.get_item_details(arg, self)
for r in ret:
if not doc.fields.get(r):
doc.fields[r] = ret[r]
@@ -103,6 +122,8 @@
def get_adj_percent(self, arg=''):
get_obj('Sales Common').get_adj_percent(self)
+
+
# Get projected qty of item based on warehouse selected
# -----------------------------------------------------
def get_available_qty(self,args):
diff --git a/erpnext/selling/doctype/sales_order/sales_order.txt b/erpnext/selling/doctype/sales_order/sales_order.txt
index 0ff3ee0..a72b8df 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.txt
+++ b/erpnext/selling/doctype/sales_order/sales_order.txt
@@ -5,72 +5,72 @@
{
'creation': '2010-08-08 17:09:21',
'docstatus': 0,
- 'modified': '2012-01-09 16:52:34',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-27 17:07:40',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Sales Order',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'Sales Order',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# These values are common for all DocType
{
- '_last_update': '1325570646',
+ '_last_update': u'1330082514',
'allow_attach': 0,
- 'colour': 'White:FFF',
- 'default_print_format': 'Standard',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
- 'document_type': 'Transaction',
+ 'document_type': u'Transaction',
'is_transaction_doc': 1,
'issingle': 0,
- 'module': 'Selling',
+ 'module': u'Selling',
'name': '__common__',
'read_only_onload': 1,
- 'search_fields': 'status,transaction_date,customer,customer_name, territory,order_type,company',
- 'section_style': 'Tabbed',
- 'server_code_error': ' ',
+ 'search_fields': u'status,transaction_date,customer,customer_name, territory,order_type,company',
+ 'section_style': u'Tabbed',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'subject': 'From %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s | %(per_delivered)s% delivered | %(per_billed)s% billed',
- 'tag_fields': 'delivery_status,billing_status',
- 'version': 610
+ 'subject': u'From %(customer_name)s on %(transaction_date)s worth %(currency)s %(grand_total_export)s | %(per_delivered)s% delivered | %(per_billed)s% billed',
+ 'tag_fields': u'delivery_status,billing_status',
+ 'version': 629
},
# These values are common for all DocFormat
{
- 'doctype': 'DocFormat',
+ 'doctype': u'DocFormat',
'name': '__common__',
- 'parent': 'Sales Order',
- 'parentfield': 'formats',
- 'parenttype': 'DocType'
+ 'parent': u'Sales Order',
+ 'parentfield': u'formats',
+ 'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'name': '__common__',
- 'parent': 'Sales Order',
- 'parentfield': 'permissions',
- 'parenttype': 'DocType',
+ 'parent': u'Sales Order',
+ 'parentfield': u'permissions',
+ 'parenttype': u'DocType',
'read': 1
},
# DocType, Sales Order
{
'doctype': 'DocType',
- 'name': 'Sales Order'
+ 'name': u'Sales Order'
},
# DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Production Manager'
+ 'role': u'Production Manager'
},
# DocPerm
@@ -78,9 +78,9 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Sales Manager',
+ 'role': u'Sales Manager',
'submit': 0,
'write': 0
},
@@ -90,9 +90,9 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Sales Manager',
+ 'role': u'Sales Manager',
'submit': 1,
'write': 1
},
@@ -102,9 +102,9 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Sales User',
+ 'role': u'Sales User',
'submit': 1,
'write': 1
},
@@ -114,26 +114,26 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Sales User',
+ 'role': u'Sales User',
'submit': 0,
'write': 0
},
# DocPerm
{
- 'doctype': 'DocPerm',
- 'match': 'customer_name',
+ 'doctype': u'DocPerm',
+ 'match': u'customer_name',
'permlevel': 0,
- 'role': 'Customer'
+ 'role': u'Customer'
},
# DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 2,
- 'role': 'Accounts User',
+ 'role': u'Accounts User',
'write': 1
},
@@ -142,18 +142,18 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Maintenance Manager',
+ 'role': u'Maintenance Manager',
'submit': 1,
'write': 1
},
# DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Maintenance Manager'
+ 'role': u'Maintenance Manager'
},
# DocPerm
@@ -161,72 +161,72 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Maintenance User',
+ 'role': u'Maintenance User',
'submit': 1,
'write': 1
},
# DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Maintenance User'
+ 'role': u'Maintenance User'
},
# DocFormat
{
- 'doctype': 'DocFormat',
- 'format': 'Sales Order Classic'
+ 'doctype': u'DocFormat',
+ 'format': u'Sales Order Classic'
},
# DocFormat
{
- 'doctype': 'DocFormat',
- 'format': 'Sales Order Modern'
+ 'doctype': u'DocFormat',
+ 'format': u'Sales Order Modern'
},
# DocFormat
{
- 'doctype': 'DocFormat',
- 'format': 'Sales Order Spartan'
+ 'doctype': u'DocFormat',
+ 'format': u'Sales Order Spartan'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Basic Info',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Basic Info',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
'in_filter': 0,
- 'oldfieldtype': 'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
'search_index': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'To manage multiple series please go to Setup > Manage Series',
- 'doctype': 'DocField',
- 'fieldname': 'naming_series',
- 'fieldtype': 'Select',
- 'label': 'Series',
+ 'colour': u'White:FFF',
+ 'description': u'To manage multiple series please go to Setup > Manage Series',
+ 'doctype': u'DocField',
+ 'fieldname': u'naming_series',
+ 'fieldtype': u'Select',
+ 'label': u'Series',
'no_copy': 1,
- 'oldfieldname': 'naming_series',
- 'oldfieldtype': 'Select',
- 'options': 'PI/2011/\nSO\nSO/10-11/\nSO1112',
+ 'oldfieldname': u'naming_series',
+ 'oldfieldtype': u'Select',
+ 'options': u'PI/2011/\nSO\nSO/10-11/\nSO1112',
'permlevel': 0,
'print_hide': 1,
'reqd': 1
@@ -234,102 +234,268 @@
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Select Customer',
- 'doctype': 'DocField',
- 'fieldname': 'customer',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'description': u'Select Customer',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Customer',
- 'oldfieldname': 'customer',
- 'oldfieldtype': 'Link',
- 'options': 'Customer',
+ 'label': u'Customer',
+ 'oldfieldname': u'customer',
+ 'oldfieldtype': u'Link',
+ 'options': u'Customer',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'customer_address',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_address',
+ 'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
- 'label': 'Customer Address',
- 'options': 'Address',
+ 'label': u'Customer Address',
+ 'options': u'Address',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_person',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_person',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Contact Person',
- 'options': 'Contact',
+ 'label': u'Contact Person',
+ 'options': u'Contact',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'customer_name',
- 'fieldtype': 'Data',
- 'label': 'Name',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_name',
+ 'fieldtype': u'Data',
+ 'label': u'Name',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'address_display',
- 'fieldtype': 'Small Text',
- 'label': 'Address',
+ 'doctype': u'DocField',
+ 'fieldname': u'address_display',
+ 'fieldtype': u'Small Text',
+ 'label': u'Address',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_display',
- 'fieldtype': 'Small Text',
- 'label': 'Contact',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_display',
+ 'fieldtype': u'Small Text',
+ 'label': u'Contact',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_mobile',
- 'fieldtype': 'Text',
- 'label': 'Mobile No',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_mobile',
+ 'fieldtype': u'Text',
+ 'label': u'Mobile No',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_email',
- 'fieldtype': 'Text',
- 'label': 'Contact Email',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_email',
+ 'fieldtype': u'Text',
+ 'label': u'Contact Email',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'territory',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
+ 'default': u'Today',
+ 'description': u'The date at which current entry is made in system.',
+ 'doctype': u'DocField',
+ 'fieldname': u'transaction_date',
+ 'fieldtype': u'Date',
'in_filter': 1,
- 'label': 'Territory',
- 'options': 'Territory',
+ 'label': u'Sales Order Date',
+ 'no_copy': 1,
+ 'oldfieldname': u'transaction_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 0,
+ 'print_hide': 0,
+ 'reqd': 1,
+ 'search_index': 1,
+ 'width': u'160px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'default': u'Sales',
+ 'doctype': u'DocField',
+ 'fieldname': u'order_type',
+ 'fieldtype': u'Select',
+ 'label': u'Order Type',
+ 'oldfieldname': u'order_type',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nSales\nMaintenance',
+ 'permlevel': 0,
+ 'reqd': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'depends_on': u"eval:doc.order_type == 'Sales'",
+ 'doctype': u'DocField',
+ 'fieldname': u'delivery_date',
+ 'fieldtype': u'Date',
+ 'hidden': 0,
+ 'in_filter': 1,
+ 'label': u'Expected Delivery Date',
+ 'oldfieldname': u'delivery_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 0,
+ 'search_index': 1,
+ 'width': u'160px'
+ },
+
+ # DocField
+ {
+ 'default': u'Draft',
+ 'doctype': u'DocField',
+ 'fieldname': u'status',
+ 'fieldtype': u'Select',
+ 'in_filter': 1,
+ 'label': u'Status',
+ 'no_copy': 1,
+ 'oldfieldname': u'status',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nDraft\nSubmitted\nStopped\nCancelled',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'reqd': 1,
+ 'search_index': 1,
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Track this Sales Order against any Project',
+ 'doctype': u'DocField',
+ 'fieldname': u'project_name',
+ 'fieldtype': u'Link',
+ 'in_filter': 1,
+ 'label': u'Project Name',
+ 'oldfieldname': u'project_name',
+ 'oldfieldtype': u'Link',
+ 'options': u'Project',
+ 'permlevel': 0,
+ 'search_index': 1,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'description': u'% of materials delivered against this Sales Order',
+ 'doctype': u'DocField',
+ 'fieldname': u'per_delivered',
+ 'fieldtype': u'Currency',
+ 'in_filter': 1,
+ 'label': u'% Delivered',
+ 'no_copy': 1,
+ 'oldfieldname': u'per_delivered',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'description': u'% of materials billed against this Sales Order',
+ 'doctype': u'DocField',
+ 'fieldname': u'per_billed',
+ 'fieldtype': u'Currency',
+ 'in_filter': 1,
+ 'label': u'% Amount Billed',
+ 'no_copy': 1,
+ 'oldfieldname': u'per_billed',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'amended_from',
+ 'fieldtype': u'Data',
+ 'hidden': 1,
+ 'label': u'Amended From',
+ 'no_copy': 1,
+ 'oldfieldname': u'amended_from',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'The date at which current entry is corrected in the system.',
+ 'doctype': u'DocField',
+ 'fieldname': u'amendment_date',
+ 'fieldtype': u'Date',
+ 'hidden': 1,
+ 'label': u'Amendment Date',
+ 'no_copy': 1,
+ 'oldfieldname': u'amendment_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'territory',
+ 'fieldtype': u'Link',
+ 'in_filter': 1,
+ 'label': u'Territory',
+ 'options': u'Territory',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
@@ -338,13 +504,14 @@
# DocField
{
- 'description': 'Category of customer as entered in Customer master',
- 'doctype': 'DocField',
- 'fieldname': 'customer_group',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'description': u'Category of customer as entered in Customer master',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_group',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Customer Group',
- 'options': 'Customer Group',
+ 'label': u'Customer Group',
+ 'options': u'Customer Group',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
@@ -353,260 +520,64 @@
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Purchase Order sent by customer',
- 'doctype': 'DocField',
- 'fieldname': 'po_no',
- 'fieldtype': 'Data',
- 'hidden': 0,
- 'label': 'P.O. No',
- 'oldfieldname': 'po_no',
- 'oldfieldtype': 'Data',
- 'permlevel': 0,
- 'print_hide': 0,
- 'reqd': 0,
- 'width': '100px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'po_date',
- 'fieldtype': 'Date',
- 'hidden': 0,
- 'label': 'P.O. Date',
- 'oldfieldname': 'po_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 0,
- 'print_hide': 0,
- 'reqd': 0,
- 'width': '100px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
- 'permlevel': 0,
- 'width': '50%'
- },
-
- # DocField
- {
- 'default': 'Today',
- 'description': 'The date at which current entry is made in system.',
- 'doctype': 'DocField',
- 'fieldname': 'transaction_date',
- 'fieldtype': 'Date',
- 'in_filter': 1,
- 'label': 'Sales Order Date',
- 'no_copy': 1,
- 'oldfieldname': 'transaction_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 0,
- 'print_hide': 0,
- 'reqd': 1,
- 'search_index': 1,
- 'width': '160px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'order_type',
- 'fieldtype': 'Select',
- 'label': 'Order Type',
- 'oldfieldname': 'order_type',
- 'oldfieldtype': 'Select',
- 'options': '\nSales\nMaintenance',
- 'permlevel': 0,
- 'reqd': 1
- },
-
- # DocField
- {
- 'default': 'Draft',
- 'doctype': 'DocField',
- 'fieldname': 'status',
- 'fieldtype': 'Select',
- 'in_filter': 1,
- 'label': 'Status',
- 'no_copy': 1,
- 'oldfieldname': 'status',
- 'oldfieldtype': 'Select',
- 'options': '\nDraft\nSubmitted\nStopped\nCancelled',
- 'permlevel': 1,
- 'print_hide': 1,
- 'reqd': 1,
- 'search_index': 1,
- 'width': '100px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'delivery_date',
- 'fieldtype': 'Date',
- 'hidden': 0,
- 'in_filter': 1,
- 'label': 'Expected Delivery Date',
- 'oldfieldname': 'delivery_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 0,
- 'search_index': 1,
- 'width': '160px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Track this Sales Order against any Project',
- 'doctype': 'DocField',
- 'fieldname': 'project_name',
- 'fieldtype': 'Link',
- 'in_filter': 1,
- 'label': 'Project Name',
- 'oldfieldname': 'project_name',
- 'oldfieldtype': 'Link',
- 'options': 'Project',
- 'permlevel': 0,
- 'search_index': 1,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'depends_on': 'eval:!doc.__islocal',
- 'description': '% of materials delivered against this Sales Order',
- 'doctype': 'DocField',
- 'fieldname': 'per_delivered',
- 'fieldtype': 'Currency',
- 'in_filter': 1,
- 'label': '% Delivered',
- 'no_copy': 1,
- 'oldfieldname': 'per_delivered',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1,
- 'width': '100px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'depends_on': 'eval:!doc.__islocal',
- 'description': '% of materials billed against this Sales Order',
- 'doctype': 'DocField',
- 'fieldname': 'per_billed',
- 'fieldtype': 'Currency',
- 'in_filter': 1,
- 'label': '% Amount Billed',
- 'no_copy': 1,
- 'oldfieldname': 'per_billed',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1,
- 'width': '100px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'amended_from',
- 'fieldtype': 'Data',
- 'hidden': 1,
- 'label': 'Amended From',
- 'no_copy': 1,
- 'oldfieldname': 'amended_from',
- 'oldfieldtype': 'Data',
- 'permlevel': 1,
- 'print_hide': 1,
- 'width': '150px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'The date at which current entry is corrected in the system.',
- 'doctype': 'DocField',
- 'fieldname': 'amendment_date',
- 'fieldtype': 'Date',
- 'hidden': 1,
- 'label': 'Amendment Date',
- 'no_copy': 1,
- 'oldfieldname': 'amendment_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 0,
- 'print_hide': 1,
- 'width': '100px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'shipping_address_name',
- 'fieldtype': 'Data',
- 'hidden': 1,
- 'in_filter': 1,
- 'label': 'Shipping Address Name',
- 'options': 'Address',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'shipping_address',
- 'fieldtype': 'Small Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'shipping_address',
+ 'fieldtype': u'Small Text',
'in_filter': 0,
- 'label': 'Shipping Address',
+ 'label': u'Shipping Address',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Items',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldname': u'shipping_address_name',
+ 'fieldtype': u'Data',
+ 'hidden': 1,
+ 'in_filter': 1,
+ 'label': u'Shipping Address Name',
+ 'options': u'Address',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Items',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Select the price list as entered in "Price List" master. This will pull the reference rates of items against this price list as specified in "Item" master.',
- 'doctype': 'DocField',
- 'fieldname': 'price_list_name',
- 'fieldtype': 'Select',
- 'label': 'Price List',
- 'oldfieldname': 'price_list_name',
- 'oldfieldtype': 'Select',
- 'options': 'link:Price List',
+ 'colour': u'White:FFF',
+ 'description': u'Select the price list as entered in "Price List" master. This will pull the reference rates of items against this price list as specified in "Item" master.',
+ 'doctype': u'DocField',
+ 'fieldname': u'price_list_name',
+ 'fieldtype': u'Select',
+ 'label': u'Price List',
+ 'oldfieldname': u'price_list_name',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Price List',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'description': 'Select the currency in which price list is maintained',
- 'doctype': 'DocField',
- 'fieldname': 'price_list_currency',
- 'fieldtype': 'Select',
- 'label': 'Price List Currency',
- 'options': 'link:Currency',
+ 'description': u'Select the currency in which price list is maintained',
+ 'doctype': u'DocField',
+ 'fieldname': u'price_list_currency',
+ 'fieldtype': u'Select',
+ 'label': u'Price List Currency',
+ 'options': u'link:Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1
@@ -614,12 +585,12 @@
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Rate at which Price list currency is converted to your currency',
- 'doctype': 'DocField',
- 'fieldname': 'plc_conversion_rate',
- 'fieldtype': 'Currency',
- 'label': 'Price List Currency Conversion Rate',
+ 'colour': u'White:FFF',
+ 'description': u"Rate at which Price list currency is converted to company's base currency",
+ 'doctype': u'DocField',
+ 'fieldname': u'plc_conversion_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Price List Currency Conversion Rate',
'permlevel': 0,
'print_hide': 1,
'reqd': 1
@@ -627,383 +598,360 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': "Customer's currency",
- 'doctype': 'DocField',
- 'fieldname': 'currency',
- 'fieldtype': 'Select',
- 'label': "Customer's Currency",
- 'oldfieldname': 'currency',
- 'oldfieldtype': 'Select',
- 'options': 'link:Currency',
+ 'colour': u'White:FFF',
+ 'description': u"Customer's currency",
+ 'doctype': u'DocField',
+ 'fieldname': u'currency',
+ 'fieldtype': u'Select',
+ 'label': u'Currency',
+ 'oldfieldname': u'currency',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'default': '1.00',
- 'description': "Rate at which customer's currency is converted to your currency",
- 'doctype': 'DocField',
- 'fieldname': 'conversion_rate',
- 'fieldtype': 'Currency',
- 'label': 'Conversion Rate',
- 'oldfieldname': 'conversion_rate',
- 'oldfieldtype': 'Currency',
+ 'colour': u'White:FFF',
+ 'default': u'1.00',
+ 'description': u"Rate at which customer's currency is converted to company's base currency",
+ 'doctype': u'DocField',
+ 'fieldname': u'conversion_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Conversion Rate',
+ 'oldfieldname': u'conversion_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Quotation no against which this Sales Order is made ',
- 'doctype': 'DocField',
- 'fieldname': 'quotation_no',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'description': u'Quotation no against which this Sales Order is made ',
+ 'doctype': u'DocField',
+ 'fieldname': u'quotation_no',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Quotation No',
+ 'label': u'Quotation No',
'no_copy': 0,
- 'oldfieldname': 'quotation_no',
- 'oldfieldtype': 'Link',
- 'options': 'Quotation',
+ 'oldfieldname': u'quotation_no',
+ 'oldfieldtype': u'Link',
+ 'options': u'Quotation',
'permlevel': 0,
'print_hide': 1,
'search_index': 1,
- 'trigger': 'Client',
- 'width': '150px'
+ 'trigger': u'Client',
+ 'width': u'150px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'quotation_date',
- 'fieldtype': 'Date',
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:doc.quotation_no',
+ 'doctype': u'DocField',
+ 'fieldname': u'quotation_date',
+ 'fieldtype': u'Date',
'hidden': 1,
- 'label': 'Quotation Date',
+ 'label': u'Quotation Date',
'no_copy': 0,
- 'oldfieldname': 'quotation_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'quotation_date',
+ 'oldfieldtype': u'Date',
'permlevel': 1,
'print_hide': 1,
'reqd': 0,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Pull Quotation Details',
- 'oldfieldtype': 'Button',
- 'options': 'pull_quotation_details',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Pull Quotation Details',
+ 'oldfieldtype': u'Button',
+ 'options': u'pull_quotation_details',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
'allow_on_submit': 1,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'sales_order_details',
- 'fieldtype': 'Table',
- 'label': 'Sales Order Details',
- 'oldfieldname': 'sales_order_details',
- 'oldfieldtype': 'Table',
- 'options': 'Sales Order Detail',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'sales_order_details',
+ 'fieldtype': u'Table',
+ 'label': u'Sales Order Details',
+ 'oldfieldname': u'sales_order_details',
+ 'oldfieldtype': u'Table',
+ 'options': u'Sales Order Detail',
'permlevel': 0,
'print_hide': 0,
- 'width': '40px'
+ 'width': u'40px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Clear Table',
- 'oldfieldtype': 'Button',
- 'options': 'clear_sales_order_details',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Clear Table',
+ 'oldfieldtype': u'Button',
+ 'options': u'clear_sales_order_details',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Re-Calculate Values',
- 'oldfieldtype': 'Button',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Re-Calculate Values',
+ 'oldfieldtype': u'Button',
'permlevel': 0,
'print_hide': 1,
'search_index': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'net_total',
- 'fieldtype': 'Currency',
- 'label': 'Net Total*',
- 'oldfieldname': 'net_total',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'net_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Net Total*',
+ 'oldfieldname': u'net_total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'Note1',
- 'oldfieldtype': 'HTML',
- 'options': '<b>NOTE :</b> * In Base Currency',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Taxes',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Taxes',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'charge',
- 'fieldtype': 'Link',
- 'label': 'Select Charges Master',
- 'oldfieldname': 'charge',
- 'oldfieldtype': 'Link',
- 'options': 'Other Charges',
+ 'doctype': u'DocField',
+ 'fieldname': u'charge',
+ 'fieldtype': u'Link',
+ 'label': u'Select Charges Master',
+ 'oldfieldname': u'charge',
+ 'oldfieldtype': u'Link',
+ 'options': u'Other Charges',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Get Charges',
- 'oldfieldtype': 'Button',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Charges',
+ 'oldfieldtype': u'Button',
'permlevel': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'other_charges',
- 'fieldtype': 'Table',
- 'label': 'Other Charges',
- 'oldfieldname': 'other_charges',
- 'oldfieldtype': 'Table',
- 'options': 'RV Tax Detail',
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges',
+ 'fieldtype': u'Table',
+ 'label': u'Other Charges',
+ 'oldfieldname': u'other_charges',
+ 'oldfieldtype': u'Table',
+ 'options': u'RV Tax Detail',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Calculate Charges',
- 'oldfieldtype': 'Button',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Calculate Charges',
+ 'oldfieldtype': u'Button',
'permlevel': 0,
'print_hide': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'other_charges_total',
- 'fieldtype': 'Currency',
- 'label': 'Charges Total*',
- 'oldfieldname': 'other_charges_total',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Charges Total*',
+ 'oldfieldname': u'other_charges_total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'grand_total',
- 'fieldtype': 'Currency',
- 'label': 'Grand Total*',
- 'oldfieldname': 'grand_total',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1,
- 'reqd': 0,
- 'width': '150px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'OT Notes',
- 'oldfieldtype': 'HTML',
- 'options': '<b>NOTE :</b> * In Base Currency',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'Other Charges Calculation',
- 'oldfieldtype': 'HTML',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Other Charges Calculation',
+ 'oldfieldtype': u'HTML',
'permlevel': 0,
'print_hide': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Totals',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Totals',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'rounded_total',
- 'fieldtype': 'Currency',
- 'label': 'Rounded Total',
- 'oldfieldname': 'rounded_total',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'grand_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Grand Total*',
+ 'oldfieldname': u'grand_total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
- 'width': '150px'
+ 'reqd': 0,
+ 'width': u'150px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'In Words will be visible once you save the Sales Order.',
- 'doctype': 'DocField',
- 'fieldname': 'in_words',
- 'fieldtype': 'Data',
- 'label': 'In Words',
- 'oldfieldname': 'in_words',
- 'oldfieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'rounded_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Rounded Total',
+ 'oldfieldname': u'rounded_total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
- 'width': '200px'
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'colour': u'White:FFF',
+ 'description': u'In Words will be visible once you save the Sales Order.',
+ 'doctype': u'DocField',
+ 'fieldname': u'in_words',
+ 'fieldtype': u'Data',
+ 'label': u'In Words',
+ 'oldfieldname': u'in_words',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'width': u'200px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
'print_hide': 1,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'grand_total_export',
- 'fieldtype': 'Currency',
- 'label': 'Grand Total (Export)',
- 'oldfieldname': 'grand_total_export',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'grand_total_export',
+ 'fieldtype': u'Currency',
+ 'label': u'Grand Total (Export)',
+ 'oldfieldname': u'grand_total_export',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'rounded_total_export',
- 'fieldtype': 'Currency',
- 'label': 'Rounded Total (Export)',
- 'oldfieldname': 'rounded_total_export',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'rounded_total_export',
+ 'fieldtype': u'Currency',
+ 'label': u'Rounded Total (Export)',
+ 'oldfieldname': u'rounded_total_export',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 0,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'In Words (Export) will be visible once you save the Sales Order.',
- 'doctype': 'DocField',
- 'fieldname': 'in_words_export',
- 'fieldtype': 'Data',
- 'label': 'In Words (Export)',
- 'oldfieldname': 'in_words_export',
- 'oldfieldtype': 'Data',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'in_words_export',
+ 'fieldtype': u'Data',
+ 'label': u'In Words (Export)',
+ 'oldfieldname': u'in_words_export',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
- 'width': '200px'
+ 'width': u'200px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Terms',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Terms',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'tc_name',
- 'fieldtype': 'Link',
- 'label': 'Select Terms',
- 'oldfieldname': 'tc_name',
- 'oldfieldtype': 'Link',
- 'options': 'Term',
+ 'doctype': u'DocField',
+ 'fieldname': u'tc_name',
+ 'fieldtype': u'Link',
+ 'label': u'Select Terms',
+ 'oldfieldname': u'tc_name',
+ 'oldfieldtype': u'Link',
+ 'options': u'Term',
'permlevel': 0,
'print_hide': 1,
'search_index': 0
@@ -1011,123 +959,86 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Get Terms',
- 'oldfieldtype': 'Button',
- 'options': 'get_tc_details',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Terms',
+ 'oldfieldtype': u'Button',
+ 'options': u'get_tc_details',
'permlevel': 0,
'print_hide': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'Terms HTML',
- 'oldfieldtype': 'HTML',
- 'options': 'You can add Terms and Notes that will be printed in the Transaction',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Terms HTML',
+ 'oldfieldtype': u'HTML',
+ 'options': u'You can add Terms and Notes that will be printed in the Transaction',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'terms',
- 'fieldtype': 'Text Editor',
- 'label': 'Term Details',
- 'oldfieldname': 'terms',
- 'oldfieldtype': 'Text Editor',
+ 'doctype': u'DocField',
+ 'fieldname': u'terms',
+ 'fieldtype': u'Text Editor',
+ 'label': u'Term Details',
+ 'oldfieldname': u'terms',
+ 'oldfieldtype': u'Text Editor',
'permlevel': 0,
'print_hide': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Filling in additional information about the Sales Order will help you analyze your data better.',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'More Info',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Filling in additional information about the Sales Order will help you analyze your data better.',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'More Info',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
'print_hide': 1,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'letter_head',
- 'fieldtype': 'Select',
- 'label': 'Letter Head',
- 'oldfieldname': 'letter_head',
- 'oldfieldtype': 'Select',
- 'options': 'link:Letter Head',
+ 'doctype': u'DocField',
+ 'fieldname': u'letter_head',
+ 'fieldtype': u'Select',
+ 'label': u'Letter Head',
+ 'oldfieldname': u'letter_head',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Letter Head',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Select the relevant company name if you have multiple companies.',
- 'doctype': 'DocField',
- 'fieldname': 'company',
- 'fieldtype': 'Link',
- 'in_filter': 1,
- 'label': 'Company',
- 'oldfieldname': 'company',
- 'oldfieldtype': 'Link',
- 'options': 'Company',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1,
- 'search_index': 1,
- 'trigger': 'Client',
- 'width': '150px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'fiscal_year',
- 'fieldtype': 'Select',
- 'in_filter': 1,
- 'label': 'Fiscal Year',
- 'oldfieldname': 'fiscal_year',
- 'oldfieldtype': 'Select',
- 'options': 'link:Fiscal Year',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1,
- 'search_index': 1,
- 'width': '150px'
- },
-
- # DocField
- {
'allow_on_submit': 1,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'select_print_heading',
- 'fieldtype': 'Link',
- 'label': 'Select Print Heading',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'select_print_heading',
+ 'fieldtype': u'Link',
+ 'label': u'Select Print Heading',
'no_copy': 1,
- 'oldfieldname': 'select_print_heading',
- 'oldfieldtype': 'Link',
- 'options': 'Print Heading',
+ 'oldfieldname': u'select_print_heading',
+ 'oldfieldtype': u'Link',
+ 'options': u'Print Heading',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
@@ -1135,192 +1046,274 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'colour': u'White:FFF',
+ 'depends_on': u"eval:doc.source == 'Campaign'",
+ 'doctype': u'DocField',
+ 'fieldname': u'campaign',
+ 'fieldtype': u'Link',
+ 'label': u'Campaign',
+ 'oldfieldname': u'campaign',
+ 'oldfieldtype': u'Link',
+ 'options': u'Campaign',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Purchase Order sent by customer',
+ 'doctype': u'DocField',
+ 'fieldname': u'po_no',
+ 'fieldtype': u'Data',
+ 'hidden': 0,
+ 'label': u'P.O. No',
+ 'oldfieldname': u'po_no',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 0,
+ 'print_hide': 0,
+ 'reqd': 0,
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:doc.po_no',
+ 'doctype': u'DocField',
+ 'fieldname': u'po_date',
+ 'fieldtype': u'Date',
+ 'hidden': 0,
+ 'label': u'P.O. Date',
+ 'oldfieldname': u'po_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 0,
+ 'print_hide': 0,
+ 'reqd': 0,
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
'print_hide': 1,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'source',
- 'fieldtype': 'Select',
- 'label': 'Source',
- 'oldfieldname': 'source',
- 'oldfieldtype': 'Select',
- 'options': "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'source',
+ 'fieldtype': u'Select',
+ 'label': u'Source',
+ 'oldfieldname': u'source',
+ 'oldfieldtype': u'Select',
+ 'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'depends_on': "eval:doc.source == 'Campaign'",
- 'doctype': 'DocField',
- 'fieldname': 'campaign',
- 'fieldtype': 'Link',
- 'label': 'Campaign',
- 'oldfieldname': 'campaign',
- 'oldfieldtype': 'Link',
- 'options': 'Campaign',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'note',
- 'fieldtype': 'Text',
- 'label': 'Note',
- 'oldfieldname': 'note',
- 'oldfieldtype': 'Text',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'depends_on': 'eval:!doc.__islocal',
- 'doctype': 'DocField',
- 'fieldname': 'cancel_reason',
- 'fieldtype': 'Data',
- 'label': 'Cancel Reason',
- 'no_column': 0,
- 'no_copy': 1,
- 'oldfieldname': 'cancel_reason',
- 'oldfieldtype': 'Data',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'delivery_status',
- 'fieldtype': 'Select',
- 'hidden': 1,
- 'label': 'Delivery Status',
- 'no_column': 0,
- 'no_copy': 1,
- 'options': 'Delivered\nNot Delivered\nPartly Delivered\nClosed\nNot Applicable',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'billing_status',
- 'fieldtype': 'Select',
- 'hidden': 1,
- 'label': 'Billing Status',
- 'no_column': 0,
- 'no_copy': 1,
- 'options': 'Billed\nNot Billed\nPartly Billed\nClosed',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Display all the individual items delivered with the main items',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'hidden': 0,
- 'label': 'Packing List',
- 'oldfieldtype': 'Section Break',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'packing_details',
- 'fieldtype': 'Table',
- 'label': 'Packing Details',
- 'oldfieldname': 'packing_details',
- 'oldfieldtype': 'Table',
- 'options': 'Delivery Note Packing Detail',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Sales Team',
- 'oldfieldtype': 'Section Break',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Name as entered in Sales Partner master',
- 'doctype': 'DocField',
- 'fieldname': 'sales_partner',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'description': u'Select the relevant company name if you have multiple companies.',
+ 'doctype': u'DocField',
+ 'fieldname': u'company',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Sales Partner',
- 'oldfieldname': 'sales_partner',
- 'oldfieldtype': 'Link',
- 'options': 'Sales Partner',
+ 'label': u'Company',
+ 'oldfieldname': u'company',
+ 'oldfieldtype': u'Link',
+ 'options': u'Company',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 1,
+ 'search_index': 1,
+ 'trigger': u'Client',
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'fiscal_year',
+ 'fieldtype': u'Select',
+ 'in_filter': 1,
+ 'label': u'Fiscal Year',
+ 'oldfieldname': u'fiscal_year',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Fiscal Year',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 1,
+ 'search_index': 1,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'delivery_status',
+ 'fieldtype': u'Select',
+ 'hidden': 1,
+ 'label': u'Delivery Status',
+ 'no_column': 0,
+ 'no_copy': 1,
+ 'options': u'Delivered\nNot Delivered\nPartly Delivered\nClosed\nNot Applicable',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'billing_status',
+ 'fieldtype': u'Select',
+ 'hidden': 1,
+ 'label': u'Billing Status',
+ 'no_column': 0,
+ 'no_copy': 1,
+ 'options': u'Billed\nNot Billed\nPartly Billed\nClosed',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'doctype': u'DocField',
+ 'fieldname': u'cancel_reason',
+ 'fieldtype': u'Data',
+ 'label': u'Cancel Reason',
+ 'no_column': 0,
+ 'no_copy': 1,
+ 'oldfieldname': u'cancel_reason',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Display all the individual items delivered with the main items',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'hidden': 0,
+ 'label': u'Packing List',
+ 'oldfieldtype': u'Section Break',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'packing_details',
+ 'fieldtype': u'Table',
+ 'label': u'Packing Details',
+ 'oldfieldname': u'packing_details',
+ 'oldfieldtype': u'Table',
+ 'options': u'Delivery Note Packing Detail',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Sales Team',
+ 'oldfieldtype': u'Section Break',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Name as entered in Sales Partner master',
+ 'doctype': u'DocField',
+ 'fieldname': u'sales_partner',
+ 'fieldtype': u'Link',
+ 'in_filter': 1,
+ 'label': u'Sales Partner',
+ 'oldfieldname': u'sales_partner',
+ 'oldfieldtype': u'Link',
+ 'options': u'Sales Partner',
'permlevel': 0,
'print_hide': 1,
'search_index': 1,
- 'trigger': 'Client',
- 'width': '150px'
+ 'trigger': u'Client',
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'commission_rate',
- 'fieldtype': 'Currency',
- 'label': 'Commission Rate',
- 'oldfieldname': 'commission_rate',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'commission_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Commission Rate',
+ 'oldfieldname': u'commission_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'total_commission',
- 'fieldtype': 'Currency',
- 'label': 'Total Commission',
- 'oldfieldname': 'total_commission',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'total_commission',
+ 'fieldtype': u'Currency',
+ 'label': u'Total Commission',
+ 'oldfieldname': u'total_commission',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'sales_team',
- 'fieldtype': 'Table',
- 'label': 'Sales Team1',
- 'oldfieldname': 'sales_team',
- 'oldfieldtype': 'Table',
- 'options': 'Sales Team',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'options': u'Simple',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'sales_team',
+ 'fieldtype': u'Table',
+ 'label': u'Sales Team1',
+ 'oldfieldname': u'sales_team',
+ 'oldfieldtype': u'Table',
+ 'options': u'Sales Team',
'permlevel': 0,
'print_hide': 1
},
@@ -1328,11 +1321,11 @@
# DocField
{
'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Repair Sales Order',
- 'oldfieldtype': 'Button',
- 'options': 'repair_sales_order',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Repair Sales Order',
+ 'oldfieldtype': u'Button',
+ 'options': u'repair_sales_order',
'permlevel': 0,
'print_hide': 1
}
diff --git a/erpnext/selling/doctype/sales_order_detail/sales_order_detail.txt b/erpnext/selling/doctype/sales_order_detail/sales_order_detail.txt
index 7e46d74..25521c4 100644
--- a/erpnext/selling/doctype/sales_order_detail/sales_order_detail.txt
+++ b/erpnext/selling/doctype/sales_order_detail/sales_order_detail.txt
@@ -5,342 +5,295 @@
{
'creation': '2010-08-08 17:09:22',
'docstatus': 0,
- 'modified': '2011-04-12 14:08:58',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-24 10:38:06',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocType
{
- 'autoname': 'SOD/.#####',
- 'colour': 'White:FFF',
+ 'autoname': u'SOD/.#####',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
'istable': 1,
- 'module': 'Selling',
+ 'module': u'Selling',
'name': '__common__',
- 'section_style': 'Tray',
- 'server_code_error': ' ',
+ 'section_style': u'Tray',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'version': 52
+ 'version': 49
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Sales Order Detail',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'Sales Order Detail',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# DocType, Sales Order Detail
{
'doctype': 'DocType',
- 'name': 'Sales Order Detail'
+ 'name': u'Sales Order Detail'
},
# DocField
{
- 'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'item_code',
- 'fieldtype': 'Link',
- 'idx': 1,
+ 'doctype': u'DocField',
+ 'fieldname': u'item_code',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Item Code',
- 'oldfieldname': 'item_code',
- 'oldfieldtype': 'Link',
- 'options': 'Item',
+ 'label': u'Item Code',
+ 'oldfieldname': u'item_code',
+ 'oldfieldtype': u'Link',
+ 'options': u'Item',
'permlevel': 0,
'reqd': 1,
'search_index': 1,
- 'trigger': 'Client',
- 'width': '150px'
+ 'trigger': u'Client',
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_name',
- 'fieldtype': 'Data',
- 'idx': 2,
- 'label': 'Item Name',
- 'oldfieldname': 'item_name',
- 'oldfieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_name',
+ 'fieldtype': u'Data',
+ 'label': u'Item Name',
+ 'oldfieldname': u'item_name',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'width': '150'
+ 'width': u'150'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'description',
- 'fieldtype': 'Small Text',
- 'idx': 3,
+ 'doctype': u'DocField',
+ 'fieldname': u'description',
+ 'fieldtype': u'Small Text',
'in_filter': 1,
- 'label': 'Description',
- 'oldfieldname': 'description',
- 'oldfieldtype': 'Small Text',
+ 'label': u'Description',
+ 'oldfieldname': u'description',
+ 'oldfieldtype': u'Small Text',
'permlevel': 0,
'reqd': 1,
'search_index': 1,
- 'width': '300px'
+ 'width': u'300px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'qty',
- 'fieldtype': 'Currency',
- 'idx': 4,
- 'label': 'Quantity',
- 'oldfieldname': 'qty',
- 'oldfieldtype': 'Currency',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'qty',
+ 'fieldtype': u'Currency',
+ 'label': u'Quantity',
+ 'oldfieldname': u'qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'stock_uom',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'stock_uom',
+ 'fieldtype': u'Data',
'hidden': 0,
- 'idx': 5,
- 'label': 'UOM',
- 'oldfieldname': 'stock_uom',
- 'oldfieldtype': 'Data',
+ 'label': u'UOM',
+ 'oldfieldname': u'stock_uom',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'reqd': 0,
- 'width': '70px'
+ 'width': u'70px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'ref_rate',
- 'fieldtype': 'Currency',
- 'idx': 6,
- 'label': 'Ref Rate',
- 'oldfieldname': 'ref_rate',
- 'oldfieldtype': 'Currency',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'ref_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Price List Rate',
+ 'oldfieldname': u'ref_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
- 'trigger': 'Client',
- 'width': '70px'
+ 'trigger': u'Client',
+ 'width': u'70px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'adj_rate',
- 'fieldtype': 'Float',
- 'idx': 7,
- 'label': 'Discount(%)',
- 'oldfieldname': 'adj_rate',
- 'oldfieldtype': 'Float',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'adj_rate',
+ 'fieldtype': u'Float',
+ 'label': u'Discount(%)',
+ 'oldfieldname': u'adj_rate',
+ 'oldfieldtype': u'Float',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client',
- 'width': '70px'
+ 'trigger': u'Client',
+ 'width': u'70px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'export_rate',
- 'fieldtype': 'Currency',
- 'idx': 8,
- 'label': 'Rate',
- 'oldfieldname': 'export_rate',
- 'oldfieldtype': 'Currency',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'export_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Rate',
+ 'oldfieldname': u'export_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 0,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'export_amount',
- 'fieldtype': 'Currency',
- 'idx': 9,
- 'label': 'Amount',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'export_amount',
+ 'fieldtype': u'Currency',
+ 'label': u'Amount',
'no_copy': 0,
- 'oldfieldname': 'export_amount',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'export_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'reqd': 0,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'base_ref_rate',
- 'fieldtype': 'Currency',
- 'idx': 10,
- 'label': 'Ref Rate*',
- 'oldfieldname': 'base_ref_rate',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'base_ref_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Price List Rate*',
+ 'oldfieldname': u'base_ref_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'basic_rate',
- 'fieldtype': 'Currency',
- 'idx': 11,
- 'label': 'Basic Rate*',
- 'oldfieldname': 'basic_rate',
- 'oldfieldtype': 'Currency',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'basic_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Basic Rate*',
+ 'oldfieldname': u'basic_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'amount',
- 'fieldtype': 'Currency',
- 'idx': 12,
- 'label': 'Amount*',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'amount',
+ 'fieldtype': u'Currency',
+ 'label': u'Amount*',
'no_copy': 0,
- 'oldfieldname': 'amount',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 0,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'reserved_warehouse',
- 'fieldtype': 'Link',
- 'idx': 13,
- 'label': 'Reserved Warehouse',
+ 'doctype': u'DocField',
+ 'fieldname': u'reserved_warehouse',
+ 'fieldtype': u'Link',
+ 'label': u'Reserved Warehouse',
'no_copy': 1,
- 'oldfieldname': 'reserved_warehouse',
- 'oldfieldtype': 'Link',
- 'options': 'Warehouse',
+ 'oldfieldname': u'reserved_warehouse',
+ 'oldfieldtype': u'Link',
+ 'options': u'Warehouse',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
- 'trigger': 'Client',
- 'width': '150px'
+ 'trigger': u'Client',
+ 'width': u'150px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'projected_qty',
- 'fieldtype': 'Currency',
- 'idx': 14,
- 'label': 'Projected Qty',
+ 'colour': u'White:FFF',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'projected_qty',
+ 'fieldtype': u'Currency',
+ 'hidden': 1,
+ 'label': u'Projected Qty',
'no_copy': 1,
- 'oldfieldname': 'projected_qty',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'projected_qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
- 'width': '70px'
+ 'width': u'70px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'actual_qty',
- 'fieldtype': 'Currency',
- 'idx': 15,
- 'label': 'Actual Qty',
+ 'colour': u'White:FFF',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'actual_qty',
+ 'fieldtype': u'Currency',
+ 'label': u'Actual Qty',
'no_copy': 1,
'permlevel': 1,
'print_hide': 1,
- 'width': '70px'
+ 'width': u'70px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'indented_qty',
- 'fieldtype': 'Currency',
- 'idx': 16,
- 'label': 'Indented Qty',
- 'no_copy': 1,
- 'permlevel': 1,
- 'print_hide': 1,
- 'width': '70px'
- },
-
- # DocField
- {
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'delivered_qty',
- 'fieldtype': 'Currency',
+ 'colour': u'White:FFF',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'delivered_qty',
+ 'fieldtype': u'Currency',
'hidden': 0,
- 'idx': 17,
'in_filter': 0,
- 'label': 'Delivered Qty',
+ 'label': u'Delivered Qty',
'no_copy': 1,
- 'oldfieldname': 'delivered_qty',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'delivered_qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'search_index': 0,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'billed_qty',
- 'fieldtype': 'Currency',
- 'idx': 18,
- 'in_filter': 0,
- 'label': 'Billed Qty',
- 'no_copy': 1,
- 'oldfieldname': 'billed_qty',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1,
- 'search_index': 0,
- 'width': '100px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'billed_amt',
- 'fieldtype': 'Currency',
- 'idx': 19,
- 'label': 'Billed Amt',
+ 'doctype': u'DocField',
+ 'fieldname': u'billed_amt',
+ 'fieldtype': u'Currency',
+ 'label': u'Billed Amt',
'no_copy': 1,
'permlevel': 1,
'print_hide': 1
@@ -348,83 +301,84 @@
# DocField
{
- 'description': 'For Production',
- 'doctype': 'DocField',
- 'fieldname': 'planned_qty',
- 'fieldtype': 'Currency',
+ 'colour': u'White:FFF',
+ 'description': u'For Production',
+ 'doctype': u'DocField',
+ 'fieldname': u'planned_qty',
+ 'fieldtype': u'Currency',
'hidden': 1,
- 'idx': 20,
- 'label': 'Planned Quantity',
+ 'label': u'Planned Quantity',
'no_copy': 1,
- 'oldfieldname': 'planned_qty',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'planned_qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1,
- 'width': '50px'
+ 'width': u'50px'
},
# DocField
{
- 'description': 'For Production',
- 'doctype': 'DocField',
- 'fieldname': 'produced_qty',
- 'fieldtype': 'Currency',
+ 'colour': u'White:FFF',
+ 'description': u'For Production',
+ 'doctype': u'DocField',
+ 'fieldname': u'produced_qty',
+ 'fieldtype': u'Currency',
'hidden': 1,
- 'idx': 21,
- 'label': 'Produced Quantity',
- 'oldfieldname': 'produced_qty',
- 'oldfieldtype': 'Currency',
+ 'label': u'Produced Quantity',
+ 'oldfieldname': u'produced_qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1,
- 'width': '50px'
+ 'width': u'50px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'brand',
- 'fieldtype': 'Link',
- 'idx': 22,
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'brand',
+ 'fieldtype': u'Link',
+ 'hidden': 1,
'in_filter': 1,
- 'label': 'Brand Name',
- 'oldfieldname': 'brand',
- 'oldfieldtype': 'Link',
- 'options': 'Brand',
+ 'label': u'Brand Name',
+ 'oldfieldname': u'brand',
+ 'oldfieldtype': u'Link',
+ 'options': u'Brand',
'permlevel': 1,
'print_hide': 1,
- 'search_index': 0
+ 'search_index': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_group',
- 'fieldtype': 'Link',
- 'idx': 23,
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_group',
+ 'fieldtype': u'Link',
+ 'hidden': 1,
'in_filter': 1,
- 'label': 'Item Group',
- 'oldfieldname': 'item_group',
- 'oldfieldtype': 'Link',
- 'options': 'Item Group',
+ 'label': u'Item Group',
+ 'oldfieldname': u'item_group',
+ 'oldfieldtype': u'Link',
+ 'options': u'Item Group',
'permlevel': 1,
'print_hide': 1,
- 'search_index': 0
+ 'search_index': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'prevdoc_docname',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'prevdoc_docname',
+ 'fieldtype': u'Link',
'hidden': 0,
- 'idx': 24,
'in_filter': 1,
- 'label': 'Quotation No.',
- 'oldfieldname': 'prevdoc_docname',
- 'oldfieldtype': 'Link',
- 'options': 'Quotation',
+ 'label': u'Quotation No.',
+ 'oldfieldname': u'prevdoc_docname',
+ 'oldfieldtype': u'Link',
+ 'options': u'Quotation',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@@ -433,13 +387,12 @@
# DocField
{
'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'page_break',
- 'fieldtype': 'Check',
- 'idx': 25,
- 'label': 'Page Break',
- 'oldfieldname': 'page_break',
- 'oldfieldtype': 'Check',
+ 'doctype': u'DocField',
+ 'fieldname': u'page_break',
+ 'fieldtype': u'Check',
+ 'label': u'Page Break',
+ 'oldfieldname': u'page_break',
+ 'oldfieldtype': u'Check',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1
@@ -447,15 +400,15 @@
# DocField
{
- 'description': 'required for production. will be used later.',
- 'doctype': 'DocField',
- 'fieldname': 'delivery_date',
- 'fieldtype': 'Date',
- 'hidden': 0,
- 'idx': 26,
- 'label': 'Expected Delivery Date',
- 'oldfieldname': 'delivery_date',
- 'oldfieldtype': 'Date',
+ 'colour': u'White:FFF',
+ 'description': u'required for production. will be used later.',
+ 'doctype': u'DocField',
+ 'fieldname': u'delivery_date',
+ 'fieldtype': u'Date',
+ 'hidden': 1,
+ 'label': u'Expected Delivery Date',
+ 'oldfieldname': u'delivery_date',
+ 'oldfieldtype': u'Date',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1
@@ -464,16 +417,16 @@
# DocField
{
'allow_on_submit': 1,
- 'description': 'required for production. will be used later.',
- 'doctype': 'DocField',
- 'fieldname': 'confirmation_date',
- 'fieldtype': 'Date',
+ 'colour': u'White:FFF',
+ 'description': u'required for production. will be used later.',
+ 'doctype': u'DocField',
+ 'fieldname': u'confirmation_date',
+ 'fieldtype': u'Date',
'hidden': 0,
- 'idx': 27,
'in_filter': 1,
- 'label': 'Confirmed Delivery Date',
- 'oldfieldname': 'confirmation_date',
- 'oldfieldtype': 'Date',
+ 'label': u'Confirmed Delivery Date',
+ 'oldfieldname': u'confirmation_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1,
@@ -482,14 +435,14 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_tax_rate',
- 'fieldtype': 'Small Text',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_tax_rate',
+ 'fieldtype': u'Small Text',
'hidden': 1,
- 'idx': 28,
- 'label': 'Item Tax Rate',
- 'oldfieldname': 'item_tax_rate',
- 'oldfieldtype': 'Small Text',
+ 'label': u'Item Tax Rate',
+ 'oldfieldname': u'item_tax_rate',
+ 'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1
@@ -497,16 +450,16 @@
# DocField
{
- 'description': 'The date at which current entry is made in system.',
- 'doctype': 'DocField',
- 'fieldname': 'transaction_date',
- 'fieldtype': 'Date',
+ 'colour': u'White:FFF',
+ 'description': u'The date at which current entry is made in system.',
+ 'doctype': u'DocField',
+ 'fieldname': u'transaction_date',
+ 'fieldtype': u'Date',
'hidden': 1,
- 'idx': 29,
'in_filter': 0,
- 'label': 'Sales Order Date',
- 'oldfieldname': 'transaction_date',
- 'oldfieldtype': 'Date',
+ 'label': u'Sales Order Date',
+ 'oldfieldname': u'transaction_date',
+ 'oldfieldtype': u'Date',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1,
diff --git a/erpnext/selling/doctype/shipping_address/shipping_address.js b/erpnext/selling/doctype/shipping_address/shipping_address.js
index 77c0d35..0ac173a 100755
--- a/erpnext/selling/doctype/shipping_address/shipping_address.js
+++ b/erpnext/selling/doctype/shipping_address/shipping_address.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// Get Customer Details
// =====================================================================
cur_frm.add_fetch('customer','customer_name','customer_name');
diff --git a/erpnext/selling/doctype/shipping_address/shipping_address.py b/erpnext/selling/doctype/shipping_address/shipping_address.py
index 76d3749..179e2d4 100755
--- a/erpnext/selling/doctype/shipping_address/shipping_address.py
+++ b/erpnext/selling/doctype/shipping_address/shipping_address.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
sql = webnotes.conn.sql
diff --git a/erpnext/selling/doctype/sms_center/sms_center.py b/erpnext/selling/doctype/sms_center/sms_center.py
index 5564347..0e54dd6 100644
--- a/erpnext/selling/doctype/sms_center/sms_center.py
+++ b/erpnext/selling/doctype/sms_center/sms_center.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/selling/page/sales_browser/sales_browser.js b/erpnext/selling/page/sales_browser/sales_browser.js
index c7e400e..b079515 100644
--- a/erpnext/selling/page/sales_browser/sales_browser.js
+++ b/erpnext/selling/page/sales_browser/sales_browser.js
@@ -1,5 +1,29 @@
-pscript['onload_Sales Browser'] = function(){
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+pscript['onshow_Sales Browser'] = function(){
wn.require('lib/js/legacy/widgets/tree.js');
+
+ var route = decodeURIComponent(location.hash);
+ if(route.indexOf('/')!=-1) {
+ var chart_type = route.split('/')[1];
+ new SalesBrowser().set_val(chart_type)
+ return;
+ }
+
var parent = $i('tr_body');
parent.innerHTML = 'Please select your chart: '
var sel = $a(parent,'select');
diff --git a/erpnext/selling/page/sales_dashboard/sales_dashboard.js b/erpnext/selling/page/sales_dashboard/sales_dashboard.js
index d15c602..1af5cb4 100644
--- a/erpnext/selling/page/sales_dashboard/sales_dashboard.js
+++ b/erpnext/selling/page/sales_dashboard/sales_dashboard.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript['onload_Sales Dashboard'] = function() {
var h = new PageHeader('pt_header','Sales Dashboard');
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/selling/page/selling_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/selling/page/selling_home/__init__.py
diff --git a/erpnext/selling/page/selling_home/selling_home.html b/erpnext/selling/page/selling_home/selling_home.html
new file mode 100644
index 0000000..4216f43
--- /dev/null
+++ b/erpnext/selling/page/selling_home/selling_home.html
@@ -0,0 +1,102 @@
+<div class="layout-wrapper layout-wrapper-background">
+ <div class="layout-main-section">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Selling</h1>
+ <hr>
+ <div style="width: 48%; float: left;">
+ <h4><a href="#!List/Lead">Lead</a></h4>
+ <p class="help">Prospective customers</p>
+ <h4><a href="#!List/Enquiry">Enquiry</a></h4>
+ <p class="help">Business opportunities</p>
+ <h4><a href="#!List/Quotation">Quotation</a></h4>
+ <p class="help">Quotes sent to Leads / Customers</p>
+ <h4><a href="#!List/Sales Order">Sales Order</a></h4>
+ <p class="help">Confirmed orders from Customers</p>
+ </div>
+ <div style="width: 48%; float: right;">
+ <h4><a href="#!List/Customer">Customer</a></h4>
+ <p class="help">Customer Master</p>
+ <h4><a href="#!List/Item">Item</a></h4>
+ <p class="help">Item Master</p>
+ </div>
+ <div style="clear: both"></div>
+ <hr>
+ <h3>Reports</h3>
+ <div class="reports-list"></div>
+ </div>
+ <div class="layout-side-section">
+ <div class="psidebar">
+ <div class="section">
+ <div class="section-head">Setup</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "Tax and charges structure master"
+ href="#!List/Other Charges">Sales Other Charges</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Multiple prices lists for items"
+ href="#!List/Price List">Price List</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Group items and accessories in one item code"
+ href="#!List/Sales BOM">Sales BOM</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Terms of contract template"
+ href="#!List/Term">Order Terms Template</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Tree of customer groups"
+ href="#!Sales Browser/Customer Group">Customer Group</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Tree of sales territories"
+ href="#!Sales Browser/Territory">Territory</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Sales persons and targets"
+ href="#!Sales Browser/Sales Person">Sales Person</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Commission partners and targets"
+ href="#!List/Sales Partner">Sales Partner</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Sales campaigns"
+ href="#!List/Campaign">Campaign</a>
+ </div>
+ </div>
+ </div>
+ <div class="section">
+ <div class="section-head">Tools</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "Helper for managing return of goods (sales or purchase)"
+ href="#!Form/Sales and Purchase Return Wizard/Sales and Purchase Return Wizard">Sales Returns</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Analyze Sales and Purchase trends and slice them based on item, customer, groups etc"
+ href="#!Report/Profile/Trend Analyzer">Trend Analyzer</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "sales trends"
+ href="#!Sales Dashboard">Sales Dashboard</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/selling/page/selling_home/selling_home.js b/erpnext/selling/page/selling_home/selling_home.js
new file mode 100644
index 0000000..e0430d7
--- /dev/null
+++ b/erpnext/selling/page/selling_home/selling_home.js
@@ -0,0 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+pscript['onload_selling-home'] = function(wrapper) {
+ erpnext.module_page.setup_page('Selling', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/selling/page/selling_home/selling_home.txt b/erpnext/selling/page/selling_home/selling_home.txt
new file mode 100644
index 0000000..e6636a8
--- /dev/null
+++ b/erpnext/selling/page/selling_home/selling_home.txt
@@ -0,0 +1,43 @@
+# Page, selling-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-20 15:46:39',
+ 'docstatus': 0,
+ 'modified': '2012-02-20 15:46:57',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Selling',
+ 'name': '__common__',
+ 'page_name': u'selling-home',
+ 'standard': u'Yes',
+ 'title': u'Selling Home'
+ },
+
+ # These values are common for all Page Role
+ {
+ 'doctype': u'Page Role',
+ 'name': '__common__',
+ 'parent': u'selling-home',
+ 'parentfield': u'roles',
+ 'parenttype': u'Page',
+ 'role': u'All'
+ },
+
+ # Page, selling-home
+ {
+ 'doctype': 'Page',
+ 'name': u'selling-home'
+ },
+
+ # Page Role
+ {
+ 'doctype': u'Page Role'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/customer_address_contact/customer_address_contact.txt b/erpnext/selling/search_criteria/customer_address_contact/customer_address_contact.txt
index 99890b7..f63b2cc 100644
--- a/erpnext/selling/search_criteria/customer_address_contact/customer_address_contact.txt
+++ b/erpnext/selling/search_criteria/customer_address_contact/customer_address_contact.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-02-13 11:28:45',
+ 'creation': '2012-02-23 14:18:56',
'docstatus': 0,
- 'modified': '2012-02-13 11:28:45',
+ 'modified': '2012-02-23 14:18:56',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.js b/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.js
index d8b6476..df8fc21 100644
--- a/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.js
+++ b/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
diff --git a/erpnext/selling/search_criteria/draft_sales_orders/draft_sales_orders.js b/erpnext/selling/search_criteria/draft_sales_orders/draft_sales_orders.js
index 0e73442..7f8aed8 100644
--- a/erpnext/selling/search_criteria/draft_sales_orders/draft_sales_orders.js
+++ b/erpnext/selling/search_criteria/draft_sales_orders/draft_sales_orders.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Sales Order'+FILTER_SEP +'From Sales Order Date'].df['report_default'] = sys_defaults.year_start_date;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'To Sales Order Date'].df['report_default'] = dateutil.obj_to_str(new Date());
diff --git a/erpnext/selling/search_criteria/follow_up_report/follow_up_report.js b/erpnext/selling/search_criteria/follow_up_report/follow_up_report.js
index 9497efb..f9c3cba 100644
--- a/erpnext/selling/search_criteria/follow_up_report/follow_up_report.js
+++ b/erpnext/selling/search_criteria/follow_up_report/follow_up_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.mytabs.items['Select Columns'].hide()
this.mytabs.items['More Filters'].hide()
diff --git a/erpnext/selling/search_criteria/follow_up_report/follow_up_report.py b/erpnext/selling/search_criteria/follow_up_report/follow_up_report.py
index 1dcbeb0..85c37dc 100644
--- a/erpnext/selling/search_criteria/follow_up_report/follow_up_report.py
+++ b/erpnext/selling/search_criteria/follow_up_report/follow_up_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
follow_up_on = filter_values.get('follow_up_on')
cols = [['Document Type', 'Data', '150px', '']
diff --git a/erpnext/selling/search_criteria/gross_profit/gross_profit.js b/erpnext/selling/search_criteria/gross_profit/gross_profit.js
index e610408..d53c07d 100644
--- a/erpnext/selling/search_criteria/gross_profit/gross_profit.js
+++ b/erpnext/selling/search_criteria/gross_profit/gross_profit.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.mytabs.items['Select Columns'].hide();
this.mytabs.tabs['More Filters'].hide();
diff --git a/erpnext/selling/search_criteria/gross_profit/gross_profit.py b/erpnext/selling/search_criteria/gross_profit/gross_profit.py
index 04f0220..47ca383 100644
--- a/erpnext/selling/search_criteria/gross_profit/gross_profit.py
+++ b/erpnext/selling/search_criteria/gross_profit/gross_profit.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Add Columns
# ------------
colnames[colnames.index('Rate*')] = 'Rate'
diff --git a/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.js b/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.js
index df3b401..d501844 100644
--- a/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.js
+++ b/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'From Voucher Date'].df['report_default'] = sys_defaults.year_start_date;
this.filter_fields_dict['Delivery Note'+FILTER_SEP +'To Voucher Date'].df['report_default'] = dateutil.obj_to_str(new Date());
diff --git a/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.py b/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.py
index 55041e4..e86f8d3 100644
--- a/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.py
+++ b/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
out=[]
qty,amt,bil_qty=0,0,0
diff --git a/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.js b/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.js
index 43a6951..05b2e75 100644
--- a/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.js
+++ b/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Sales Order'+FILTER_SEP +'ID'].df.in_first_page = 1;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'From Sales Order Date'].df['report_default'] = sys_defaults.year_start_date;
diff --git a/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.py b/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.py
index e85302c..0e88acb 100644
--- a/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.py
+++ b/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
out=[]
qty,amt,del_qty,bil_qty=0,0,0,0
diff --git a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.js b/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.js
index ca88e29..ac04e28 100644
--- a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.js
+++ b/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.js
@@ -1,2 +1,18 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
this.mytabs.items['Select Columns'].hide();
this.mytabs.items['More Filters'].hide();
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.py b/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.py
index 8aed5a2..f18ee15 100644
--- a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.py
+++ b/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
total = 0.0
monthlist = ['','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
for r in res:
diff --git a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js b/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js
index 04d2755..ef3cef5 100644
--- a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js
+++ b/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
this.add_filter({fieldname:'transaction_date', label:'Sales Order Date', fieldtype:'Date', parent:'Sales Order', in_first_page : 1,default:''});
diff --git a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.js b/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.js
index 4cb0f3d..049c597 100644
--- a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.js
+++ b/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Partner'].df.filter_hide = 0;
diff --git a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.py b/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.py
index 4412f6c..4958674 100644
--- a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.py
+++ b/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
coltypes[col_idx['Average Commission Rate']] = 'Currency'
colwidths[col_idx['Average Commission Rate']] = '200px'
diff --git a/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.js b/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.js
index 46d4b2b..1b3837a 100644
--- a/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.js
+++ b/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
diff --git a/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.js b/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.js
index 46d4b2b..1b3837a 100644
--- a/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.js
+++ b/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
diff --git a/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.js b/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.js
index 0e0d461..135b68d 100644
--- a/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.js
+++ b/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.py b/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.py
index 1eaf7bf..3375f08 100644
--- a/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.py
+++ b/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# validate Filters
flt_dict = {'fiscal_year': 'Fiscal Year', 'period': 'Period', 'under' : 'Under', 'sales_person':'Sales Person', 'target_on':'Target On'}
for f in flt_dict:
diff --git a/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.js b/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.js
index 15de4b9..e1bd1d3 100755
--- a/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.js
+++ b/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.py b/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.py
index e47d654..83c61f4 100755
--- a/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.py
+++ b/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
if filter_values.get('based_on') == 'Sales Invoice':
based_on_dt = 'Receivable Voucher'
else:
diff --git a/erpnext/selling/search_criteria/target_variance_report/target_variance_report.js b/erpnext/selling/search_criteria/target_variance_report/target_variance_report.js
index 8a717b0..155b98d 100644
--- a/erpnext/selling/search_criteria/target_variance_report/target_variance_report.js
+++ b/erpnext/selling/search_criteria/target_variance_report/target_variance_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Cost Center'+NEWLINE+'Sales Person'+NEWLINE+'Sales Partner',report_default:'Cost Center',ignore : 1,parent:'Target Detail'});
diff --git a/erpnext/selling/search_criteria/target_variance_report/target_variance_report.py b/erpnext/selling/search_criteria/target_variance_report/target_variance_report.py
index 44016ee..771fd28 100644
--- a/erpnext/selling/search_criteria/target_variance_report/target_variance_report.py
+++ b/erpnext/selling/search_criteria/target_variance_report/target_variance_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# validate Filters
flt_dict = {'fiscal_year': 'Fiscal Year', 'period': 'Period', 'company':'Company', 'under' : 'Under', 'based_on' : 'Based On'}
for f in flt_dict:
diff --git a/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.js b/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.js
index 1843632..1afb7b1 100644
--- a/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.js
+++ b/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
diff --git a/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.py b/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.py
index 41e9e16..eacb606 100644
--- a/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.py
+++ b/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# validate Filters
flt_dict = {'fiscal_year': 'Fiscal Year', 'period': 'Period', 'under' : 'Under', 'territory':'Territory', 'target_on':'Target On'}
for f in flt_dict:
diff --git a/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py b/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py
index 3c513df..cf1df24 100644
--- a/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py
+++ b/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Add Columns
# ------------
based_on = filter_values.get('based_on')
diff --git a/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.js b/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.js
index b589c25..2d725d2 100644
--- a/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.js
+++ b/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Receivable Voucher',report_default:'Sales Order',ignore : 1, parent:'Territory'});
this.add_filter({fieldname:'fiscal_year', label:'Fiscal Year', fieldtype:'Link', options:'Fiscal Year', report_default:sys_defaults.fiscal_year, ignore : 1, parent:'Territory'});
diff --git a/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.py b/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.py
index 3d0fbe2..0cc3af9 100644
--- a/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.py
+++ b/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
if filter_values.get('period'):
period_values = filter_values['period']
if len(period_values.split(NEWLINE))>1:
diff --git a/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.js b/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.js
index d5ec9de..59a9b89 100644
--- a/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.js
+++ b/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Territory'+NEWLINE+'Sales Person',report_default:'Territory',ignore : 1,parent:'Target Detail', single_select :1});
diff --git a/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.py b/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.py
index ff26227..fb6dee1 100644
--- a/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.py
+++ b/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# validate Filters
flt_dict = {'fiscal_year': 'Fiscal Year', 'period': 'Period', 'under' : 'Under', 'based_on' : 'Based On','target_on':'Target On'}
for f in flt_dict:
diff --git a/erpnext/selling/search_criteria/variance_report/variance_report.js b/erpnext/selling/search_criteria/variance_report/variance_report.js
index e1f67d6..e4011e5 100644
--- a/erpnext/selling/search_criteria/variance_report/variance_report.js
+++ b/erpnext/selling/search_criteria/variance_report/variance_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Territory'+NEWLINE+'Sales Person'+NEWLINE+'Sales Partner',report_default:'Territory',ignore : 1,parent:'Target Detail'});
diff --git a/erpnext/selling/search_criteria/variance_report/variance_report.py b/erpnext/selling/search_criteria/variance_report/variance_report.py
index 3c26745..e4ebf33 100644
--- a/erpnext/selling/search_criteria/variance_report/variance_report.py
+++ b/erpnext/selling/search_criteria/variance_report/variance_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Add columns
# -----------
row_list = [['ID','Data','150px','']]
diff --git a/erpnext/setup/doctype/authorization_control/authorization_control.js b/erpnext/setup/doctype/authorization_control/authorization_control.js
index fdec673..077d4f5 100644
--- a/erpnext/setup/doctype/authorization_control/authorization_control.js
+++ b/erpnext/setup/doctype/authorization_control/authorization_control.js
@@ -1 +1,17 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// Settings
\ No newline at end of file
diff --git a/erpnext/setup/doctype/authorization_control/authorization_control.py b/erpnext/setup/doctype/authorization_control/authorization_control.py
index a91894f..ddfca53 100644
--- a/erpnext/setup/doctype/authorization_control/authorization_control.py
+++ b/erpnext/setup/doctype/authorization_control/authorization_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/authorization_rule/authorization_rule.js b/erpnext/setup/doctype/authorization_rule/authorization_rule.js
index 21f0848..02bd653 100644
--- a/erpnext/setup/doctype/authorization_rule/authorization_rule.js
+++ b/erpnext/setup/doctype/authorization_rule/authorization_rule.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/authorization_rule/authorization_rule.py b/erpnext/setup/doctype/authorization_rule/authorization_rule.py
index 60e1d45..2c4a0dc 100644
--- a/erpnext/setup/doctype/authorization_rule/authorization_rule.py
+++ b/erpnext/setup/doctype/authorization_rule/authorization_rule.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/brand/brand.js b/erpnext/setup/doctype/brand/brand.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/brand/brand.js
+++ b/erpnext/setup/doctype/brand/brand.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js
index c82b95c..3938cb5 100644
--- a/erpnext/setup/doctype/company/company.js
+++ b/erpnext/setup/doctype/company/company.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if(doc.abbr && !doc.__islocal) set_field_permlevel('abbr',1);
}
diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py
index 505ee13..9756583 100644
--- a/erpnext/setup/doctype/company/company.py
+++ b/erpnext/setup/doctype/company/company.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/contact_control/__init__.py b/erpnext/setup/doctype/contact_control/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/setup/doctype/contact_control/__init__.py
+++ /dev/null
diff --git a/erpnext/setup/doctype/contact_control/contact_control.js b/erpnext/setup/doctype/contact_control/contact_control.js
deleted file mode 100755
index b6825eb..0000000
--- a/erpnext/setup/doctype/contact_control/contact_control.js
+++ /dev/null
@@ -1,562 +0,0 @@
-// common partner functions
-// =========================
-
-/*
-// make shipping list body
-// ------------------------
-cur_frm.cscript.make_sl_body = function(){
- cur_frm.fields_dict['Shipping HTML'].wrapper.innerHTML = '';
- cur_frm.shipping_html = $a(cur_frm.fields_dict['Shipping HTML'].wrapper,'div');
-}
-*/
-
-// make history list body
-// -----------------------
-cur_frm.cscript.make_hl_body = function(){
- cur_frm.fields_dict['History HTML'].wrapper.innerHTML = '';
- cur_frm.history_html = $a(cur_frm.fields_dict['History HTML'].wrapper,'div');
-}
-
-
-/*
-// set shipping list message
-// --------------------------
-cur_frm.cscript.set_sl_msg = function(doc){
- cur_frm.shipping_html.innerHTML = 'Shipping Address Details will appear only when you save the ' + doc.doctype.toLowerCase();
-}
-*/
-/*
-// set history list message
-// -------------------------
-cur_frm.cscript.set_hl_msg = function(doc){
- cur_frm.history_html.innerHTML= 'History Details will appear only when you save the ' + doc.doctype.toLowerCase();
-}
-*/
-
-
-/*
-// make shipping address
-// -------------
-cur_frm.cscript.make_shipping_address = function(doc, dt, dn){
- cur_frm.shipping_html.innerHTML = '';
-
- var dsn = cur_frm.doc.customer_name;
- var dsa = cur_frm.doc.address;
- cl = new AddressList(cur_frm.shipping_html,dt,dn,dsn,dsa);
-}
-*/
-
-
-// make history
-// -------------
-cur_frm.cscript.make_history = function(doc,dt,dn){
- cur_frm.history_html.innerHTML = '';
- cur_frm.cscript.make_history_list(cur_frm.history_html,doc);
-}
-
-// make history list
-// ------------------
-cur_frm.cscript.make_history_list = function(parent,doc){
-
- var sel = $a(parent,'select');
-
- var ls = ['Select Transaction..'];
- for(d in cur_frm.history_dict){
- ls.push(d);
- }
-
- add_sel_options(sel,ls,'Select..');
-
- var body = $a(parent,'div');
- body.innerHTML = '<div class="help_box">Please select a transaction type to see History</div>';
-
- sel.body = body;
- sel.doc = doc;
-
- sel.onchange = function(){
- for(d in cur_frm.history_dict){
- if(sel_val(this) == d){
- this.body.innerHTML = '';
- eval(cur_frm.history_dict[d]);
- return;
- }
- else{
- // pass
- }
- }
- }
-}
-
-// run list
-// ---------
-cur_frm.cscript.run_list = function(lst,parent,q,q_max,doc,dn,nm){
-
- parent.innerHTML = '';
- $dh(parent);
-
- lst.doc = doc;
- lst.dn = dn;
- lst.nm = nm;
- lst.page_len = 10;
-
- lst.get_query = function(){
- this.query = q;
- this.query_max = q_max;
- }
-
- lst.make(parent);
- lst.run();
-
- lst.onrun = function(){
- $ds(parent);
- if(!this.has_data()){
- parent.innerHTML = '';
- var dv = $a(parent,'div','help_box');
- $a(dv,'span').innerHTML = "No " + this.dn + " found. ";
-
- var lbl = 'Create the <b>first</b> ' + this.dn + ' for ' + this.doc.name;
- var sp = $a(dv,'span');
- sp.nm = this.nm;
- $(sp).html(lbl).addClass('link_type').click(function(){ newdoc(this.nm); });
- }
- }
-}
-
-
-// get sates on country trigger
-// -----------------------------
-cur_frm.cscript.get_states=function(doc,dt,dn){
- $c('runserverobj', args={'method':'check_state', 'docs':compress_doclist([doc])},
- function(r,rt){
- if(r.message) {
- set_field_options('state', r.message);
- }
- }
- );
-
-}
-
-cur_frm.cscript.country = function(doc, dt, dn) {
- cur_frm.cscript.get_states(doc, dt, dn);
-}
-
-// territory help - cutsomer + sales partner
-// -----------------------------------------
-cur_frm.cscript.TerritoryHelp = function(doc,dt,dn){
- var call_back = function(){
-
- var sb_obj = new SalesBrowser();
- sb_obj.set_val('Territory');
- }
- loadpage('Sales Browser',call_back);
-}
-
-// get query select Territory
-// ---------------------------
-if(cur_frm.fields_dict['territory']){
- cur_frm.fields_dict['territory'].get_query = function(doc,dt,dn) {
- return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s" ORDER BY `tabTerritory`.`name` ASC LIMIT 50';
- }
-}
-
-
-// =======================================================================================================
-
-// contact list
-// --------------
-ContactList = function(parent,dt,dn,dsn){
-
- var me = this;
-
- this.dt = dt;
- this.dn = dn;
- this.dsn = dsn ? dsn : dn;
-
- this.wrapper = $a(parent,'div');
- me.get_list();
-}
-
-// add contact
-// ------------
-ContactList.prototype.add_contact = function(){
- var me = this;
-
- // onload - set default values
- var cont = LocalDB.create('Contact');
-
- var c = locals['Contact'][cont];
-
- if(me.dt == 'Customer') {
- c.is_customer = 1;
- c.customer = me.dn;
- c.customer_name = me.dsn;
- }
- else if(me.dt == 'Supplier'){
- c.is_supplier = 1;
- c.supplier = me.dn;
- c.supplier_name = me.dsn;
- }
- else if(me.dt == 'Sales Partner'){
- c.is_sales_partner = 1;
- c.sales_partner = me.dn;
- //c.sales_partner_name = me.dsn;
- }
-
- loaddoc('Contact',c.name);
-}
-
-// get contact list
-// -----------------
-ContactList.prototype.get_list = function(){
- var me = this;
-
- me.make_list();
-
- var dt = me.dt.toLowerCase().split(' ').join('_');
-
- // build query
- me.lst.get_query = function(){
- this.query = repl("select name, first_name, last_name, concat_ws(' ', first_name, last_name), email_id, contact_no, department, designation, is_primary_contact, has_login, disable_login from tabContact where %(dt)s = '%(dn)s' and docstatus != 2",{'dt':dt, 'dn':me.dn});
-
- this.query_max = repl("select count(name) from tabContact where %(dt)s = '%(dn)s' and docstatus != 2",{'dt':dt, 'dn':me.dn});
- }
-
- // render list ui
- me.lst.show_cell = function(cell,ri,ci,d){
- me.render_list(cell,ri,ci,d);
- }
-
- // run query
- me.lst.run();
-
- // onrun
- me.lst.onrun = function(){
- if(!this.has_data()){
- this.rec_label.innerHTML = '';
-
- $a(this.rec_label,'span').innerHTML = "You do not have any contact. ";
- $($a(this.rec_label,'span')).html('Add a new contact').addClass('link_type').click(function(){ me.add_contact(); });
-
- $dh(this.results);
- }
- else{
- $ds(this.results);
- }
- }
-}
-
-// make list
-// -----------
-ContactList.prototype.make_list = function(){
- var me = this;
-
- var l = new Listing();
- l.colwidths = ['5%','30%','30%','20%','20%'];
- l.colnames = ['Sr.','Contact Name','Email Id','Contact No', 'Action'];
- l.page_len = 10;
-
- me.lst = l;
-
- l.make(me.wrapper);
-
- // Add contact button
- me.add_btn = $btn(l.btn_area,'+ Add Contact', function(){ me.add_contact();}, {fontWeight:'bold'});
-}
-
-// make contact cell
-// ------------------
-ContactList.prototype.render_list = function(cell,ri,ci,d){
- var me = this;
-
- // name
- if(ci == 0){
- var nm = $a($a(cell,'div'),'span','',{cursor:'pointer'});
- nm.innerHTML = d[ri][3];
- nm.id = d[ri][0];
-
- nm.onclick = function(){
- loaddoc('Contact', this.id);
-
- // on save callback - refresh list
- }
-
- // department and designation
- var des = d[ri][7] ? d[ri][7] : '';
- var dep = d[ri][6] ? d[ri][6] : '';
-
- var sp = $a(cell,'div','comment');
- sp.innerHTML = des + (dep ? (', ' + dep) : '');
- }
-
- // email id, contact no, department, designation
- // -----------------------------------------------------
- if(ci == 1) cell.innerHTML = d[ri][4] ? d[ri][4] : '-';
- if(ci == 2) cell.innerHTML = d[ri][5] ? d[ri][5] : '-';
-
- // actions
- // --------------------------------------
- if(ci== 3) me.make_actions(cell,ri,ci,d);
-}
-
-// make actions
-// ---------------
-ContactList.prototype.make_actions = function(cell,ri,ci,d){
- var me = this;
-
- var tab = make_table(cell,1,2,'100%',['40%','60%']);
-
- // Edit and Delete
- var t = make_table($td(tab,0,0),1,2);
-
- var edit = $a($td(t,0,0),'div','wn-icon ic-doc_edit');
- $(edit).click(function(){ loaddoc('Contact',d[ri][0]); });
-
- edit.setAttribute('title','Edit');
-
-// Below code should be uncommented once customer/venodr invitation process is stable
-// ===========================================================================
-/*
- var del = $a($td(t,0,1),'div','wn-icon ic-trash');
- $(del).click(function(){ me.delete_contact(d[ri][0],d[ri][4]) });
-
- set_custom_tooltip(del, 'Delete');
-
- // Invite, Enable and Disable - Integrate after gateway logic incorporated
-
- if(d[ri][9] == 'Yes') {
- if(d[ri][10] == 'Yes'){
- var enb = $a($td(tab,0,1),'div','wn-icon ic-checkmark');
- $(enb).click(function(){ me.enable_login(d[ri][0], d[ri][4]); });
- }
- else{
- var dsb = $a($td(tab,0,1),'div','wn-icon ic-delete');
- $(dsb).click(function(){ me.disable_login(d[ri][0], d[ri][4]) });
- }
- }
- else{
- var inv = $a($td(tab,0,1),'div','wn-icon ic-mail');
- $(inv).click(function(){ me.invite_contact(d[ri][0], d[ri][4], d[ri][1], d[ri][2]) });
- }*/
-}
-
-// enable login
-// ----------------------------------------------------------
-ContactList.prototype.enable_login = function(id, email_id){
- var me = this;
-
- var callback = function(r,rt){
- me.get_list();
-
- if(!r.exc) msgprint('Login for contact enabled',1);
- else errprint(r.exc);
- }
-
- var args = {};
- args.contact = id;
- args.email = email_id;
-
- $c_obj('Contact Control','enable_login',JSON.stringify(args),callback);
-}
-
-// disable login
-// -------------------------------------------------------------
-ContactList.prototype.disable_login = function(id, email_id){
- var me = this;
-
- var callback = function(r,rt){
- me.get_list();
-
- if(!r.exc) msgprint('Login for contact disabled',1);
- else errprint(r.exc);
- }
-
- var args = {};
- args.contact = id;
- args.email = email_id;
-
- $c_obj('Contact Control','disable_login',JSON.stringify(args),callback);
-}
-
-// delete contact
-// -----------------
-ContactList.prototype.delete_contact = function(id,email_id,has_login){
- var me = this;
-
- var callback = function(r,rt){
- me.get_list();
-
- if(!r.exc) msgprint('Contact deleted successfully');
- else errprint(r.exc);
- }
-
- var args = {};
- args.contact = id;
- args.email = email_id;
- args.has_login = has_login;
-
- $c_obj('Contact Control','delete_contact',JSON.stringify(args),callback);
-}
-
-// invite user
-// --------------------------------------------------------
-ContactList.prototype.invite_contact = function(id,email_id,first_name,last_name){
- var me = this;
-
- if(!email_id){
- msgprint("Please add email id and save the contact first. You can then invite contact to view transactions.")
- }
- else{
- var callback = function(r,rt){
- if(!r.exc) msgprint('Invitation sent');
- else errprint(r.exc);
- }
-
- var args = {
- 'contact' : id,
- 'email' : email_id,
- 'first_name' : first_name ? first_name : '',
- 'last_name' : last_name ? last_name : '',
- 'usert_type' : 'Partner'
- };
-
- $c_obj('Contact Control','invite_contact',JSON.stringify(args),callback);
- }
-}
-
-
-// address list
-// --------------
-AddressList = function(parent,dt,dn,dsn,dsa){
-
- var me = this;
-
- this.dt = dt;
- this.dn = dn;
- this.dsn = dsn ? dsn : dn;
- this.dsa = dsa ? dsa : '';
-
- this.wrapper = $a(parent,'div');
- me.get_addr_list();
-}
-
-
-// add contact
-// ------------
-AddressList.prototype.add_address = function(){
- var me = this;
-
- // onload - set default values
- var addr = LocalDB.create('Shipping Address');
-
- var a = locals['Shipping Address'][addr];
-
- a.customer = me.dn;
- a.customer_name = me.dsn;
- a.customer_address = me.dsa;
- loaddoc('Shipping Address',a.name);
-}
-
-
-// get address list
-// -----------------
-AddressList.prototype.get_addr_list = function(){
- var me = this;
-
- me.make_addr_list();
-
- var dt = me.dt.toLowerCase().split(' ').join('_');
-
- // build query
- me.lst.get_query = function(){
- this.query = repl("select name, ship_to, shipping_address, is_primary_address, shipping_details from `tabShipping Address` where %(dt)s = '%(dn)s' and docstatus != 2",{'dt':dt, 'dn':me.dn});
-
- this.query_max = repl("select count(name) from `tabShipping Address` where %(dt)s = '%(dn)s'",{'dt':dt, 'dn':me.dn});
- }
-
- // render list ui
- me.lst.show_cell = function(cell,ri,ci,d){
- me.render_list(cell,ri,ci,d);
- }
-
- // run query
- me.lst.run();
-
- // onrun
- me.lst.onrun = function(){
- if(!this.has_data()){
- this.rec_label.innerHTML = '';
-
- $a(this.rec_label,'span').innerHTML = "You do not have any shipping address.";
- $($a(this.rec_label,'span')).html('Add a new address').addClass('link_type').click(function(){ me.add_address(); });
-
- $dh(this.results);
- }
- else{
- $ds(this.results);
- }
- }
-}
-
-
-// make list
-// -----------
-AddressList.prototype.make_addr_list = function(){
- var me = this;
-
- var l = new Listing();
- l.colwidths = ['5%', '15%', '25%','10%','35%','10%'];
- l.colnames = ['Sr.', 'Ship To', 'Shipping Address','Primary Address', 'Shipping Details', 'Action'];
- l.page_len = 10;
-
- me.lst = l;
-
- l.make(me.wrapper);
-
- // Add address button
- me.add_btn = $btn(l.btn_area,'+ Add Address', function(){ me.add_address();}, {fontWeight:'bold'});
-}
-
-
-
-// make address cell
-// ------------------
-AddressList.prototype.render_list = function(cell,ri,ci,d){
- var me = this;
-
- // name
- if(ci == 0){
- var nm = $a($a(cell,'div'),'span','',{cursor:'pointer'});
- nm.innerHTML = d[ri][1];
- nm.id = d[ri][0];
-
- nm.onclick = function(){
- loaddoc('Shipping Address', this.id);
- }
- }
-
- // shipping address, primary address, shipping details
- // ----------------------------------------------------
- if(ci == 1) cell.innerHTML = d[ri][2] ? d[ri][2] : '-';
- if(ci == 2) cell.innerHTML = d[ri][3] ? d[ri][3] : '-';
- if(ci == 3) cell.innerHTML = d[ri][4] ? d[ri][4] : '-';
-
- // actions
- // --------------------------------------
- if(ci== 4) me.make_actions(cell,ri,ci,d);
-}
-
-// make actions
-// ---------------
-AddressList.prototype.make_actions = function(cell,ri,ci,d){
- var me = this;
-
- var tab = make_table(cell,1,2,'100%',['40%','60%']);
-
- // Edit and Delete
- var t = make_table($td(tab,0,0),1,2);
-
- var edit = $a($td(t,0,0),'div','wn-icon ic-doc_edit');
- $(edit).click(function(){ loaddoc('Shipping Address',d[ri][0]); });
-
- edit.setAttribute('title','Edit');
-}
diff --git a/erpnext/setup/doctype/contact_control/contact_control.py b/erpnext/setup/doctype/contact_control/contact_control.py
deleted file mode 100644
index 3c25d7f..0000000
--- a/erpnext/setup/doctype/contact_control/contact_control.py
+++ /dev/null
@@ -1,103 +0,0 @@
-# Please edit this list and import only required elements
-import webnotes
-
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, generate_hash, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add
-from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, removechild, getchildren, make_autoname, SuperDocType
-from webnotes.model.doclist import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, is_testing, msgprint, errprint
-
-set = webnotes.conn.set
-sql = webnotes.conn.sql
-get_value = webnotes.conn.get_value
-in_transaction = webnotes.conn.in_transaction
-convert_to_lists = webnotes.conn.convert_to_lists
-
-# -----------------------------------------------------------------------------------------
-
-
-class DocType:
- def __init__(self,doc,doclist=[]):
- self.doc = doc
- self.doclist = doclist
-
- def enable_login(self,arg):
- arg = eval(arg)
- sql("update tabContact set disable_login = 'No' where name=%s",arg['contact'])
- sql("update tabProfile set enabled=1 where name=%s",arg['email'])
-
- def disable_login(self,arg):
- arg = eval(arg)
- sql("update tabContact set disable_login = 'Yes' where name=%s",arg['contact'])
- sql("update tabProfile set enabled=0 where name=%s",arg['email'])
-
- def create_login(self,arg):
- arg = eval(arg)
- cont_det = sql("select * from tabContact where name=%s",(arg['contact']),as_dict=1)
- if cont_det[0]['docstatus'] !=0:
- msgprint('Please save the corresponding contact first')
- raise Exception
-
- if sql("select name from tabProfile where name=%s",cont_det[0]['email_id']):
- msgprint('Profile with same name already exist.')
- raise Exception
- else:
- p = Document('Profile')
- p.name = cont_det[0]['email_id']
- p.first_name = cont_det[0]['first_name']
- p.last_name = cont_det[0]['last_name']
- p.email = cont_det[0]['email_id']
- p.cell_no = cont_det[0]['contact_no']
- p.password = 'password'
- p.enabled = 1
- p.user_type = 'Partner';
- p.save(1)
-
- get_obj(doc=p).on_update()
-
- role = []
- if cont_det[0]['contact_type'] == 'Individual':
- role = ['Customer']
- else:
- if cont_det[0]['is_customer']:
- role.append('Customer')
- if cont_det[0]['is_supplier']:
- role.append('Supplier')
- if cont_det[0]['is_sales_partner']:
- role.append('Partner')
-
- if role:
- prof_nm = p.name
- for i in role:
- r = Document('UserRole')
- r.parent = p.name
- r.role = i
- r.parenttype = 'Profile'
- r.parentfield = 'userroles'
- r.save(1)
-
- if i == 'Customer':
- def_keys = ['from_company','customer_name','customer']
- def_val = cont_det[0]['customer_name']
- self.set_default_val(def_keys,def_val,prof_nm)
-
- if i == 'Supplier':
- def_keys = ['supplier_name','supplier']
- def_val = cont_det[0]['supplier_name']
- self.set_default_val(def_keys,def_val,prof_nm)
-
- sql("update tabContact set has_login = 'Yes' where name=%s",cont_det[0]['name'])
- sql("update tabContact set disable_login = 'No' where name=%s",cont_det[0]['name'])
- msgprint('User login is created.')
-
- #------set default values---------
- def set_default_val(self,def_keys,def_val,prof_nm):
- for d in def_keys:
- kv = Document('DefaultValue')
- kv.defkey = d
- kv.defvalue = def_val
- kv.parent = prof_nm
- kv.parenttype = 'Profile'
- kv.parentfield = 'defaults'
- kv.save(1)
\ No newline at end of file
diff --git a/erpnext/setup/doctype/contact_control/contact_control.txt b/erpnext/setup/doctype/contact_control/contact_control.txt
deleted file mode 100644
index b9e84ad..0000000
--- a/erpnext/setup/doctype/contact_control/contact_control.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-# DocType, Contact Control
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:56',
- 'docstatus': 0,
- 'modified': '2010-09-20 14:06:57',
- 'modified_by': 'yogesh@webnotestech.com',
- 'owner': 'Administrator'
- },
-
- # These values are common for all DocType
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocType',
- 'in_create': 1,
- 'issingle': 1,
- 'module': 'Setup',
- 'name': '__common__',
- 'read_only': 1,
- 'section_style': 'Simple',
- 'server_code_error': ' ',
- 'show_in_menu': 0,
- 'version': 25
- },
-
- # These values are common for all DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Text',
- 'name': '__common__',
- 'parent': 'Contact Control',
- 'parentfield': 'fields',
- 'parenttype': 'DocType',
- 'permlevel': 0
- },
-
- # These values are common for all DocPerm
- {
- 'create': 0,
- 'doctype': 'DocPerm',
- 'idx': 1,
- 'name': '__common__',
- 'parent': 'Contact Control',
- 'parentfield': 'permissions',
- 'parenttype': 'DocType',
- 'permlevel': 0,
- 'read': 1,
- 'role': 'System Manager',
- 'write': 1
- },
-
- # DocType, Contact Control
- {
- 'doctype': 'DocType',
- 'name': 'Contact Control'
- },
-
- # DocPerm
- {
- 'doctype': 'DocPerm'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'header',
- 'idx': 1,
- 'label': 'Header'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'customer_intro',
- 'idx': 2,
- 'label': 'Customer Intro'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'supplier_intro',
- 'idx': 3,
- 'label': 'Supplier Intro'
- }
-]
\ No newline at end of file
diff --git a/erpnext/setup/doctype/country/country.js b/erpnext/setup/doctype/country/country.js
index 6074742..bb7eae6 100644
--- a/erpnext/setup/doctype/country/country.js
+++ b/erpnext/setup/doctype/country/country.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//Tips not required
/*
diff --git a/erpnext/setup/doctype/customer_group/customer_group.js b/erpnext/setup/doctype/customer_group/customer_group.js
index a2fe4b5..11794cc 100644
--- a/erpnext/setup/doctype/customer_group/customer_group.js
+++ b/erpnext/setup/doctype/customer_group/customer_group.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(){
diff --git a/erpnext/setup/doctype/customer_group/customer_group.py b/erpnext/setup/doctype/customer_group/customer_group.py
index 4537876..cc4a9e0 100644
--- a/erpnext/setup/doctype/customer_group/customer_group.py
+++ b/erpnext/setup/doctype/customer_group/customer_group.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
@@ -18,26 +34,32 @@
class DocType:
- def __init__(self, doc, doclist=[]):
- self.doc = doc
- self.doclist = doclist
- self.nsm_parent_field = 'parent_customer_group';
+ def __init__(self, doc, doclist=[]):
+ self.doc = doc
+ self.doclist = doclist
+ self.nsm_parent_field = 'parent_customer_group';
- # update Node Set Model
- def update_nsm_model(self):
- import webnotes
- import webnotes.utils.nestedset
- webnotes.utils.nestedset.update_nsm(self)
+ # update Node Set Model
+ def update_nsm_model(self):
+ import webnotes
+ import webnotes.utils.nestedset
+ webnotes.utils.nestedset.update_nsm(self)
- # ON UPDATE
- #--------------------------------------
- def on_update(self):
- # update nsm
- self.update_nsm_model()
+ # ON UPDATE
+ #--------------------------------------
+ def on_update(self):
+ # update nsm
+ self.update_nsm_model()
- def validate(self):
+ def validate(self):
+ if sql("select name from `tabCustomer Group` where name = %s and docstatus = 2", (self.doc.customer_group_name)):
+ msgprint("""Another %s record is trashed.
+ To untrash please go to Setup & click on Trash."""%(self.doc.customer_group_name), raise_exception = 1)
- if sql("select name from `tabCustomer Group` where name = %s and docstatus = 2", (self.doc.customer_group_name)):
- msgprint("%s record is trashed. To untrash please go to Setup & click on Trash."%(self.doc.customer_group_name), raise_exception = 1)
+ def on_trash(self):
+ cust = sql("select name from `tabCustomer` where ifnull(customer_group, '') = %s", self.doc.name)
+ if cust:
+ msgprint("""Customer Group: %s can not be trashed/deleted because it is used in customer: %s.
+ To trash/delete this, remove/change customer group in customer master""" % (self.doc.name, cust[0][0] or ''), raise_exception=1)
diff --git a/erpnext/setup/doctype/email_digest/email_digest.js b/erpnext/setup/doctype/email_digest/email_digest.js
index 81b37e4..67de256 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.js
+++ b/erpnext/setup/doctype/email_digest/email_digest.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.refresh = function(doc, dt, dn) {
doc = locals[dt][dn];
var save_msg = "You must <b>Save</b> the form before proceeding";
diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py
index e391d37..c5989bb 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.py
+++ b/erpnext/setup/doctype/email_digest/email_digest.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
import webnotes.utils
@@ -406,49 +422,6 @@
#webnotes.errprint(webnotes.getTraceback())
- def on_update(self):
- """
-
- """
- import webnotes
- args = {
- 'db_name': webnotes.conn.get_value('Control Panel', '', 'account_id'),
- 'event': 'setup.doctype.email_digest.email_digest.send'
- }
- from webnotes.utils.scheduler import Scheduler
- #print "before scheduler"
- sch = Scheduler()
- sch.connect()
-
- if self.doc.enabled == 1:
- # Create scheduler entry
- res = sch.conn.sql("""
- SELECT * FROM Event
- WHERE
- db_name = %(db_name)s AND
- event = %(event)s
- """, args)
-
- if not (res and res[0]):
- args['next_execution'] = self.get_next_execution()
- sch.conn.begin()
- sch.conn.sql("""
- INSERT INTO Event (db_name, event, `interval`, next_execution, recurring)
- VALUES (%(db_name)s, %(event)s, 86400, %(next_execution)s, 1)
- """, args)
- sch.conn.commit()
-
- else:
- # delete scheduler entry if no other email digest is enabled
- res = webnotes.conn.sql("""
- SELECT * FROM `tabEmail Digest`
- WHERE enabled=1
- """)
- if not (res and res[0]):
- sch.clear(args['db_name'], args['event'])
- #print "after on update"
-
-
def get_next_sending(self):
"""
@@ -783,7 +756,7 @@
send_date = dt_dict['server_dt'].date()
send_time = dt_dict['server_dt'].time()
- if (now_date == send_date) and (send_time <= now_time):
+ if (now_date == send_date):
#webnotes.msgprint('sending ' + ed_obj.doc.name)
ed_obj.send()
#else:
diff --git a/erpnext/setup/doctype/email_settings/email_settings.js b/erpnext/setup/doctype/email_settings/email_settings.js
index cbc6a44..599fbcc 100644
--- a/erpnext/setup/doctype/email_settings/email_settings.js
+++ b/erpnext/setup/doctype/email_settings/email_settings.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.refresh = function(doc,cdt,cdn){
if(!doc.outgoing_mail_server || !doc.mail_login || !doc.mail_password || !doc.auto_email_id || !doc.mail_port || !doc.use_ssl){
get_server_fields('set_vals','','',doc, cdt, cdn, 1);
diff --git a/erpnext/setup/doctype/email_settings/email_settings.py b/erpnext/setup/doctype/email_settings/email_settings.py
index 8cb5a56..0f930bc 100644
--- a/erpnext/setup/doctype/email_settings/email_settings.py
+++ b/erpnext/setup/doctype/email_settings/email_settings.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
sql = webnotes.conn.sql
diff --git a/erpnext/setup/doctype/features_setup/features_setup.py b/erpnext/setup/doctype/features_setup/features_setup.py
index 3a549d9..e26ca47 100644
--- a/erpnext/setup/doctype/features_setup/features_setup.py
+++ b/erpnext/setup/doctype/features_setup/features_setup.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
diff --git a/erpnext/setup/doctype/import_data_control/import_data_control.py b/erpnext/setup/doctype/import_data_control/import_data_control.py
index b9c98f1..e11c552 100644
--- a/erpnext/setup/doctype/import_data_control/import_data_control.py
+++ b/erpnext/setup/doctype/import_data_control/import_data_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/item_group/item_group.js b/erpnext/setup/doctype/item_group/item_group.js
index aa49363..40b66d3 100644
--- a/erpnext/setup/doctype/item_group/item_group.js
+++ b/erpnext/setup/doctype/item_group/item_group.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(){
diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py
index 223e53d..a3ed364 100644
--- a/erpnext/setup/doctype/item_group/item_group.py
+++ b/erpnext/setup/doctype/item_group/item_group.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
@@ -44,4 +60,10 @@
r = sql("select name from `tabItem Group` where name = '%s' and docstatus = 2"%(self.doc.item_group_name))
if r:
msgprint("'%s' record is trashed. To untrash please go to Setup & click on Trash."%(self.doc.item_group_name))
- raise Exception
\ No newline at end of file
+ raise Exception
+
+ def on_trash(self):
+ ig = sql("select name from `tabItem` where ifnull(item_group, '') = %s", self.doc.name)
+ if ig:
+ msgprint("""Item Group: %s can not be trashed/deleted because it is used in item: %s.
+ To trash/delete this, remove/change item group in item master""" % (self.doc.name, ig[0][0] or ''), raise_exception=1)
diff --git a/erpnext/setup/doctype/manage_account/manage_account.js b/erpnext/setup/doctype/manage_account/manage_account.js
index 63cc1d5..631fd0b 100644
--- a/erpnext/setup/doctype/manage_account/manage_account.js
+++ b/erpnext/setup/doctype/manage_account/manage_account.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// Validate
cur_frm.cscript.validate = function(doc, cdt, cdn) {
$c_obj(make_doclist(cdt, cdn), 'get_defaults', '', function(r, rt){
diff --git a/erpnext/setup/doctype/manage_account/manage_account.py b/erpnext/setup/doctype/manage_account/manage_account.py
index eed566e..15700e8 100644
--- a/erpnext/setup/doctype/manage_account/manage_account.py
+++ b/erpnext/setup/doctype/manage_account/manage_account.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
"""Global Defaults"""
import webnotes
diff --git a/erpnext/setup/doctype/naming_series/naming_series.js b/erpnext/setup/doctype/naming_series/naming_series.js
index a0216e2..cd70dd7 100644
--- a/erpnext/setup/doctype/naming_series/naming_series.js
+++ b/erpnext/setup/doctype/naming_series/naming_series.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// Settings
cur_frm.cscript.onload = function(doc, cdt, cdn){
var callback = function(r, rt){
diff --git a/erpnext/setup/doctype/naming_series/naming_series.py b/erpnext/setup/doctype/naming_series/naming_series.py
index 2ad1236..bef4987 100644
--- a/erpnext/setup/doctype/naming_series/naming_series.py
+++ b/erpnext/setup/doctype/naming_series/naming_series.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/notification_control/notification_control.js b/erpnext/setup/doctype/notification_control/notification_control.js
index d8133bb..32919b6 100644
--- a/erpnext/setup/doctype/notification_control/notification_control.js
+++ b/erpnext/setup/doctype/notification_control/notification_control.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.select_transaction = function(doc, dt, dn) {
if(doc.select_transaction) {
var callback = function(r,rt) {
diff --git a/erpnext/setup/doctype/notification_control/notification_control.py b/erpnext/setup/doctype/notification_control/notification_control.py
index ae37cbd..9dc0076 100644
--- a/erpnext/setup/doctype/notification_control/notification_control.py
+++ b/erpnext/setup/doctype/notification_control/notification_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/order_lost_reason/order_lost_reason.js b/erpnext/setup/doctype/order_lost_reason/order_lost_reason.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/order_lost_reason/order_lost_reason.js
+++ b/erpnext/setup/doctype/order_lost_reason/order_lost_reason.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/other_charges/other_charges.js b/erpnext/setup/doctype/other_charges/other_charges.js
index 6708e37..a6f457d 100644
--- a/erpnext/setup/doctype/other_charges/other_charges.js
+++ b/erpnext/setup/doctype/other_charges/other_charges.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
cur_frm.cscript.onload = function(doc, cdt, cdn) {
//
diff --git a/erpnext/setup/doctype/other_charges/other_charges.py b/erpnext/setup/doctype/other_charges/other_charges.py
index b8b9189..eb9ebb5 100644
--- a/erpnext/setup/doctype/other_charges/other_charges.py
+++ b/erpnext/setup/doctype/other_charges/other_charges.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/period/period.js b/erpnext/setup/doctype/period/period.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/period/period.js
+++ b/erpnext/setup/doctype/period/period.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/period_control/period_control.py b/erpnext/setup/doctype/period_control/period_control.py
index a14f133..ac32a6e 100644
--- a/erpnext/setup/doctype/period_control/period_control.py
+++ b/erpnext/setup/doctype/period_control/period_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/permission_control/permission_control.py b/erpnext/setup/doctype/permission_control/permission_control.py
index 044dff5..049a3f5 100644
--- a/erpnext/setup/doctype/permission_control/permission_control.py
+++ b/erpnext/setup/doctype/permission_control/permission_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/personalize/personalize.py b/erpnext/setup/doctype/personalize/personalize.py
index 552532d..acf71e5 100644
--- a/erpnext/setup/doctype/personalize/personalize.py
+++ b/erpnext/setup/doctype/personalize/personalize.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
class DocType:
diff --git a/erpnext/setup/doctype/price_list/price_list.js b/erpnext/setup/doctype/price_list/price_list.js
index 2eeab84..173e42f 100644
--- a/erpnext/setup/doctype/price_list/price_list.js
+++ b/erpnext/setup/doctype/price_list/price_list.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
cur_frm.cscript.onload = function(doc, cdt, cdn) {
diff --git a/erpnext/setup/doctype/price_list/price_list.py b/erpnext/setup/doctype/price_list/price_list.py
index c4bab3b..ec1a7c2 100644
--- a/erpnext/setup/doctype/price_list/price_list.py
+++ b/erpnext/setup/doctype/price_list/price_list.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/print_heading/print_heading.js b/erpnext/setup/doctype/print_heading/print_heading.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/print_heading/print_heading.js
+++ b/erpnext/setup/doctype/print_heading/print_heading.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/print_heading/print_heading.py b/erpnext/setup/doctype/print_heading/print_heading.py
index 1b15025..b735c79 100644
--- a/erpnext/setup/doctype/print_heading/print_heading.py
+++ b/erpnext/setup/doctype/print_heading/print_heading.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/role/role.js b/erpnext/setup/doctype/role/role.js
deleted file mode 100644
index 672f4ac..0000000
--- a/erpnext/setup/doctype/role/role.js
+++ /dev/null
@@ -1,6 +0,0 @@
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
-
- def t1(self):
- msgprint('role')
\ No newline at end of file
diff --git a/erpnext/setup/doctype/role/role.py b/erpnext/setup/doctype/role/role.py
deleted file mode 100644
index 4c9d7f5..0000000
--- a/erpnext/setup/doctype/role/role.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# Please edit this list and import only required elements
-import webnotes
-
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, generate_hash, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add
-from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, removechild, getchildren, make_autoname, SuperDocType
-from webnotes.model.doclist import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, is_testing, msgprint, errprint
-
-set = webnotes.conn.set
-sql = webnotes.conn.sql
-get_value = webnotes.conn.get_value
-in_transaction = webnotes.conn.in_transaction
-convert_to_lists = webnotes.conn.convert_to_lists
-
-# -----------------------------------------------------------------------------------------
-
-
-class DocType:
- def __init__(self, d, dl):
- self.doc, self.doclist = d, dl
-
- def t1(self):
- msgprint('role')
\ No newline at end of file
diff --git a/erpnext/setup/doctype/role/role.txt b/erpnext/setup/doctype/role/role.txt
deleted file mode 100644
index afebb31..0000000
--- a/erpnext/setup/doctype/role/role.txt
+++ /dev/null
@@ -1,114 +0,0 @@
-# DocType, Role
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2009-05-12 11:19:11',
- 'docstatus': 0,
- 'modified': '2010-12-28 17:02:39',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all DocType
- {
- '_last_update': '1307624201',
- 'allow_copy': 0,
- 'allow_email': 0,
- 'allow_print': 0,
- 'autoname': 'field:role_name',
- 'colour': 'White:FFF',
- 'doctype': 'DocType',
- 'hide_heading': 0,
- 'hide_toolbar': 0,
- 'idx': 0,
- 'issingle': 0,
- 'istable': 0,
- 'module': 'Setup',
- 'name': '__common__',
- 'read_only': 0,
- 'section_style': 'Simple',
- 'server_code_error': ' ',
- 'show_in_menu': 0,
- 'version': 1
- },
-
- # These values are common for all DocField
- {
- 'doctype': 'DocField',
- 'name': '__common__',
- 'parent': 'Role',
- 'parentfield': 'fields',
- 'parenttype': 'DocType',
- 'permlevel': 0
- },
-
- # These values are common for all DocPerm
- {
- 'cancel': 0,
- 'create': 1,
- 'doctype': 'DocPerm',
- 'execute': 0,
- 'idx': 1,
- 'name': '__common__',
- 'parent': 'Role',
- 'parentfield': 'permissions',
- 'parenttype': 'DocType',
- 'permlevel': 0,
- 'read': 1,
- 'role': 'Administrator',
- 'submit': 0,
- 'write': 1
- },
-
- # DocType, Role
- {
- 'doctype': 'DocType',
- 'name': 'Role'
- },
-
- # DocPerm
- {
- 'doctype': 'DocPerm'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'module',
- 'fieldtype': 'Select',
- 'idx': 1,
- 'label': 'Module',
- 'oldfieldname': 'module',
- 'oldfieldtype': 'Select',
- 'options': 'link:Module Def',
- 'reqd': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'role_name',
- 'fieldtype': 'Data',
- 'idx': 2,
- 'label': 'Role Name',
- 'oldfieldname': 'role_name',
- 'oldfieldtype': 'Data',
- 'reqd': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'defaults',
- 'fieldtype': 'Table',
- 'hidden': 0,
- 'idx': 3,
- 'label': 'Defaults',
- 'oldfieldname': 'defaults',
- 'oldfieldtype': 'Table',
- 'options': 'DefaultValue',
- 'reqd': 0,
- 'search_index': 0
- }
-]
\ No newline at end of file
diff --git a/erpnext/setup/doctype/sales_browser_control/sales_browser_control.py b/erpnext/setup/doctype/sales_browser_control/sales_browser_control.py
index e9f8242..3d820e1 100644
--- a/erpnext/setup/doctype/sales_browser_control/sales_browser_control.py
+++ b/erpnext/setup/doctype/sales_browser_control/sales_browser_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.js b/erpnext/setup/doctype/sales_partner/sales_partner.js
index e829e29..1194756 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.js
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
$import(Contact Control)
cur_frm.cscript.onload = function(doc,dt,dn){
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.py b/erpnext/setup/doctype/sales_partner/sales_partner.py
index 7258611..c92c120 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.py
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/sales_person/sales_person.js b/erpnext/setup/doctype/sales_person/sales_person.js
index aef79a3..0057ff0 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.js
+++ b/erpnext/setup/doctype/sales_person/sales_person.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
}
diff --git a/erpnext/setup/doctype/sales_person/sales_person.py b/erpnext/setup/doctype/sales_person/sales_person.py
index fbcb83e..651cfb4 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.py
+++ b/erpnext/setup/doctype/sales_person/sales_person.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/setup_control/setup_control.py b/erpnext/setup/doctype/setup_control/setup_control.py
index b003c18..50b9bb0 100644
--- a/erpnext/setup/doctype/setup_control/setup_control.py
+++ b/erpnext/setup/doctype/setup_control/setup_control.py
@@ -1,21 +1,27 @@
-# Please edit this list and import only required elements
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, generate_hash, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add
-from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, removechild, getchildren, make_autoname, SuperDocType
-from webnotes.model.doclist import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, is_testing, msgprint, errprint
+from webnotes.utils import cint, cstr, flt, getdate, now, nowdate
+from webnotes.model.doc import Document, addchild
+from webnotes.model.code import get_obj
+from webnotes import session, form, msgprint
-set = webnotes.conn.set
sql = webnotes.conn.sql
-get_value = webnotes.conn.get_value
-in_transaction = webnotes.conn.in_transaction
-convert_to_lists = webnotes.conn.convert_to_lists
-
-# -----------------------------------------------------------------------------------------
-
class DocType:
def __init__(self, d, dl):
@@ -42,8 +48,8 @@
args = json.loads(args)
self.set_cp_defaults(args['company'], args['industry'], args['time_zone'], args['country'], args['account_name'])
- self.create_profile(args['user'], args['first_name'], args['last_name'], args.get('pwd'))
-
+ self.create_profile(args['user'], args['first_name'], args['last_name'], args.get('pwd'))
+
# Domain related updates
try:
from server_tools.gateway_utils import add_domain_map
@@ -52,38 +58,48 @@
pass
# add record in domain_list of Website Settings
- webnotes.conn.set_value('Website Settings', 'Website Settings', 'subdomain', args['url_name'] + ".erpnext.com")
+ account_url = args['url_name'] + '.erpnext.com'
+ webnotes.conn.set_value('Website Settings', 'Website Settings',
+ 'subdomain', account_url)
# Account Setup
# ---------------
def setup_account(self, args):
- import webnotes
- company_name, comp_abbr, fy_start, currency, first_name, last_name = eval(args)
- curr_fiscal_year,fy_start_date = self.get_fy_details(fy_start)
- self.currency = currency
+ import webnotes, json
+ args = json.loads(args)
+
+ curr_fiscal_year, fy_start_date, fy_abbr = self.get_fy_details(args.get('fy_start'))
+
+ args['name'] = webnotes.session.get('user')
# Update Profile
- if last_name=='None': last_name = None
+ if not args.get('last_name') or args.get('last_name')=='None': args['last_name'] = None
webnotes.conn.sql("""\
- UPDATE `tabProfile` SET first_name=%s, last_name=%s
- WHERE name=%s AND docstatus<2""", (first_name, last_name, webnotes.user.name))
+ UPDATE `tabProfile` SET first_name=%(first_name)s,
+ last_name=%(last_name)s
+ WHERE name=%(name)s AND docstatus<2""", args)
# Fiscal Year
- master_dict = {'Fiscal Year':{'year':curr_fiscal_year, 'year_start_date':fy_start_date}}
+ master_dict = {'Fiscal Year':{
+ 'year': curr_fiscal_year,
+ 'year_start_date': fy_start_date,
+ 'abbreviation': fy_abbr,
+ 'company': args.get('company_name'),
+ 'is_fiscal_year_closed': 'No'}}
self.create_records(master_dict)
# Company
- master_dict = {'Company':{'company_name':company_name,
- 'abbr':comp_abbr,
- 'default_currency':currency
- }}
+ master_dict = {'Company':{'company_name':args.get('company_name'),
+ 'abbr':args.get('company_abbr'),
+ 'default_currency':args.get('currency')
+ }}
self.create_records(master_dict)
def_args = {'current_fiscal_year':curr_fiscal_year,
- 'default_currency': currency,
- 'default_company':company_name,
+ 'default_currency': args.get('currency'),
+ 'default_company':args.get('company_name'),
'default_valuation_method':'FIFO',
'default_stock_uom':'Nos',
'date_format':'dd-mm-yyyy',
@@ -95,21 +111,51 @@
'emp_created_by':'Naming Series',
'cust_master_name':'Customer Name',
'supp_master_name':'Supplier Name',
- 'default_currency_format': (currency=='INR') and 'Lacs' or 'Millions'
+ 'default_currency_format': \
+ (args.get('currency')=='INR') and 'Lacs' or 'Millions'
}
# Set
self.set_defaults(def_args)
- # Set Registration Complete
- set_default('registration_complete','1')
+ self.create_feed_and_todo()
- msgprint("Great! Your company has now been created")
+ webnotes.clear_cache()
+ msgprint("Company setup is complete")
import webnotes.utils
- user_fullname = (first_name or '') + (last_name and (" " + last_name) or '')
+ user_fullname = (args.get('first_name') or '') + (args.get('last_name')
+ and (" " + args.get('last_name')) or '')
return {'sys_defaults': webnotes.utils.get_defaults(), 'user_fullname': user_fullname}
+ def create_feed_and_todo(self):
+ """update activty feed and create todo for creation of item, customer, vendor"""
+ import home
+ home.make_feed('Comment', 'ToDo Item', '', webnotes.session['user'],
+ '<i>"' + 'Setup Complete. Please check your <a href="#!todo">\
+ To Do List</a>' + '"</i>', '#6B24B3')
+
+ d = Document('ToDo Item')
+ d.description = 'Create your first Customer'
+ d.priority = 'High'
+ d.date = nowdate()
+ d.reference_type = 'Customer'
+ d.save(1)
+
+ d = Document('ToDo Item')
+ d.description = 'Create your first Item'
+ d.priority = 'High'
+ d.date = nowdate()
+ d.reference_type = 'Item'
+ d.save(1)
+
+ d = Document('ToDo Item')
+ d.description = 'Create your first Supplier'
+ d.priority = 'High'
+ d.date = nowdate()
+ d.reference_type = 'Supplier'
+ d.save(1)
+
# Get Fiscal year Details
# ------------------------
@@ -122,9 +168,11 @@
#eddt = sql("select DATE_FORMAT(DATE_SUB(DATE_ADD('%s', INTERVAL 1 YEAR), INTERVAL 1 DAY),'%%d-%%m-%%Y')" % (stdt.split('-')[2]+ '-' + stdt.split('-')[1] + '-' + stdt.split('-')[0]))
if(fy_start == '1st Jan'):
fy = cstr(getdate(nowdate()).year)
+ abbr = cstr(fy)[-2:]
else:
fy = cstr(curr_year) + '-' + cstr(curr_year+1)
- return fy,stdt
+ abbr = cstr(curr_year)[-2:] + '-' + cstr(curr_year+1)[-2:]
+ return fy, stdt, abbr
# Create Company and Fiscal Year
@@ -191,14 +239,6 @@
d = addchild(pr,'userroles', 'UserRole', 1)
d.role = r
d.save(1)
-
-
- # Sync DB
- # -------
- def sync_db(arg=''):
- import webnotes.model.db_schema
- sql("delete from `tabDocType Update Register`")
- webnotes.model.db_schema.sync_all()
def is_setup_okay(self, args):
@@ -208,21 +248,14 @@
from server_tools.gateway_utils import get_total_users
- args = eval(args)
- #webnotes.logger.error("args in set_account_details of setup_control: " + str(args))
-
+ args = eval(args)
cp_defaults = webnotes.conn.get_value('Control Panel', None, 'account_id')
-
user_profile = webnotes.conn.get_value('Profile', args['user'], 'name')
from webnotes.utils import cint
total_users = get_total_users()
-
- #webnotes.logger.error("setup_control.is_setup_okay: " + cp_defaults + " " + user_profile + " " + str(total_users))
-
- #webnotes.logger.error("setup_control.is_setup_okay: Passed Values:" + args['account_name'] + " " + args['user'] + " " + str(args['total_users']))
-
+
if (cp_defaults==args['account_name']) and user_profile and \
(total_users==cint(args['total_users'])):
return 'True'
diff --git a/erpnext/setup/doctype/setup_wizard_control/setup_wizard_control.py b/erpnext/setup/doctype/setup_wizard_control/setup_wizard_control.py
index f6b04eb..ec54f54 100644
--- a/erpnext/setup/doctype/setup_wizard_control/setup_wizard_control.py
+++ b/erpnext/setup/doctype/setup_wizard_control/setup_wizard_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/state/state.js b/erpnext/setup/doctype/state/state.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/state/state.js
+++ b/erpnext/setup/doctype/state/state.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/supplier_type/supplier_type.js b/erpnext/setup/doctype/supplier_type/supplier_type.js
index e34ca8c..306ead0 100644
--- a/erpnext/setup/doctype/supplier_type/supplier_type.js
+++ b/erpnext/setup/doctype/supplier_type/supplier_type.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// ONLOAD
diff --git a/erpnext/setup/doctype/term/term.js b/erpnext/setup/doctype/term/term.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/term/term.js
+++ b/erpnext/setup/doctype/term/term.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/territory/territory.js b/erpnext/setup/doctype/territory/territory.js
index 91f7da6..3752f26 100644
--- a/erpnext/setup/doctype/territory/territory.js
+++ b/erpnext/setup/doctype/territory/territory.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
diff --git a/erpnext/setup/doctype/territory/territory.py b/erpnext/setup/doctype/territory/territory.py
index 26805be..8017ad5 100644
--- a/erpnext/setup/doctype/territory/territory.py
+++ b/erpnext/setup/doctype/territory/territory.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
@@ -58,4 +74,11 @@
for d in getlist(self.doclist, 'target_details'):
if not flt(d.target_qty) and not flt(d.target_amount):
msgprint("Either target qty or target amount is mandatory.")
- raise Exception
\ No newline at end of file
+ raise Exception
+
+
+ def on_trash(self):
+ terr = sql("select name from `tabCustomer` where ifnull(territory, '') = %s", self.doc.name)
+ if terr:
+ msgprint("""Territory: %s can not be trashed/deleted because it is used in territory: %s.
+ To trash/delete this, remove/change territory in customer master""" % (self.doc.name, terr[0][0] or ''), raise_exception=1)
diff --git a/erpnext/setup/doctype/uom/uom.js b/erpnext/setup/doctype/uom/uom.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/uom/uom.js
+++ b/erpnext/setup/doctype/uom/uom.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/update_series/update_series.py b/erpnext/setup/doctype/update_series/update_series.py
index dcca22a..b8a0477 100644
--- a/erpnext/setup/doctype/update_series/update_series.py
+++ b/erpnext/setup/doctype/update_series/update_series.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.js b/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.js
index 041638f..4f46546 100644
--- a/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.js
+++ b/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
cur_frm.cscript.onload = function(doc, cdt, cdn) {
diff --git a/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.py b/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.py
index 35564bb..2d695f3d 100644
--- a/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.py
+++ b/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/warehouse_type/warehouse_type.js b/erpnext/setup/doctype/warehouse_type/warehouse_type.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/warehouse_type/warehouse_type.js
+++ b/erpnext/setup/doctype/warehouse_type/warehouse_type.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/workflow_engine/workflow_engine.py b/erpnext/setup/doctype/workflow_engine/workflow_engine.py
index bf9b1ef..6f7aea7 100644
--- a/erpnext/setup/doctype/workflow_engine/workflow_engine.py
+++ b/erpnext/setup/doctype/workflow_engine/workflow_engine.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/workflow_rule/workflow_rule.js b/erpnext/setup/doctype/workflow_rule/workflow_rule.js
index 3fda3eb..1570045 100644
--- a/erpnext/setup/doctype/workflow_rule/workflow_rule.js
+++ b/erpnext/setup/doctype/workflow_rule/workflow_rule.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/workflow_rule/workflow_rule.py b/erpnext/setup/doctype/workflow_rule/workflow_rule.py
index 792cbf0..36cdbd3 100644
--- a/erpnext/setup/doctype/workflow_rule/workflow_rule.py
+++ b/erpnext/setup/doctype/workflow_rule/workflow_rule.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/page/import_data/import_data.js b/erpnext/setup/page/import_data/import_data.js
index f1601e7..aeb7dad 100644
--- a/erpnext/setup/page/import_data/import_data.js
+++ b/erpnext/setup/page/import_data/import_data.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript['onload_Import Data'] = function() {
//alert(profile.can_get_report);
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/setup/page/modules_setup/__init__.py
similarity index 100%
rename from erpnext/setup/doctype/role/__init__.py
rename to erpnext/setup/page/modules_setup/__init__.py
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/setup/page/modules_setup/modules_setup.css
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/setup/page/modules_setup/modules_setup.css
diff --git a/erpnext/setup/page/modules_setup/modules_setup.html b/erpnext/setup/page/modules_setup/modules_setup.html
new file mode 100644
index 0000000..ea136ff
--- /dev/null
+++ b/erpnext/setup/page/modules_setup/modules_setup.html
@@ -0,0 +1,14 @@
+<div class="layout-wrapper">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Modules Setup</h1>
+ <hr>
+ <div class="help" style="width: 300px; float: right">
+ Select checkbox to show / hide module. Drag around to move order.
+ </div>
+ <div id="modules-list">
+ </div>
+ <div>
+ <button class="btn btn-small btn-primary" id="modules-update"
+ onclick="wn.pages.modules_setup.update()">Update</button>
+ </div>
+</div>
\ No newline at end of file
diff --git a/erpnext/setup/page/modules_setup/modules_setup.js b/erpnext/setup/page/modules_setup/modules_setup.js
new file mode 100644
index 0000000..af7522f
--- /dev/null
+++ b/erpnext/setup/page/modules_setup/modules_setup.js
@@ -0,0 +1,50 @@
+wn.require('lib/js/lib/jquery-ui-sortable.min.js');
+
+$.extend(wn.pages.modules_setup, {
+ modules: ['Activity', 'Accounts', 'Selling', 'Buying', 'Stock', 'Production', 'Projects',
+ 'Support', 'HR', 'Website', 'To Do', 'Messages', 'Calendar', 'Knowledge Base'],
+ onload: function(wrapper) {
+ wn.pages.modules_setup.refresh(wn.boot.modules_list);
+ },
+ refresh: function(ml) {
+ $('#modules-list').empty();
+
+ // checked modules
+ for(i in ml) {
+ $('#modules-list').append(repl('<p style="cursor:move;">\
+ <input type="checkbox" data-module="%(m)s"> \
+ %(m)s</p>', {m:ml[i]}));
+ }
+ $('#modules-list [data-module]').attr('checked', true);
+
+ // unchecked modules
+ var all = wn.pages.modules_setup.modules;
+ for(i in all) {
+ if(!$('#modules-list [data-module="'+all[i]+'"]').length) {
+ $('#modules-list').append(repl('<p style="cursor:move;">\
+ <input type="checkbox" data-module="%(m)s"> \
+ %(m)s</p>', {m:all[i]}));
+ }
+ }
+
+ $('#modules-list').sortable();
+
+ },
+ update: function() {
+ var ml = [];
+ $('#modules-list [data-module]').each(function() {
+ if($(this).attr('checked'))
+ ml.push($(this).attr('data-module'));
+ });
+
+ wn.call({
+ method: 'setup.page.modules_setup.modules_setup.update',
+ args: {
+ ml: JSON.stringify(ml)
+ },
+ callback: function(r) {
+ },
+ btn: $('#modules-update').get(0)
+ });
+ }
+});
\ No newline at end of file
diff --git a/erpnext/setup/page/modules_setup/modules_setup.py b/erpnext/setup/page/modules_setup/modules_setup.py
new file mode 100644
index 0000000..ee36dfa
--- /dev/null
+++ b/erpnext/setup/page/modules_setup/modules_setup.py
@@ -0,0 +1,8 @@
+import webnotes
+
+@webnotes.whitelist()
+def update(arg=None):
+ """update modules"""
+ webnotes.conn.set_global('modules_list', webnotes.form_dict['ml'])
+ webnotes.msgprint('Updated')
+ webnotes.clear_cache()
\ No newline at end of file
diff --git a/erpnext/setup/page/modules_setup/modules_setup.txt b/erpnext/setup/page/modules_setup/modules_setup.txt
new file mode 100644
index 0000000..70c6a90
--- /dev/null
+++ b/erpnext/setup/page/modules_setup/modules_setup.txt
@@ -0,0 +1,28 @@
+# Page, modules_setup
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-28 17:48:39',
+ 'docstatus': 0,
+ 'modified': '2012-02-28 17:48:39',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Setup',
+ 'name': '__common__',
+ 'page_name': u'modules_setup',
+ 'standard': u'Yes',
+ 'title': u'Modules Setup'
+ },
+
+ # Page, modules_setup
+ {
+ 'doctype': 'Page',
+ 'name': u'modules_setup'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/setup/page/permission_engine/permission_engine.js b/erpnext/setup/page/permission_engine/permission_engine.js
index f4f6fe8..1d77e51 100644
--- a/erpnext/setup/page/permission_engine/permission_engine.js
+++ b/erpnext/setup/page/permission_engine/permission_engine.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript['onload_Permission Engine'] = function() {
// header and toolbar
var h = new PageHeader('pe_header','Permissions Manager','Set specific permissions for Roles')
diff --git a/erpnext/setup/page/setup/setup.css b/erpnext/setup/page/setup/setup.css
new file mode 100644
index 0000000..bff44db
--- /dev/null
+++ b/erpnext/setup/page/setup/setup.css
@@ -0,0 +1,6 @@
+.setup-column {
+ float: left;
+ width: 45%;
+ margin-right: 5%;
+ margin-bottom: 15px;
+}
\ No newline at end of file
diff --git a/erpnext/setup/page/setup/setup.html b/erpnext/setup/page/setup/setup.html
index ec21ab7..50ef112 100644
--- a/erpnext/setup/page/setup/setup.html
+++ b/erpnext/setup/page/setup/setup.html
@@ -1,3 +1,128 @@
-<div id="setup_div" class="layout_wrapper">
- <div style="margin: 200px auto; text-align: center; color: #888">Loading...</div>
+<div class="layout-wrapper">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Setup</h1>
+ <hr>
+ <div class="setup-column">
+ <h3>Company</h3>
+ <p>
+ <b><a href="#!List/Company">Companies</a></b><br>
+ <span class="help">List of companies (not customers / suppliers)</span>
+ </p>
+ <p>
+ <b><a href="#!List/Fiscal Year">Fiscal Years</a></b><br>
+ <span class="help">Financial Years for books of accounts</span>
+ </p>
+ <p>
+ <b><a href="#!List/Currency">Currencies</a></b><br>
+ <span class="help">Currency Master</span>
+ </p>
+ </div>
+ <div class="setup-column">
+ <h3>Users and Permissions</h3>
+ <p>
+ <b><a href="#!users">Users</a></b><br>
+ <span class="help">Add/remove users, set roles, passwords etc</span>
+ </p>
+ <p>
+ <b><a href="#!Permission Engine">Permission Manager</a></b><br>
+ <span class="help">Set permissions on transactions / masters</span>
+ </p>
+ <p>
+ <b><a href="#!List/Authorization Rule">Amount based Authorization Rules</a></b><br>
+ <span class="help">Restrict submission rights based on amount</span>
+ </p>
+ <p>
+ <b><a href="#!modules_setup">Modules Setup</a></b><br>
+ <span class="help">Show, hide modules</span>
+ </p>
+ </div>
+ <div class="setup-column">
+ <h3>Data</h3>
+ <p>
+ <b><a href="#!Import Data">Import Data</a></b><br>
+ <span class="help">Import data from spreadsheet (csv) files</span>
+ </p>
+ <p>
+ <b><a href="#!Form/Manage Account/Manage Account">Global Defaults</a></b><br>
+ <span class="help">Set default values for entry</span>
+ </p>
+ <p>
+ <b><a href="#!Trash">Recycle Bin</a></b><br>
+ <span class="help">Un-trash items</span>
+ </p>
+ <p>
+ <b><a href="#!Form/Rename Tool/Rename Tool">Rename Master</a></b><br>
+ <span class="help">Rename a single master record</span>
+ </p>
+ <p>
+ <b><a href="#!List/Bulk Rename Tool">Rename Many</a></b><br>
+ <span class="help">Rename by uploading a csv file</span>
+ </p>
+ </div>
+ <div class="setup-column">
+ <h3>Email and Notifications</h3>
+ <p>
+ <b><a href="#!Form/Email Settings/Email Settings">Email Settings</a></b><br>
+ <span class="help">Out going mail server and support ticket mailbox</span>
+ </p>
+ <p>
+ <b><a href="#!Form/Notification Control/Notification Control">Auto Notifications</a></b><br>
+ <span class="help">Automatic email sending to customers and suppliers</span>
+ </p>
+ <p>
+ <b><a href="#!List/Email Digest">Email Digests</a></b><br>
+ <span class="help">Daily, weekly, monthly email Digests</span>
+ </p>
+ <p>
+ <b><a href="#!Form/SMS Settings/SMS Settings">SMS Setup</a></b><br>
+ <span class="help">Setup outgoing SMS via your bulk SMS provider</span>
+ </p>
+ <p>
+ <b><a href="#!Form/SMS Center/SMS Center">Send Bulk SMS</a></b><br>
+ <span class="help">Send bulk SMS to leads, customers, contacts</span>
+ </p>
+ </div>
+ <div class="setup-column">
+ <h3>Customize ERPNext</h3>
+ <p>
+ <b><a href="#!List/Custom Field">Custom Fields</a></b><br>
+ <span class="help">Add fields to forms</span>
+ </p>
+ <p>
+ <b><a href="#!Form/DocLayer/DocLayer">Customize Forms</a></b><br>
+ <span class="help">Change entry properties (hide fields, make mandatory etc)</span>
+ </p>
+ <p>
+ <b><a href="#!Form/Naming Series/Naming Series">Numbering Series</a></b><br>
+ <span class="help">Set multiple numbering series for transactions</span>
+ </p>
+ <p>
+ <b><a href="#!Form/Features Setup/Features Setup">Disable Features</a></b><br>
+ <span class="help">Simplify entry forms by disabling features</span>
+ </p>
+ </div>
+ <div class="setup-column">
+ <h3>Branding and Printing</h3>
+ <p>
+ <b><a href="#!List/Letter Head">Letter Heads</a></b><br>
+ <span class="help">Letter heads for print</span>
+ </p>
+ <p>
+ <b><a href="#!List/Print Format">Print Formats</a></b><br>
+ <span class="help">HTML print formats for quotes, invoices etc</span>
+ </p>
+ <p>
+ <b><a href="#!List/Print Heading">Print Headings</a></b><br>
+ <span class="help">Add headers for standard print formats</span>
+ </p>
+ <p>
+ <b><a href="#!Form/Personalize/Personalize">Home Banner</a></b><br>
+ <span class="help">Add a home page banner</span>
+ </p>
+ <p>
+ <b><a href="#!Form/Style Settings/Style Settings">Style Settings</a></b><br>
+ <span class="help">Change background fonts etc</span>
+ </p>
+ </div>
+ <div style="clear: both"></div>
</div>
\ No newline at end of file
diff --git a/erpnext/setup/page/setup/setup.js b/erpnext/setup/page/setup/setup.js
index d58f11a..3ee0027 100644
--- a/erpnext/setup/page/setup/setup.js
+++ b/erpnext/setup/page/setup/setup.js
@@ -1,255 +1,19 @@
-pscript.onload_Setup = function() {
- var parent = $i('setup_div');
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
- var callback = function(r,rt){
- $('#setup_div').empty();
- // header
- parent.page_head = new PageHeader(parent,'Setup');
-
- // sections
- var setup_data = new SetupData(r.message);
- pscript.setup_make_sections(setup_data);
-
- }
- $c_obj('Setup Wizard Control','get_country','',callback);
-}
-
-pscript.setup_set_height = function() {
- var parent = $i('setup_div');
- $y(parent.tray.body, {height: get_window_height() - parent.page_head.wrapper.offsetHeight + 'px', overflow:'auto'})
-}
-
-// Make sections
-// ===================================================
-
-pscript.setup_make_sections = function(setup_data) {
- var parent = $i('setup_div');
- parent.tray = new TrayPage(parent)
-
- // list of setup data
- var lst = [setup_data.system, setup_data.general, setup_data.accounts, setup_data.selling, setup_data.buying, setup_data.stock, setup_data.hr, setup_data.maintenance, setup_data.production];
-
- for(var s=0; s<lst.length; s++){
- var lbl = keys(lst[s])[0];
-
- var ti = parent.tray.add_item(lbl, null, null, 1)
- new SetupItem(ti.body, lbl, lst[s][lbl]);
-
- if(s==0) ti.expand();
- }
-
- setTimeout(pscript.setup_set_height, 100);
- resize_observers.push(pscript.setup_set_height);
-}
-
-// Setup Item
-// ===================================================
-SetupItem = function(parent, lbl, link_list) {
- this.icons = {'System':'back_img Setup', 'General':'back_img Home', 'Accounts':'back_img Accounts', 'Selling':'back_img Selling', 'Stock':'back_img Stock', 'Buying':'back_img Buying', 'Maintenance':'back_img Maintenance', 'Production':'back_img Production', 'HR':'back_img HR'};
- this.make_item_body(parent, lbl, link_list);
-}
-
-
-// Make body for item in setup wizard
-// ===================================================
-SetupItem.prototype.make_item_body = function(parent, lbl, link_list){
- // item link area
- this.link_area = parent;
- this.render_item_body(lbl, link_list);
-}
-
-
-// Render item body
-// ===================================================
-SetupItem.prototype.render_item_body = function(lbl, link_list) {
- var me = this;
- // set item header
-
- link_list.sort(function(a, b) { return a[0] > b[0]; });
-
- // show links for item
- for(var i=0; i<link_list.length; i++){
- var wrapper = $a(this.link_area, 'div','',{marginBottom:'4px', padding:'2px'});
- $(wrapper).hover(
- function() { $y(this,{backgroundColor:'#EEF'}) }
- ,function() { $y(this,{backgroundColor:''}) }
- )
- var tab = make_table($a(wrapper,'div'), 1, 2, '100%', [200/7+'%', 500/7+'%'])
-
- var dt= $a($td(tab,0,0), 'span', 'link_type');
- dt.innerHTML = link_list[i][0];
- dt.label = link_list[i][0];
- dt.arg = link_list[i][1];
- dt.nm = link_list[i][2];
-
- if(dt.arg == 1) dt.cn = link_list[i][3];
- else if(dt.arg == 2) dt.cb=link_list[i][3];
-
- // execute when link is clicked
- dt.onclick = function(){
- me.link_action(this)
- }
-
- // description
- $y($td(tab,0,1), {color:'#777'});
- $td(tab,0,1).innerHTML = link_list[i][4];
- }
-}
-
-
-// Execute when link is clicked
-// ----------------------------
-SetupItem.prototype.link_action = function(obj) {
- var me = this;
- var obj = obj;
-
- // if object links to a doc browser
- if(obj.arg == 1){
- if(in_list(profile.can_read, obj.nm)){
- if(obj.cn !='')
- loaddocbrowser(obj.nm, obj.nm, obj.cn);
- else
- loaddocbrowser(obj.nm);
- }
- else
- msgprint('No read permission',1);
- }
-
- // if obj links to a page
- else if(obj.arg == 2){
- me.show_page(obj);
- }
-
- // if object links to a single doctype
- else if(obj.arg == 3){
- newdoc(obj.nm);
- }
-}
-
-
-// Show page for corresponding link
-// --------------------------------
-SetupItem.prototype.show_page = function(obj) {
- var me = obj;
- var callback = function(r,rt)
- {
- if(r.message){
- if(me.cb == '')
- loadpage(me.nm);
- else
- show_chart_browser(me.nm,me.cb);
- }
- else
- msgprint('No read permission',1);
- }
- $c_obj('Setup Wizard Control','get_page_lst',me.nm,callback);
-}
-
-
-// Setup Data
-// =======================================================================================================================================================
-SetupData = function(cnty){
-
- // arg : 1 - Docbrowser, 2 - Page, 3 - DocType
-
- //[label, arg, name, callback/col_name, description]
-
- this.system = {'System':[['Global Defaults',3,'Manage Account','','Set global default values'],
- ['Manage Series',3,'Naming Series','','Manage numbering series for transactions'],
- ['Custom Field',1,'Custom Field','dt'+NEWLINE+'label'+NEWLINE+'fieldtype'+NEWLINE+'options','Add and manage custom fields on forms'],
- ['Email Settings',3,'Email Settings','','Outgoing email server and address'],
- ['Notification Settings',3,'Notification Control','','Automatic emails set at selected events'],
- ['Email Digest', 1, 'Email Digest', '', 'Schedule Daily / Weekly / Monthly Summary e-mails'],
- ['Company',1,'Company','id'+NEWLINE+'is_active'+NEWLINE+'email','Manage list of companies'],
- ['Fiscal Year',1,'Fiscal Year','id'+NEWLINE+'company'+NEWLINE+'is_active'+NEWLINE+'year','Manage list of fiscal years'],
- ['Personalize',3,'Personalize','','Set your banner'],
- ['Manage Trash',2,'Trash','','Restore trashed items'],
- ['Import Data',2,'Import Data','','Import data from CSV files'],
- ['Manage Users',2,'My Company','','Add / remove users and manage their roles'],
- //['Web Forms',2,'Webforms','', 'Code to embed forms in yor website'],
- ['Permissions Manager',2,'Permission Engine','', 'Manage all permissions from one tool'],
- //['Property Setter',1,'Property Setter','', 'Customize properties of a Form (DocType) or Field'],
- ['Customize Form View',3,'DocLayer','', 'Customize properties of a Form (DocType) or Field'],
- ['Print Formats', 1, 'Print Format', '', 'Manage Print Formats'],
- ['Letter Head',1,'Letter Head','','Manage different letter heads for Prints'],
- ['SMS Settings',3,'SMS Settings','','Integrate your personalized SMS gateway which support http web service'],
- ['SMS Center',3,'SMS Center','','Send mass sms to your leads, contacts and partners'],
- ['Features Setup',3,'Features Setup','','Displays fields based on features selected']
- ]};
-
-
- this.general = {'General':[['Authorization Rule',1,'Authorization Rule','','Set rules based on amounts'],
- ['Print Heading',1,'Print Heading','','Manage headings for printing transactions'],
- ['Term',1,'Term','','Manage template of standard Terms for order / invoices etc'],
- ['Currency',1,'Currency','','Manage list of currencies'],
- ['Address',1,'Address','','Manage Address of customers, suppliers'],
- ['Country',1,'Country','','Country master'],
- ['State',1,'State','','State master'],
- ['Rename Tool',3,'Rename Tool','','Rename a record'],
- ['Bulk Rename Tool',3,'Bulk Rename Tool','','Rename multiple records at a time'],
- ['Activty Type',1,'Activity Type','','Types of activities that you can select in your Timesheet'],
- ['City',1,'City','','City master']]};
-
- this.selling = {'Selling':[['Customer Group',2,'Sales Browser','Customer Group','Manage customer categories'],
- ['Territory',2,'Sales Browser','Territory','Manage sales territories'],
- ['Customer',1,'Customer','customer_group'+NEWLINE+'country','Customer master'],
- ['Sales Person',2,'Sales Browser','Sales Person','Manage sales persons'],
- ['Sales Partner',1,'Sales Partner','', 'Manage sales partners'],
- ['Campaign',1,'Campaign','id'+NEWLINE+'campaign_name'+NEWLINE+'description','Manage sales / marketing campaigns'],
- ['Sales BOM',1,'Sales BOM','id'+NEWLINE+'is_active'+NEWLINE+'new_item_name'+NEWLINE+'description'+NEWLINE+'item_group','Manage Sales Bill of Material (Main item + accessories)'],
- ['Price List',1,'Price List','','Price list master']]};
-
- this.accounts = {'Accounts':[['Chart of Accounts',2,'Accounts Browser','Account','Manage chart of accounts'],
- ['Chart of Cost Centers',2,'Accounts Browser','Cost Center','Manage chart of cost centers'],
- ['POS Setting',1,'POS Setting','','Manage Point of Sales default Settings.']]};
-
- // if country = india; show india related doctypes
- //-------------------------------------------------
-
- if(cnty == 'India'){
- var lst1 = [['TDS Rate Chart',1,'TDS Rate Chart','', 'TDS rate master'],['TDS Category',1,'TDS Category','id'+NEWLINE+'module','TDS categories']];
- for(var i =0; i<lst1.length;i++)
- this.accounts['Accounts'].push(lst1[i]);
- }
- //--------------------------------------------------
-
- var lst = [['Monthly Distribution',1,'Budget Distribution','id'+NEWLINE+'fiscal_year'+NEWLINE+'distribution_id','Manage budget distributions (seasonalities)'],
- ['Sales Other Charges',1,'Other Charges','','Manage your charge structures (taxes + charges) for sales'],
- ['Purchase Other Charges',1,'Purchase Other Charges','','Manage your charge structures (taxes + charges) for purchase'],
- ['Mode of Payment',1,'Mode of Payment','','Mode of payment master']];
-
- for(var i =0; i<lst.length;i++)
- this.accounts['Accounts'].push(lst[i]);
-
- this.stock = {'Stock':[['Item Group',2,'Sales Browser','Item Group','Manage item classifications'],
- ['Item',1,'Item','name'+NEWLINE+'item_group'+NEWLINE+'description','Item master'],
- ['Brand',1,'Brand','id'+NEWLINE+'description','Brand master'],
- ['Batch',1,'Batch','name'+NEWLINE+'start_date'+NEWLINE+'item'+NEWLINE+'expiry_date','Manage batches'],
- ['Price List',1,'Price List','','Price list master'],
- ['UOM',1,'UOM','','Unit of measure (UOM) master'],
- ['Warehouse Type',1,'Warehouse Type','','Warehouse classifications'],
- ['Warehouse',1,'Warehouse','','Warehouse master']]};
-
- this.buying = {'Buying':[['Supplier Type',1,'Supplier Type','','Manage supplier classifications'],
- ['Supplier',1,'Supplier','id'+NEWLINE+'supplier_type'+NEWLINE+'supplier_status'+NEWLINE+'company','Supplier master']]};
-
- this.maintenance = {'Maintenance':[['Serial No',1,'Serial No','item_code'+NEWLINE+'status'+NEWLINE+'pr_no'+NEWLINE+'delivery_note_no'+NEWLINE+'customer_name','Manage unique serial numbers for items']]};
-
- this.production = {'Production':[['Bill of Materials',1,'Bill Of Materials','id'+NEWLINE+'item'+NEWLINE+'description'+NEWLINE+'operating_cost'+NEWLINE+'maintained_by','Muti-level bill of materials and operations'],
- ['Workstation',1,'Workstation','id'+NEWLINE+'workstation_name'+NEWLINE+'warehouse'+NEWLINE+'description','Workstation master']]};
-
- this.hr = {'HR':[['Department',1,'Department','','Company department master'],
- ['Designation',1,'Designation','','Company designation master'],
- ['Branch',1,'Branch','','Manage branches for your company'],
- ['Grade',1,'Grade','','Manage employee grades'],
- ['Employment Type',1,'Employment Type','','Manage types of employment'],
- ['Employee',1,'Employee','employee_name'+NEWLINE+'employment_type'+NEWLINE+'status'+NEWLINE+'branch'+NEWLINE+'designation'+NEWLINE+'department'+NEWLINE+'grade'+NEWLINE+'reports_to','Employee master'],
- ['Earning Type',1,'Earning Type','taxable'+NEWLINE+'exemption_limit','Types of salary earning master'],
- ['Deduction Type',1,'Deduction Type','','Types of salary deduction master'],
- ['Expense Type',1,'Expense Type','', 'Types of expense master'],
-
- ['Salary Structure',1,'Salary Structure','employee'+NEWLINE+'is_active'+NEWLINE+'fiscal_year'+NEWLINE+'from_date'+NEWLINE+'ctc'+NEWLINE+'total_earning'+NEWLINE+'total_deduction'+NEWLINE+'total','Salary structure template'],
- ['Holiday List',1,'Holiday List','fiscal_year','List of holidays'],
- ['Leave Type',1,'Leave Type','max_days_allowed'+NEWLINE+'is_carry_forward'+NEWLINE+'is_encash','Leave type master'],
- ['KRA Template',1,'KRA Template','','Template of Key Result Areas (KRAs)']]};
-}
+pscript.onload_Setup = function(wrapper) {
+ erpnext.module_page.hide_links(wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/setup/page/setup/setup_static.html b/erpnext/setup/page/setup/setup_static.html
deleted file mode 100644
index 54fee71..0000000
--- a/erpnext/setup/page/setup/setup_static.html
+++ /dev/null
@@ -1 +0,0 @@
-Setup
\ No newline at end of file
diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.js b/erpnext/setup/page/setup_wizard/setup_wizard.js
index 59308f1..053330b 100644
--- a/erpnext/setup/page/setup_wizard/setup_wizard.js
+++ b/erpnext/setup/page/setup_wizard/setup_wizard.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript['onload_Setup Wizard'] = function()
{
diff --git a/erpnext/setup/page/webforms/webforms.js b/erpnext/setup/page/webforms/webforms.js
index d429ce0..85caadf 100644
--- a/erpnext/setup/page/webforms/webforms.js
+++ b/erpnext/setup/page/webforms/webforms.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript.onload_Webforms = function(){
$c_obj('Home Control','get_acc_id','', function(r,rt) {
diff --git a/erpnext/startup/__init__.py b/erpnext/startup/__init__.py
index cea033b..3549898 100644
--- a/erpnext/startup/__init__.py
+++ b/erpnext/startup/__init__.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# add startup propertes
add_in_head = """
diff --git a/erpnext/startup/event_handlers.py b/erpnext/startup/event_handlers.py
index 9740be4..dca9e0c 100644
--- a/erpnext/startup/event_handlers.py
+++ b/erpnext/startup/event_handlers.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
import webnotes.defs
from webnotes.utils import cint
@@ -54,19 +70,32 @@
import webnotes
import webnotes.model.doc
+ bootinfo['custom_css'] = webnotes.conn.get_value('Style Settings', None, 'custom_css') or ''
+
if webnotes.session['user']=='Guest':
bootinfo['website_settings'] = webnotes.model.doc.getsingle('Website Settings')
bootinfo['website_menus'] = webnotes.conn.sql("""select label, url, custom_page,
parent_label, parentfield
from `tabTop Bar Item` where parent='Website Settings' order by idx asc""", as_dict=1)
- bootinfo['custom_css'] = webnotes.conn.get_value('Style Settings', None, 'custom_css') or ''
bootinfo['analytics_code'] = \
webnotes.conn.get_value('Website Settings', None, 'analytics_code')
bootinfo['analytics_call'] = \
webnotes.conn.get_value('Website Settings', None, 'analytics_call')
+
else:
bootinfo['letter_heads'] = get_letter_heads()
+ import webnotes.model.doctype
+ bootinfo['docs'] += webnotes.model.doctype.get('Event')
+
+ bootinfo['modules_list'] = webnotes.conn.get_global('modules_list')
+
+ # if no company, show a dialog box to create a new company
+ bootinfo['setup_complete'] = webnotes.conn.sql("""select name from
+ tabCompany limit 1""") and 'Yes' or 'No'
+
+ bootinfo['user_background'] = webnotes.conn.get_value("Profile", webnotes.session['user'], 'background_image') or ''
+
def get_letter_heads():
"""load letter heads with startup"""
import webnotes
@@ -74,7 +103,6 @@
where ifnull(disabled,0)=0""")
return dict(ret)
-
def login_as(login_manager):
"""
Login as functionality -- allows signin from signin.erpnext.com
diff --git a/erpnext/startup/js/complete_setup.js b/erpnext/startup/js/complete_setup.js
new file mode 100644
index 0000000..ac89aff
--- /dev/null
+++ b/erpnext/startup/js/complete_setup.js
@@ -0,0 +1,93 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+// complete my company registration
+// --------------------------------
+
+erpnext.complete_setup = function() {
+ var currency_list = ['', 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AZN',
+ 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BRL', 'BSD', 'BTN', 'BYR',
+ 'BZD', 'CAD', 'CDF', 'CFA', 'CFP', 'CHF', 'CLP', 'CNY', 'COP', 'CRC', 'CUC', 'CZK', 'DJF',
+ 'DKK', 'DOP', 'DZD', 'EEK', 'EGP', 'ERN', 'ETB', 'EUR', 'EURO', 'FJD', 'FKP', 'FMG', 'GBP',
+ 'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GQE', 'GTQ', 'GYD', 'HKD', 'HNL', 'HRK', 'HTG', 'HUF',
+ 'IDR', 'ILS', 'INR', 'IQD', 'IRR', 'ISK', 'JMD', 'JOD', 'JPY', 'KES', 'KGS', 'KHR', 'KMF',
+ 'KPW', 'KRW', 'KWD', 'KYD', 'KZT', 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LTL', 'LVL', 'LYD',
+ 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRO', 'MUR', 'MVR', 'MWK', 'MXN', 'MYR',
+ 'MZM', 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NRs', 'NZD', 'OMR', 'PAB', 'PEN', 'PGK', 'PHP',
+ 'PKR', 'PLN', 'PYG', 'QAR', 'RMB', 'RON', 'RSD', 'RUB', 'RWF', 'SAR', 'SCR', 'SDG', 'SDR',
+ 'SEK', 'SGD', 'SHP', 'SOS', 'SRD', 'STD', 'SYP', 'SZL', 'THB', 'TJS', 'TMT', 'TND', 'TRY',
+ 'TTD', 'TWD', 'TZS', 'UAE', 'UAH', 'UGX', 'USD', 'USh', 'UYU', 'UZS', 'VEB', 'VND', 'VUV',
+ 'WST', 'XAF', 'XCD', 'XDR', 'XOF', 'XPF', 'YEN', 'YER', 'YTL', 'ZAR', 'ZMK', 'ZWR'];
+
+ var d = new wn.widgets.Dialog({
+ title: "Setup",
+ fields: [
+ {fieldname:'first_name', label:'Your First Name', fieldtype:'Data', reqd: 1},
+ {fieldname:'last_name', label:'Your Last Name', fieldtype:'Data'},
+ {fieldname:'company_name', label:'Company Name', fieldtype:'Data', reqd:1,
+ description: 'e.g. "My Company LLC"'},
+ {fieldname:'company_abbr', label:'Company Abbreviation', fieldtype:'Data',
+ description:'e.g. "MC"',reqd:1},
+ {fieldname:'fy_start', label:'Financial Year Start Date', fieldtype:'Select',
+ description:'Your financial year begins on"', reqd:1,
+ options: ['', '1st Jan', '1st Apr', '1st Jul', '1st Oct'].join('\n')},
+ {fieldname:'currency', label: 'Default Currency', reqd:1,
+ options: currency_list.join('\n'), fieldtype: 'Select'},
+ {fieldname:'update', label:'Setup',fieldtype:'Button'}
+ ]
+ })
+
+ // prepare
+ if(user != 'Administrator'){
+ d.no_cancel(); // Hide close image
+ $('header').toggle(false); // hide toolbar
+ }
+
+ // company name already set
+ if(wn.control_panel.company_name) {
+ var inp = d.fields_dict.company_name.input;
+ inp.value = wn.control_panel.company_name;
+ inp.disabled = true;
+ }
+
+ // set first name, last name
+ if(user_fullname) {
+ u = user_fullname.split(' ');
+ if(u[0]) {
+ d.fields_dict.first_name.input.value = u[0];
+ }
+ if(u[1]) {
+ d.fields_dict.last_name.input.value = u[1];
+ }
+ }
+
+ // setup
+ d.fields_dict.update.input.onclick = function() {
+ var data = d.get_values();
+ if(!data) return;
+ $(this).set_working();
+ $c_obj('Setup Control','setup_account',data,function(r, rt){
+ sys_defaults = r.message;
+ user_fullname = r.message.user_fullname;
+ wn.boot.user_info[user].fullname = user_fullname;
+ d.hide();
+ $('header').toggle(true);
+ page_body.wntoolbar.set_user_name();
+ });
+ }
+
+ d.show();
+}
diff --git a/erpnext/startup/feature_setup.js b/erpnext/startup/js/feature_setup.js
similarity index 91%
rename from erpnext/startup/feature_setup.js
rename to erpnext/startup/js/feature_setup.js
index a7b6dd1..6a5974a 100644
--- a/erpnext/startup/feature_setup.js
+++ b/erpnext/startup/js/feature_setup.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
/* features setup "Dictionary", "Script"
Dictionary Format
'projects': {
@@ -133,7 +149,6 @@
'Sales Order': {'fields':['sales_team','Packing List']}
},
'fs_more_info': {
- 'Customer': {'fields':['More Info']},
'Delivery Note': {'fields':['More Info']},
'Enquiry': {'fields':['More Info']},
'Indent': {'fields':['More Info']},
@@ -144,8 +159,6 @@
'Quotation': {'fields':['More Info']},
'Receivable Voucher': {'fields':['More Info']},
'Sales Order': {'fields':['More Info']},
- 'Serial No': {'fields':['More Info']},
- 'Supplier': {'fields':['More Info']}
},
'fs_quality': {
'Item': {'fields':['Item Inspection Criteria','inspection_required']},
diff --git a/erpnext/startup/js/modules.js b/erpnext/startup/js/modules.js
new file mode 100644
index 0000000..d43b021
--- /dev/null
+++ b/erpnext/startup/js/modules.js
@@ -0,0 +1,82 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+wn.provide('erpnext.module_page');
+
+erpnext.module_page.setup_page = function(module, wrapper) {
+ erpnext.module_page.hide_links(wrapper);
+ erpnext.module_page.make_list(module, wrapper);
+ $(wrapper).find("a[title]").tooltip({
+ delay: { show: 500, hide: 100 }
+ });
+}
+
+// hide list links where the user does
+// not have read permissions
+
+erpnext.module_page.hide_links = function(wrapper) {
+ // lists
+ $(wrapper).find('[href*="List/"]').each(function() {
+ var href = $(this).attr('href');
+ var dt = href.split('/')[1];
+ if(wn.boot.profile.all_read.indexOf(get_label_doctype(dt))==-1) {
+ var txt = $(this).text();
+ $(this).parent().css('color', '#999').html(txt);
+ }
+ });
+
+ // reports
+ $(wrapper).find('[data-doctype]').each(function() {
+ var dt = $(this).attr('data-doctype');
+ if(wn.boot.profile.all_read.indexOf(dt)==-1) {
+ var txt = $(this).text();
+ $(this).parent().css('color', '#999').html(txt);
+ }
+ });
+
+ // single (forms)
+ $(wrapper).find('[href*="Form/"]').each(function() {
+ var href = $(this).attr('href');
+ var dt = href.split('/')[1];
+ if(wn.boot.profile.all_read.indexOf(get_label_doctype(dt))==-1) {
+ var txt = $(this).text();
+ $(this).parent().css('color', '#999').html(txt);
+ }
+ });}
+
+// make list of reports
+
+erpnext.module_page.make_list = function(module, wrapper) {
+ // make project listing
+ wrapper.list = new wn.widgets.Listing({
+ parent: $(wrapper).find('.reports-list').get(0),
+ method: 'utilities.get_report_list',
+ render_row: function(row, data) {
+ if(!data.parent_doc_type) data.parent_doc_type = data.doc_type;
+ $(row).html(repl('<a href="#!Report/%(doc_type)s/%(criteria_name)s" \
+ data-doctype="%(parent_doc_type)s">\
+ %(criteria_name)s</a>', data))
+ },
+ args: {
+ module: module
+ },
+ no_refresh: true,
+ callback: function(r) {
+ erpnext.module_page.hide_links(wrapper)
+ }
+ });
+ wrapper.list.run();
+}
\ No newline at end of file
diff --git a/erpnext/startup/js/toolbar.js b/erpnext/startup/js/toolbar.js
new file mode 100644
index 0000000..7bf9c6a
--- /dev/null
+++ b/erpnext/startup/js/toolbar.js
@@ -0,0 +1,115 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+/* toolbar settings */
+wn.provide('erpnext.toolbar');
+
+erpnext.toolbar.setup = function() {
+ // modules
+ erpnext.toolbar.add_modules();
+
+ // profile
+ $('#toolbar-user').append('<li><a href="#!profile-settings">Profile Settings</a></li>');
+
+ $('.navbar .pull-right').append('\
+ <li><a href="#!messages" title="Unread Messages"><span class="navbar-new-comments"></span></a></li>');
+
+ // help
+ $('.navbar .pull-right').prepend('<li class="dropdown">\
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#" \
+ onclick="return false;">Help<b class="caret"></b></a>\
+ <ul class="dropdown-menu" id="toolbar-help">\
+ </ul></li>')
+
+ $('#toolbar-help').append('<li><a href="http://erpnext.blogspot.com/2011/03/erpnext-help.html" target="_blank">\
+ Documentation</a></li>')
+
+ $('#toolbar-help').append('<li><a href="http://groups.google.com/group/erpnext-user-forum" target="_blank">\
+ Forum</a></li>')
+
+ $('#toolbar-help').append('<li><a href="http://www.providesupport.com?messenger=iwebnotes" target="_blank">\
+ Live Chat (Office Hours)</a></li>')
+
+ // billing
+ if(pscript.is_erpnext_saas && is_system_manager) {
+ $('#toolbar-user').append('<li><a href="#billing">Billing</a></li>')
+ }
+
+ $.extend(page_body.wntoolbar, {
+ set_new_comments: function(new_comments) {
+ var navbar_nc = $('.navbar-new-comments');
+ if(new_comments && new_comments.length>0) {
+ navbar_nc.text(new_comments.length);
+ navbar_nc.addClass('navbar-new-comments-true')
+ $.each(new_comments, function(i, v) {
+ var msg = 'New Message: ' + (v[1].length<=100 ? v[1] : (v[1].substr(0, 100) + "..."));
+ var id = v[0].replace('/', '-');
+ if(!$('#' + id)[0]) { show_alert(msg, id); }
+ })
+ } else {
+ navbar_nc.removeClass('navbar-new-comments-true');
+ navbar_nc.text(0);
+ }
+ }
+ });
+
+ page_body.wntoolbar.set_new_comments();
+}
+
+erpnext.toolbar.add_modules = function() {
+ $('<li class="dropdown">\
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#"\
+ onclick="return false;">Modules<b class="caret"></b></a>\
+ <ul class="dropdown-menu modules">\
+ </ul>\
+ </li>').prependTo('.navbar .nav:first');
+
+ // if no modules list then show all
+ if(wn.boot.modules_list)
+ wn.boot.modules_list = JSON.parse(wn.boot.modules_list);
+ else
+ wn.boot.modules_list = keys(erpnext.modules).sort();
+
+ // add to dropdown
+ for(var i in wn.boot.modules_list) {
+ var m = wn.boot.modules_list[i]
+
+ if(m!='Setup' && wn.boot.profile.allow_modules.indexOf(m)!=-1) {
+ args = {
+ module: m,
+ module_page: erpnext.modules[m],
+ module_label: m=='HR' ? 'Human Resources' : m
+ }
+
+ $('.navbar .modules').append(repl('<li><a href="#!%(module_page)s" \
+ data-module="%(module)s">%(module_label)s</a></li>', args));
+ }
+ }
+
+ // dasboard for accounts system manager
+ if(user_roles.indexOf("Accounts Manager")!=-1) {
+ $('.navbar .modules').append('<li><a href="#!dashboard" \
+ data-module="Dashboard">Dashboard</a></li>');
+ }
+
+ // setup for system manager
+ if(user_roles.indexOf("System Manager")!=-1) {
+ $('.navbar .modules').append('<li class="divider"></li>\
+ <li><a href="#!Setup" data-module="Setup">Setup</a></li>');
+ }
+
+}
+
diff --git a/erpnext/startup/modules.js b/erpnext/startup/modules.js
deleted file mode 100644
index 0280c74..0000000
--- a/erpnext/startup/modules.js
+++ /dev/null
@@ -1,350 +0,0 @@
-// ====================================================================
-
-pscript.startup_make_sidebar = function() {
- $y(page_body.left_sidebar, {width:(100/6)+'%', paddingTop:'8px'});
-
- var callback = function(r,rt) {
- // menu
- var ml = r.message;
-
- // clear
- page_body.left_sidebar.innerHTML = '';
-
- for(var m=0; m<ml.length; m++){
- if(ml[m]) {
- new SidebarItem(ml[m]);
- }
- }
- nav_obj.observers.push({notify:function(t,dt,dn) { pscript.select_sidebar_menu(t, dt, dn); }});
-
- // select current
- var no = nav_obj.ol[nav_obj.ol.length-1];
- if(no && menu_item_map[decodeURIComponent(no[0])][decodeURIComponent(no[1])])
- pscript.select_sidebar_menu(decodeURIComponent(no[0]), decodeURIComponent(no[1]));
- }
- $c_obj('Home Control', 'get_modules', '', callback);
-}
-
-// ====================================================================
-// Menu observer
-// ====================================================================
-
-cur_menu_pointer = null;
-var menu_item_map = {'Form':{}, 'Page':{}, 'Report':{}, 'List':{}}
-
-pscript.select_sidebar_menu = function(t, dt, dn) {
- // get menu item
- if(menu_item_map[t][dt]) {
- // select
- menu_item_map[t][dt].select();
- } else {
- // none found :-( Unselect
- if(cur_menu_pointer)
- cur_menu_pointer.deselect();
- }
-}
-
-// ====================================================================
-// Menu pointer
-// ====================================================================
-
-var body_background = '#e2e2e2';
-
-MenuPointer = function(parent, label) {
- var me = this;
- this.wrapper = $a(parent, 'div', '', {padding:'0px', cursor:'pointer', margin:'2px 0px'});
- $br(this.wrapper, '3px');
-
- this.tab = make_table($a(this.wrapper, 'div'), 1, 2, '100%', ['', '11px'], {height:'22px',
- verticalAlign:'middle', padding:'0px'}, {borderCollapse:'collapse', tableLayout:'fixed'});
-
- $y($td(this.tab, 0, 0), {padding:'0px 4px', color:'#444', whiteSpace:'nowrap'});
-
- // triangle border (?)
- this.tab.triangle_div = $a($td(this.tab, 0, 1), 'div','', {
- borderColor: body_background + ' ' + body_background + ' ' + body_background + ' ' + 'transparent',
- borderWidth:'11px', borderStyle:'solid', height:'0px', width:'0px', marginRight:'-11px'});
-
- this.label_area = $a($td(this.tab, 0, 0), 'span', '', '', label);
-
- $(this.wrapper)
- .hover(
- function() { if(!me.selected)
- $bg(this, '#eee'); } ,
- function() { if(!me.selected)
- $bg(this, body_background); }
- )
-
- $y($td(this.tab, 0, 0), {borderBottom:'1px solid #ddd'});
-
-}
-
-// ====================================================================
-
-MenuPointer.prototype.select = function(grey) {
- $y($td(this.tab, 0, 0), {
- color:'#fff', borderBottom:'0px solid #000'
- });
- $(this.wrapper).css('background-color', '#999');
- this.selected = 1;
-
- if(cur_menu_pointer && cur_menu_pointer != this)
- cur_menu_pointer.deselect();
-
- cur_menu_pointer = this;
-}
-
-// ====================================================================
-
-MenuPointer.prototype.deselect = function() {
- $y($td(this.tab, 0, 0), {color:'#444', borderBottom:'1px solid #ddd'});
- $(this.wrapper).css('background-color', body_background);
- this.selected = 0;
-}
-
-
-// ====================================================================
-// Sidebar Item
-// ====================================================================
-
-var cur_sidebar_item = null;
-
-SidebarItem = function(det) {
- var me = this;
- this.det = det;
- this.wrapper = $a(page_body.left_sidebar, 'div', '', {marginRight:'12px'});
-
- this.body = $a(this.wrapper, 'div');
- this.tab = make_table(this.body, 1, 2, '100%', ['24px', null], {verticalAlign:'middle'}, {tableLayout:'fixed'});
-
- // icon
- var ic = $a($td(this.tab, 0, 0), 'div', 'module-icons module-icons-' + det.module_label.toLowerCase(), {marginLeft:'3px', marginBottom:'-2px'});
-
- // pointer table
- this.pointer = new MenuPointer($td(this.tab, 0, 1), det.module_label);
- $y($td(this.pointer.tab, 0, 0), {fontWeight:'bold'});
-
- // for page type
- if(det.module_page) {
- menu_item_map.Page[det.module_page] = this.pointer;
- }
-
- // items area
- this.items_area = $a(this.wrapper, 'div');
-
- this.body.onclick = function() { me.onclick(); }
-}
-
-// ====================================================================
-
-SidebarItem.prototype.onclick = function() {
- var me = this;
-
- if(this.det.module_page) {
- // page type
- this.pointer.select();
-
- $(me.pointer.label_area).set_working();
- loadpage(this.det.module_page, function() {
- $(me.pointer.label_area).done_working();
- });
-
- } else {
- // show sub items
- this.toggle();
- }
-}
-
-// ====================================================================
-
-SidebarItem.prototype.collapse = function() {
- $(this.items_area).slideUp();
- this.is_open = 0;
- $fg(this.pointer.label_area, '#444')
-}
-
-// ====================================================================
-
-SidebarItem.prototype.toggle = function() {
- if(this.loading) return;
-
- if(this.is_open) {
- this.collapse();
- } else {
- if(this.loaded) $(this.items_area).slideDown();
- else this.show_items();
- this.is_open = 1;
- $fg(this.pointer.label_area, '#000')
- //this.pointer.select(1);
-
- // close existing open
- if(cur_sidebar_item && cur_sidebar_item != this) {
- cur_sidebar_item.collapse();
- }
- cur_sidebar_item = this;
- }
-}
-
-// ====================================================================
-
-SidebarItem.prototype.show_items = function() {
- this.loading = 1;
- var me = this;
-
- $(this.pointer.label_area).set_working();
- var callback = function(r,rt){
- me.loaded = 1;
- me.loading = 0;
- var smi = null;
- var has_reports = 0;
- var has_tools = 0;
-
- // widget code
- $(me.pointer.label_area).done_working();
-
- if(r.message.il) {
- me.il = r.message.il;
-
- // forms
- for(var i=0; i<me.il.length;i++){
- if(me.il[i].doc_type == 'Forms') {
- if(in_list(profile.can_read, me.il[i].doc_name)) {
- var smi = new SidebarModuleItem(me, me.il[i]);
-
- menu_item_map['Form'][me.il[i].doc_name] = smi.pointer;
- menu_item_map['List'][me.il[i].doc_name] = smi.pointer;
- }
- }
- if(me.il[i].doc_type=='Reports') has_reports = 1;
- if(in_list(['Single DocType', 'Pages', 'Setup Forms'], me.il[i].doc_type))
- has_tools = 1;
- }
- // reports
- if(has_reports) {
- var smi = new SidebarModuleItem(me, {doc_name:'Reports', doc_type:'Reports'});
-
- // add to menu-item mapper
- menu_item_map['Page'][me.det.module_label + ' Reports'] = smi.pointer;
- }
-
- // tools
- if(has_tools) {
- var smi = new SidebarModuleItem(me, {doc_name:'Tools', doc_type:'Tools'});
-
- // add to menu-item mapper
- menu_item_map['Page'][me.det.module_label + ' Tools'] = smi.pointer;
- }
-
- // custom reports
- if(r.message.custom_reports.length) {
- me.il = add_lists(r.message.il, r.message.custom_reports);
- var smi = new SidebarModuleItem(me, {doc_name:'Custom Reports', doc_type:'Custom Reports'});
-
- // add to menu-item mapper
- menu_item_map['Page'][me.det.module_label + ' Custom Reports'] = smi.pointer;
- }
- }
-
-
- $(me.items_area).slideDown();
-
- // high light
- var no = nav_obj.ol[nav_obj.ol.length-1];
- if(no && menu_item_map[decodeURIComponent(no[0])][decodeURIComponent(no[1])])
- pscript.select_sidebar_menu(decodeURIComponent(no[0]), decodeURIComponent(no[1]));
-
- }
-
- $c_obj('Home Control', 'get_module_details', me.det.name, callback);
-}
-
-// ====================================================================
-// Show Reports
-// ====================================================================
-
-SidebarItem.prototype.show_section = function(sec_type) {
- var me = this;
- var label = this.det.module_label + ' ' + sec_type;
- var type_map = {'Reports':'Reports', 'Custom Reports':'Custom Reports',
- 'Pages':'Tools', 'Single DocType':'Tools', 'Setup Forms':'Tools'}
-
-
- if(page_body.pages[label]) {
- loadpage(label, null, 1);
- } else {
-
- // make the reports page
- var page = page_body.add_page(label);
- this.wrapper = $a(page,'div','layout_wrapper');
-
-
- // head
- this.head = new PageHeader(this.wrapper, label);
-
- // body
- this.body1 = $a(this.wrapper, 'div', '', {marginTop:'16px'});
-
- // add a report link
- var add_link = function(det) {
- var div = $a(me.body1, 'div', '', {marginBottom:'6px'});
- var span = $a(div, 'span', 'link_type');
-
- // tag the span
- span.innerHTML = det.display_name; span.det = det;
- if(sec_type=='Reports' || sec_type=='Custom Reports') {
- // Reports
- // -------
- span.onclick = function() { loadreport(this.det.doc_name, this.det.display_name); }
-
- } else {
- // Tools
- // -----
-
- if(det.doc_type=='Pages') {
- // Page
- if(det.click_function) {
- span.onclick = function() { eval(this.det.click_function) }
- span.click_function = det.click_function;
- } else {
- span.onclick = function() { loadpage(this.det.doc_name); }
- }
- } else if(det.doc_type=='Setup Forms') {
- // Doc Browser
- span.onclick = function() { loaddocbrowser(this.det.doc_name); }
- } else {
- // Single
- span.onclick = function() { loaddoc(this.det.doc_name, this.det.doc_name); }
- }
- }
- }
-
- // item list
- for(var i=0; i<me.il.length;i++){
- if(type_map[me.il[i].doc_type] == sec_type) {
- add_link(me.il[i]);
- }
- }
- loadpage(label, null, 1);
- }
-}
-
-
-// ====================================================================
-// Sidebar module item
-// ====================================================================
-
-SidebarModuleItem = function(si, det) {
- this.det = det;
- var me= this;
-
- this.pointer = new MenuPointer(si.items_area, get_doctype_label(det.doc_name));
- $y(si.items_area, {marginLeft:'32px'})
- $y($td(this.pointer.tab, 0, 0), {fontSize:'11px'});
-
- this.pointer.wrapper.onclick = function() {
- if(me.det.doc_type=='Forms')
- loaddocbrowser(det.doc_name);
- else
- si.show_section(me.det.doc_type);
- }
-}
diff --git a/erpnext/startup/modules_new.js b/erpnext/startup/modules_new.js
deleted file mode 100644
index 5f912b0..0000000
--- a/erpnext/startup/modules_new.js
+++ /dev/null
@@ -1,36 +0,0 @@
-// Tools Page
-erpnext.ListPage = Class.extend({
- init: function(opts) {
- var me = this;
- this.opts = opts;
- this.page = page_body.add_page[opts.title];
- this.page.wrapper = $a(this.page, 'div', 'layout_wrapper');
- this.page.head = new PageHeading(this.wrapper, this.title)
- this.page.list = new wn.widgets.Listing({
- parent: this.page.wrapper,
- query: opts.query,
- render:row: opts.render_row
- });
- },
- show: function() {
- if(this.first) {
- this.page.list.run();
- this.first = false;
- }
- page_body.change_to(this.opts.title);
- }
-});
-
-erpnext.ToolsPage = erpnext.ListPage.extend({
- init: function(opts) {
- this._super({
- title: opts.module + ' Settings',
- query: repl('select name, description from tabDocType where \
- module=%(module)s and ifnull(issingle,0)=1 order by name asc', opts),
- render_row: function(parent, data) {
- parent.innerHTML = repl('<a href="#!Form/%(name)s/%(name)s">%(name)s</a>\
- <div class="comment">%(description)s</div>', data)
- }
- })
- }
-});
\ No newline at end of file
diff --git a/erpnext/startup/schedule_handlers.py b/erpnext/startup/schedule_handlers.py
new file mode 100644
index 0000000..a828fea
--- /dev/null
+++ b/erpnext/startup/schedule_handlers.py
@@ -0,0 +1,56 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+"""will be called by scheduler"""
+
+import webnotes
+from webnotes.utils import scheduler
+
+def execute_all():
+ """
+ * get support email
+ * recurring invoice
+ """
+ try:
+ from support.doctype.support_ticket import get_support_mails
+ get_support_mails()
+ except Exception, e:
+ scheduler.log('get_support_mails')
+
+ try:
+ from accounts.doctype.gl_control.gl_control import manage_recurring_invoices
+ manage_recurring_invoices()
+ except Exception, e:
+ scheduler.log('manage_recurring_invoices')
+
+
+
+def execute_daily():
+ """email digest"""
+ try:
+ from setup.doctype.email_digest.email_digest import send
+ send()
+ except Exception, e:
+ scheduler.log('email_digest.send')
+
+def execute_weekly():
+ pass
+
+def execute_monthly():
+ pass
+
+def execute_hourly():
+ pass
diff --git a/erpnext/startup/startup.css b/erpnext/startup/startup.css
index 0fee616..1ce0264 100644
--- a/erpnext/startup/startup.css
+++ b/erpnext/startup/startup.css
@@ -13,19 +13,13 @@
}
body {
- background-color: #e2e2e2;
}
.erpnext-footer {
- margin: 3px auto;
- color: #888;
+ margin: 11px auto;
text-align: center;
}
-.erpnext-footer a, .erpnext-footer a:hover, .erpnext-footer a:visited {
- color: #666;
-}
-
.module-icons {
background: url(../images/module-icons.png) no-repeat top left;
width:16px;
@@ -45,14 +39,45 @@
.module-icons-stock{ background-position: 0 -660px; }
.module-icons-support{ background-position: 0 -726px; }
-.topbar-new-comments {
+.navbar-new-comments {
margin: -3px 0px;
padding: 2px;
- font-size: 14px;
- color: #fff;
- background-color: #B00D07;
min-width: 20px;
text-align: center;
display: inline-block;
border-radius: 2px;
+ color: #999999;
+ background-color: #333131;
+}
+
+.navbar-new-comments:hover,
+.navbar-new-comments:active,
+.navbar-new-comments:focus {
+ color: #fff;
+}
+
+
+.navbar-new-comments-true {
+ color: #fff;
+ background-color: #B00D07;
+}
+
+.navbar-icon-home {
+ vertical-align: middle;
+ opacity:0.4;
+ Filter:alpha(opacity=40); /* For IE8 and earlier */
+}
+
+.navbar-icon-home:hover,
+.navbar-icon-home:focus,
+.navbar-icon-home:active,
+.navbar-icon-home-hover{
+ opacity:1;
+ Filter:alpha(opacity=100); /* For IE8 and earlier */
+}
+
+/*extra size menus for recent*/
+.dropdown-menu#toolbar-recent, .dropdown-menu#toolbar-options, .dropdown-menu#toolbar-help{
+ min-width: 160px !important;
+ max-width: 260px !important;
}
diff --git a/erpnext/startup/startup.js b/erpnext/startup/startup.js
index c68650a..6448574 100644
--- a/erpnext/startup/startup.js
+++ b/erpnext/startup/startup.js
@@ -1,10 +1,43 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
var current_module;
var is_system_manager = 0;
-var module_content_dict = {};
-var user_full_nm = {};
wn.provide('erpnext.startup');
+erpnext.modules = {
+ 'Selling': 'selling-home',
+ 'Accounts': 'accounts-home',
+ 'Stock': 'stock-home',
+ 'Buying': 'buying-home',
+ 'Support': 'support-home',
+ 'Projects': 'projects-home',
+ 'Production': 'production-home',
+ 'Website': 'website-home',
+ 'HR': 'hr-home',
+ 'Setup': 'Setup',
+ 'Activity': 'activity',
+ 'To Do': 'todo',
+ 'Calendar': 'calendar',
+ 'Messages': 'messages',
+ 'Knowledge Base': 'questions',
+ 'Dashboard': 'dashboard'
+}
+
erpnext.startup.set_globals = function() {
pscript.is_erpnext_saas = cint(wn.control_panel.sync_with_gateway)
if(inList(user_roles,'System Manager')) is_system_manager = 1;
@@ -14,29 +47,40 @@
$('#startup_div').html('Starting up...').toggle(true);
erpnext.startup.set_globals();
-
+
+ if(wn.boot.custom_css) {
+ set_style(wn.boot.custom_css);
+ }
+ if(wn.boot.user_background) {
+ erpnext.set_user_background(wn.boot.user_background);
+ }
+
if(user == 'Guest'){
- $dh(page_body.left_sidebar);
- if(wn.boot.custom_css) {
- set_style(wn.boot.custom_css);
- }
if(wn.boot.website_settings.title_prefix) {
wn.title_prefix = wn.boot.website_settings.title_prefix;
}
} else {
- // modules
- pscript.startup_make_sidebar();
-
+ // always allow apps
+ wn.boot.profile.allow_modules = wn.boot.profile.allow_modules.concat(
+ ['To Do', 'Knowledge Base', 'Calendar', 'Activity', 'Messages'])
+
// setup toolbar
erpnext.toolbar.setup();
-
+
// set interval for updates
erpnext.startup.set_periodic_updates();
// border to the body
// ------------------
- $('footer').html('<div class="erpnext-footer">\
- Powered by <a href="https://erpnext.com">ERPNext</a></div>');
+ $('footer').html('<div class="web-footer erpnext-footer">\
+ <a href="#!attributions">ERPNext | Attributions and License</a></div>');
+
+ // complete registration
+ if(in_list(user_roles,'System Manager') && (wn.boot.setup_complete=='No')) {
+ wn.require("erpnext/startup/js/complete_setup.js");
+ erpnext.complete_setup();
+ }
+
}
$('#startup_div').toggle(false);
@@ -58,42 +102,36 @@
}
-// Module Page
-// ====================================================================
-
-ModulePage = function(parent, module_name, module_label, help_page, callback) {
- this.parent = parent;
-
- // add to current page
- page_body.cur_page.module_page = this;
-
- this.wrapper = $a(parent,'div');
- this.module_name = module_name;
- this.transactions = [];
- this.page_head = new PageHeader(this.wrapper, module_label);
-
- if(help_page) {
- var btn = this.page_head.add_button('Help', function() { loadpage(this.help_page) }, 1, 'ui-icon-help')
- btn.help_page = help_page;
- }
-
- if(callback) this.callback = function(){ callback(); }
-}
-
// ========== Update Messages ============
-var update_messages = function() {
+var update_messages = function(reset) {
// Updates Team Messages
- if(inList(['Guest', 'Administrator'], user)) { return; }
-
- $c_page('home', 'event_updates', 'get_unread_messages', null,
- function(r,rt) {
- if(!r.exc) {
- // This function is defined in toolbar.js
- page_body.wntoolbar.set_new_comments(r.message);
+ if(inList(['Guest'], user)) { return; }
+
+ if(!reset) {
+ $c_page('home', 'event_updates', 'get_unread_messages', null,
+ function(r,rt) {
+ if(!r.exc) {
+ // This function is defined in toolbar.js
+ page_body.wntoolbar.set_new_comments(r.message);
+ var circle = $('#msg_count')
+ if(circle) {
+ if(r.message.length) {
+ circle.find('span:first').text(r.message.length);
+ circle.toggle(true);
+ } else {
+ circle.toggle(false);
+ }
+ }
+ } else {
+ clearInterval(wn.updates.id);
+ }
}
- }
- );
+ );
+ } else {
+ page_body.wntoolbar.set_new_comments(0);
+ $('#msg_count').toggle(false);
+ }
}
erpnext.startup.set_periodic_updates = function() {
@@ -104,12 +142,16 @@
clearInterval(wn.updates.id);
}
- wn.updates.id = setInterval(update_messages, 180000);
+ wn.updates.id = setInterval(update_messages, 60000);
+}
+
+erpnext.set_user_background = function(src) {
+ set_style(repl('body { background: url("files/%(src)s") repeat !important;}', {src:src}))
}
// =======================================
// start
$(document).bind('startup', function() {
- erpnext.startup.start();
+ erpnext.startup.start();
});
diff --git a/erpnext/startup/toolbar.js b/erpnext/startup/toolbar.js
deleted file mode 100644
index 11499b8..0000000
--- a/erpnext/startup/toolbar.js
+++ /dev/null
@@ -1,53 +0,0 @@
-/* toolbar settings */
-wn.provide('erpnext.toolbar');
-
-erpnext.toolbar.setup = function() {
- // profile
- $('#toolbar-user').append('<li><a href="#profile-settings">Profile Settings</a></li>');
-
- $('#toolbar-user').append('<li><a href="#My Company">Team / Messages</a></li>');
-
- $('.topbar .secondary-nav').prepend('\
- <li><a href="#" id="toolbar-new-comments"></a></li>');
-
- // help
- $('.topbar .secondary-nav').append('<li class="dropdown">\
- <a class="dropdown-toggle" href="#" onclick="return false;">Help</a>\
- <ul class="dropdown-menu" id="toolbar-help">\
- </ul></li>')
-
- $('#toolbar-help').append('<li><a href="http://erpnext.blogspot.com/2011/03/erpnext-help.html" target="_blank">\
- Documentation</a></li>')
-
- $('#toolbar-help').append('<li><a href="http://groups.google.com/group/erpnext-user-forum" target="_blank">\
- Forum</a></li>')
-
- $('#toolbar-help').append('<li><a href="http://www.providesupport.com?messenger=iwebnotes" target="_blank">\
- Live Chat (Office Hours)</a></li>')
-
- // billing
- if(pscript.is_erpnext_saas && is_system_manager) {
- $('#toolbar-user').append('<li><a href="#billing">Billing</a></li>')
- }
-
- $.extend(page_body.wntoolbar, {
- set_new_comments: function(new_comments) {
- var topbar_nc = $('#toolbar-new-comments');
- if(new_comments && new_comments.length>0) {
- topbar_nc.html('<span class="topbar-new-comments">' + new_comments.length + '</span>');
- topbar_nc.click(function() { loadpage('My Company'); });
- $.each(new_comments, function(i, v) {
- var msg = 'New Message: ' + (v[1].length<=100 ? v[1] : (v[1].substr(0, 100) + "..."));
- var id = v[0].replace('/', '-');
- if(!$('#' + id)[0]) { show_alert(msg, id); }
- })
- } else {
- topbar_nc.html('');
- topbar_nc.click(function() { return false; });
- }
- }
- });
-
- page_body.wntoolbar.set_new_comments();
-}
-
diff --git a/erpnext/stock/DocType Mapper/Delivery Note-Packing Slip/Delivery Note-Packing Slip.txt b/erpnext/stock/DocType Mapper/Delivery Note-Packing Slip/Delivery Note-Packing Slip.txt
index f59ab73..7cc2350 100644
--- a/erpnext/stock/DocType Mapper/Delivery Note-Packing Slip/Delivery Note-Packing Slip.txt
+++ b/erpnext/stock/DocType Mapper/Delivery Note-Packing Slip/Delivery Note-Packing Slip.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2012-02-02 11:50:33',
+ 'creation': '2012-02-22 15:45:56',
'docstatus': 0,
- 'modified': '2012-02-21 16:11:29',
+ 'modified': '2012-02-22 15:45:56',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
diff --git a/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
index 3c50836..c7e1557 100644
--- a/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
+++ b/erpnext/stock/DocType Mapper/Purchase Order-Purchase Receipt/Purchase Order-Purchase Receipt.txt
@@ -3,9 +3,9 @@
# These values are common in all dictionaries
{
- 'creation': '2010-08-08 17:09:35',
+ 'creation': '2010-09-20 12:33:34',
'docstatus': 0,
- 'modified': '2012-02-07 13:28:20',
+ 'modified': '2012-03-01 14:01:03',
'modified_by': u'Administrator',
'owner': u'Administrator'
},
@@ -22,7 +22,6 @@
# These values are common for all Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
- 'map': u'Yes',
'name': '__common__',
'parent': u'Purchase Order-Purchase Receipt',
'parentfield': u'field_mapper_details',
@@ -50,6 +49,7 @@
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'supplier',
+ 'map': u'Yes',
'match_id': 0,
'to_field': u'supplier'
},
@@ -59,6 +59,7 @@
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'company',
+ 'map': u'Yes',
'match_id': 0,
'to_field': u'company'
},
@@ -68,6 +69,7 @@
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'currency',
+ 'map': u'Yes',
'match_id': 0,
'to_field': u'currency'
},
@@ -76,6 +78,7 @@
{
'doctype': u'Field Mapper Detail',
'from_field': u'name',
+ 'map': u'Yes',
'match_id': 1,
'to_field': u'prevdoc_detail_docname'
},
@@ -84,6 +87,7 @@
{
'doctype': u'Field Mapper Detail',
'from_field': u'parent',
+ 'map': u'Yes',
'match_id': 1,
'to_field': u'prevdoc_docname'
},
@@ -92,6 +96,7 @@
{
'doctype': u'Field Mapper Detail',
'from_field': u'parenttype',
+ 'map': u'Yes',
'match_id': 1,
'to_field': u'prevdoc_doctype'
},
@@ -101,6 +106,7 @@
'checking_operator': u'=',
'doctype': u'Field Mapper Detail',
'from_field': u'item_code',
+ 'map': u'Yes',
'match_id': 1,
'to_field': u'item_code'
},
@@ -109,6 +115,7 @@
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) ',
+ 'map': u'Yes',
'match_id': 1,
'to_field': u'received_qty'
},
@@ -117,6 +124,7 @@
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) ',
+ 'map': u'Yes',
'match_id': 1,
'to_field': u'qty'
},
@@ -125,6 +133,7 @@
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) * flt(obj.conversion_factor)',
+ 'map': u'Yes',
'match_id': 1,
'to_field': u'stock_qty'
},
@@ -133,6 +142,7 @@
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) * flt(obj.import_rate)',
+ 'map': u'Yes',
'match_id': 1,
'to_field': u'import_amount'
},
@@ -141,6 +151,7 @@
{
'doctype': u'Field Mapper Detail',
'from_field': u'eval:(flt(obj.qty) - flt(obj.received_qty)) * flt(obj.purchase_rate)',
+ 'map': u'Yes',
'match_id': 1,
'to_field': u'amount'
},
@@ -149,6 +160,7 @@
{
'doctype': u'Field Mapper Detail',
'from_field': u'schedule_date',
+ 'map': u'Yes',
'match_id': 1,
'to_field': u'schedule_date'
},
@@ -157,6 +169,7 @@
{
'doctype': u'Field Mapper Detail',
'from_field': u'net_total',
+ 'map': u'Yes',
'match_id': 0,
'to_field': u'net_total'
},
@@ -165,6 +178,7 @@
{
'doctype': u'Field Mapper Detail',
'from_field': u'grand_total',
+ 'map': u'Yes',
'match_id': 0,
'to_field': u'grand_total'
},
@@ -173,6 +187,7 @@
{
'doctype': u'Field Mapper Detail',
'from_field': u'total_tax',
+ 'map': u'Yes',
'match_id': 0,
'to_field': u'total_tax'
},
@@ -180,7 +195,17 @@
# Field Mapper Detail
{
'doctype': u'Field Mapper Detail',
+ 'from_field': u'transaction_date',
+ 'map': u'No',
+ 'match_id': 0,
+ 'to_field': u'transaction_date'
+ },
+
+ # Field Mapper Detail
+ {
+ 'doctype': u'Field Mapper Detail',
'from_field': u'conversion_rate',
+ 'map': u'Yes',
'match_id': 0,
'to_field': u'conversion_rate'
},
diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py
index 8f1bdf2..dc847f6 100644
--- a/erpnext/stock/doctype/bin/bin.py
+++ b/erpnext/stock/doctype/bin/bin.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index 10297dd..b0569fc 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// Module Material Management
cur_frm.cscript.tname = "Delivery Note Detail";
cur_frm.cscript.fname = "delivery_note_details";
@@ -22,24 +38,25 @@
if(doc.__islocal){
hide_field(['customer_address','contact_person','customer_name','address_display','contact_display','contact_mobile','contact_email','territory','customer_group']);
- }
-
-
+ }
}
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
// defined in sales_common.js
- //cur_frm.cscript.update_item_details(doc, cdt, cdn);
-
- // load default charges
- if(doc.__islocal && !getchildren('RV Tax Detail', doc.name, 'other_charges', doc.doctype).length)
- cur_frm.cscript.load_taxes(doc, cdt, cdn);
+ var callback = function(doc, dt, dn) {
+ if(doc.__islocal) cur_frm.cscript.update_item_details(doc, dt, dn);
+ }
+
+ cur_frm.cscript.hide_price_list_currency(doc, dt, dn, callback);
}
// REFRESH
// ================================================================================================
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
cur_frm.clear_custom_buttons();
+
+ if (!cur_frm.cscript.is_onload) cur_frm.cscript.hide_price_list_currency(doc, cdt, cdn);
+
if(doc.per_billed < 100 && doc.docstatus==1) cur_frm.add_custom_button('Make Invoice', cur_frm.cscript['Make Sales Invoice']);
@@ -144,61 +161,6 @@
return repl('SELECT `tabProject`.name FROM `tabProject` WHERE `tabProject`.status = "Open" AND %(cond)s `tabProject`.name LIKE "%s" ORDER BY `tabProject`.name ASC LIMIT 50', {cond:cond});
}
-/*
-//---- get customer details ----------------------------
-cur_frm.cscript.project_name = function(doc,cdt,cdn){
- $c_obj(make_doclist(doc.doctype, doc.name),'pull_project_customer','', function(r,rt){
- refresh_many(['customer','customer_name', 'customer_address', 'contact_person', 'territory', 'contact_no', 'email_id', 'customer_group']);
- });
-}
-*/
-
-
-
-// UTILITY FUNCTIONS
-// ================================================================================================
-/*
-var cfn_set_fields = function(doc, cdt, cdn) {
- var supplier_field_list = ['Supplier','supplier','supplier_address'];
- var customer_field_list = ['Customer','customer','customer_name','customer_address','territory','customer_group','Business Associate','sales_partner','commission_rate','total_commission','sales_order_no','Get Items'];
- if (doc.delivery_type == 'Rejected' && doc.purchase_receipt_no) {
- unhide_field('purchase_receipt_no');
- unhide_field(supplier_field_list);
- hide_field(customer_field_list);
- get_field(doc.doctype, 'delivery_type' , doc.name).permlevel = 1;
- }
- else if (doc.delivery_type == 'Subcontract' && doc.purchase_order_no) {
- unhide_field('purchase_order_no');
- unhide_field(supplier_field_list);
- hide_field(cutomer_field_list);
- get_field(doc.doctype, 'delivery_type' , doc.name).permlevel = 1;
- }
- else if (doc.delivery_type == 'Sample') unhide_field('to_warehouse');
- else get_field(doc.doctype, 'delivery_type' , doc.name).permlevel = 0;
-
-
-}
-
-*/
-
-// DOCTYPE TRIGGERS
-// ================================================================================================
-
-/*
-// ***************** Get Contact Person based on customer selected *****************
-cur_frm.fields_dict['contact_person'].get_query = function(doc, cdt, cdn) {
- return 'SELECT `tabContact`.contact_name FROM `tabContact` WHERE ((`tabContact`.is_customer = 1 AND `tabContact`.customer = "'+ doc.customer+'") or (`tabContact`.is_sales_partner = 1 AND `tabContact`.sales_partner = "'+ doc.sales_partner+'")) AND `tabContact`.docstatus != 2 AND `tabContact`.contact_name LIKE "%s" ORDER BY `tabContact`.contact_name ASC LIMIT 50';
-}
-*/
-
-/*
-// ***************** get shipping address based on customer selected *****************
-cur_frm.fields_dict['ship_det_no'].get_query = function(doc, cdt, cdn) {
- return 'SELECT `tabShipping Address`.`name`, `tabShipping Address`.`ship_to`, `tabShipping Address`.`shipping_address` FROM `tabShipping Address` WHERE `tabShipping Address`.customer = "'+ doc.customer+'" AND `tabShipping Address`.`docstatus` != 2 AND `tabShipping Address`.`name` LIKE "%s" ORDER BY `tabShipping Address`.name ASC LIMIT 50';
-}
-*/
-
-
// *************** Customized link query for SALES ORDER based on customer and currency*****************************
cur_frm.fields_dict['sales_order_no'].get_query = function(doc) {
@@ -232,13 +194,6 @@
}
}
-/*
-// this won't work in case of Sales Bom item where item.is_stock_item = 'No'
-cur_frm.fields_dict['delivery_note_details'].grid.get_field('warehouse').get_query= function(doc, cdt, cdn) {
- var d = locals[cdt][cdn];
- return "SELECT `tabBin`.`warehouse`, `tabBin`.`actual_qty` FROM `tabBin` WHERE `tabBin`.`item_code` = '"+ d.item_code +"' AND ifnull(`tabBin`.`actual_qty`,0) > 0 AND `tabBin`.`warehouse` like '%s' ORDER BY `tabBin`.`warehouse` DESC LIMIT 50";
-}
-*/
cur_frm.cscript.warehouse = function(doc, cdt, cdn) {
var d = locals[cdt][cdn];
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py
index 40fdc94..0bca9d0 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
@@ -100,14 +116,17 @@
# ================================================================================
# ***************** Get Item Details ******************************
- def get_item_details(self, item_code=None):
- if item_code:
- return get_obj('Sales Common').get_item_details(item_code, self)
+ def get_item_details(self, args=None):
+ args = args and eval(args) or {}
+ if args.get('item_code'):
+ return get_obj('Sales Common').get_item_details(args, self)
else:
obj = get_obj('Sales Common')
for doc in self.doclist:
if doc.fields.get('item_code'):
- ret = obj.get_item_details(doc.item_code, self)
+ arg = {'item_code':doc.fields.get('item_code'), 'income_account':doc.fields.get('income_account'),
+ 'cost_center': doc.fields.get('cost_center'), 'warehouse': doc.fields.get('warehouse')};
+ ret = obj.get_item_details(arg, self)
for r in ret:
if not doc.fields.get(r):
doc.fields[r] = ret[r]
@@ -117,6 +136,7 @@
def get_adj_percent(self, arg=''):
get_obj('Sales Common').get_adj_percent(self)
+
# ********** Get Actual Qty of item in warehouse selected *************
def get_actual_qty(self,args):
args = eval(args)
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.txt b/erpnext/stock/doctype/delivery_note/delivery_note.txt
index 00bf9a8..6570b0c 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.txt
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.txt
@@ -5,64 +5,64 @@
{
'creation': '2011-04-18 15:58:20',
'docstatus': 0,
- 'modified': '2012-01-30 16:52:12',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-27 17:35:31',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Delivery Note',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'Delivery Note',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# These values are common for all DocType
{
- '_last_update': '1326273792',
- 'colour': 'White:FFF',
- 'default_print_format': 'Standard',
+ '_last_update': u'1330343754',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
- 'document_type': 'Transaction',
+ 'document_type': u'Transaction',
'in_create': 0,
'is_transaction_doc': 1,
- 'module': 'Stock',
+ 'module': u'Stock',
'name': '__common__',
'read_only_onload': 1,
- 'search_fields': 'status,transaction_date,customer,customer_name, territory,grand_total',
- 'section_style': 'Tabbed',
- 'server_code_error': ' ',
+ 'search_fields': u'status,transaction_date,customer,customer_name, territory,grand_total',
+ 'section_style': u'Tabbed',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'subject': 'To %(customer_name)s on %(transaction_date)s | %(per_billed)s% billed',
- 'tag_fields': 'billing_status',
- 'version': 464
+ 'subject': u'To %(customer_name)s on %(transaction_date)s | %(per_billed)s% billed',
+ 'tag_fields': u'billing_status',
+ 'version': 474
},
# These values are common for all DocFormat
{
- 'doctype': 'DocFormat',
+ 'doctype': u'DocFormat',
'name': '__common__',
- 'parent': 'Delivery Note',
- 'parentfield': 'formats',
- 'parenttype': 'DocType'
+ 'parent': u'Delivery Note',
+ 'parentfield': u'formats',
+ 'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'name': '__common__',
- 'parent': 'Delivery Note',
- 'parentfield': 'permissions',
- 'parenttype': 'DocType',
+ 'parent': u'Delivery Note',
+ 'parentfield': u'permissions',
+ 'parenttype': u'DocType',
'read': 1
},
# DocType, Delivery Note
{
'doctype': 'DocType',
- 'name': 'Delivery Note'
+ 'name': u'Delivery Note'
},
# DocPerm
@@ -70,9 +70,9 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Material User',
+ 'role': u'Material User',
'submit': 1,
'write': 1
},
@@ -82,9 +82,9 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Sales User',
+ 'role': u'Sales User',
'submit': 1,
'write': 1
},
@@ -94,9 +94,9 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Material Master Manager',
+ 'role': u'Material Master Manager',
'submit': 1,
'write': 1
},
@@ -106,9 +106,9 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Material Manager',
+ 'role': u'Material Manager',
'submit': 1,
'write': 1
},
@@ -118,84 +118,78 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Sales Manager',
+ 'role': u'Sales Manager',
'submit': 1,
'write': 1
},
# DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'All',
+ 'role': u'All',
'write': 0
},
# DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'permlevel': 2,
- 'role': 'All'
+ 'role': u'All'
},
# DocFormat
{
- 'doctype': 'DocFormat',
- 'format': 'Delivery Note Packing List Wise'
+ 'doctype': u'DocFormat',
+ 'format': u'Delivery Note Classic'
},
# DocFormat
{
- 'doctype': 'DocFormat',
- 'format': 'Delivery Note Classic'
+ 'doctype': u'DocFormat',
+ 'format': u'Delivery Note Modern'
},
# DocFormat
{
- 'doctype': 'DocFormat',
- 'format': 'Delivery Note Modern'
- },
-
- # DocFormat
- {
- 'doctype': 'DocFormat',
- 'format': 'Delivery Note Spartan'
+ 'doctype': u'DocFormat',
+ 'format': u'Delivery Note Spartan'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Basic Info',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Basic Info',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
- 'trigger': 'Client',
- 'width': '50%'
+ 'trigger': u'Client',
+ 'width': u'50%'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'To manage multiple series please go to Setup > Manage Series',
- 'doctype': 'DocField',
- 'fieldname': 'naming_series',
- 'fieldtype': 'Select',
- 'label': 'Series',
+ 'colour': u'White:FFF',
+ 'description': u'To manage multiple series please go to Setup > Manage Series',
+ 'doctype': u'DocField',
+ 'fieldname': u'naming_series',
+ 'fieldtype': u'Select',
+ 'label': u'Series',
'no_copy': 1,
- 'oldfieldname': 'naming_series',
- 'oldfieldtype': 'Select',
- 'options': 'DN',
+ 'oldfieldname': u'naming_series',
+ 'oldfieldtype': u'Select',
+ 'options': u'DN',
'permlevel': 0,
'print_hide': 1,
'reqd': 1
@@ -203,1234 +197,1171 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'customer',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Customer',
- 'oldfieldname': 'customer',
- 'oldfieldtype': 'Link',
- 'options': 'Customer',
+ 'label': u'Customer',
+ 'oldfieldname': u'customer',
+ 'oldfieldtype': u'Link',
+ 'options': u'Customer',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'customer_address',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_address',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Shipping Address',
- 'options': 'Address',
+ 'label': u'Shipping Address',
+ 'options': u'Address',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_person',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_person',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Contact Person',
- 'options': 'Contact',
+ 'label': u'Contact Person',
+ 'options': u'Contact',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'customer_name',
- 'fieldtype': 'Data',
- 'label': 'Customer Name',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_name',
+ 'fieldtype': u'Data',
+ 'label': u'Customer Name',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'address_display',
- 'fieldtype': 'Small Text',
- 'label': 'Shipping Address',
+ 'doctype': u'DocField',
+ 'fieldname': u'address_display',
+ 'fieldtype': u'Small Text',
+ 'label': u'Shipping Address',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_display',
- 'fieldtype': 'Small Text',
- 'label': 'Contact',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_display',
+ 'fieldtype': u'Small Text',
+ 'label': u'Contact',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_mobile',
- 'fieldtype': 'Text',
- 'label': 'Mobile No',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_mobile',
+ 'fieldtype': u'Text',
+ 'label': u'Mobile No',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_email',
- 'fieldtype': 'Text',
- 'label': 'Contact Email',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_email',
+ 'fieldtype': u'Text',
+ 'label': u'Contact Email',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'default': 'Today',
- 'description': 'The date at which current entry is made in system.',
- 'doctype': 'DocField',
- 'fieldname': 'transaction_date',
- 'fieldtype': 'Date',
+ 'colour': u'White:FFF',
+ 'default': u'Today',
+ 'description': u'The date at which current entry is made in system.',
+ 'doctype': u'DocField',
+ 'fieldname': u'transaction_date',
+ 'fieldtype': u'Date',
'in_filter': 1,
- 'label': 'Voucher Date',
+ 'label': u'Voucher Date',
'no_copy': 1,
- 'oldfieldname': 'transaction_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'transaction_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 1,
+ 'search_index': 1,
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'default': u'Today',
+ 'description': u'The date at which current entry will get or has actually executed.',
+ 'doctype': u'DocField',
+ 'fieldname': u'posting_date',
+ 'fieldtype': u'Date',
+ 'in_filter': 1,
+ 'label': u'Posting Date',
+ 'no_copy': 1,
+ 'oldfieldname': u'posting_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 0,
'reqd': 1,
'search_index': 1,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'default': 'Draft',
- 'doctype': 'DocField',
- 'fieldname': 'status',
- 'fieldtype': 'Select',
- 'in_filter': 1,
- 'label': 'Status',
- 'no_copy': 1,
- 'oldfieldname': 'status',
- 'oldfieldtype': 'Select',
- 'options': '\nDraft\nSubmitted\nCancelled',
- 'permlevel': 1,
- 'print_hide': 1,
- 'reqd': 1,
- 'search_index': 1,
- 'width': '150px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'depends_on': 'eval:!doc.__islocal',
- 'description': '% of materials billed against this Delivery Note',
- 'doctype': 'DocField',
- 'fieldname': 'per_billed',
- 'fieldtype': 'Currency',
- 'in_filter': 1,
- 'label': '% Amount Billed',
- 'no_copy': 1,
- 'oldfieldname': 'per_billed',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1,
- 'search_index': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'depends_on': 'eval:!doc.__islocal',
- 'description': '% of materials delivered against this Delivery Note',
- 'doctype': 'DocField',
- 'fieldname': 'per_installed',
- 'fieldtype': 'Currency',
- 'in_filter': 1,
- 'label': '% Installed',
- 'no_copy': 1,
- 'oldfieldname': 'per_installed',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1,
- 'search_index': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'po_no',
- 'fieldtype': 'Data',
- 'hidden': 1,
- 'label': 'P.O. No',
- 'no_copy': 0,
- 'oldfieldname': 'po_no',
- 'oldfieldtype': 'Data',
- 'permlevel': 1,
- 'print_hide': 1,
- 'width': '100px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'po_date',
- 'fieldtype': 'Data',
- 'hidden': 1,
- 'label': 'P.O. Date',
- 'no_copy': 0,
- 'oldfieldname': 'po_date',
- 'oldfieldtype': 'Data',
- 'permlevel': 1,
- 'print_hide': 1,
- 'width': '100px'
- },
-
- # DocField
- {
- 'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'amended_from',
- 'fieldtype': 'Data',
- 'label': 'Amended From',
- 'no_copy': 1,
- 'oldfieldname': 'amended_from',
- 'oldfieldtype': 'Data',
- 'permlevel': 1,
- 'print_hide': 1,
- 'width': '150px'
- },
-
- # DocField
- {
- 'description': 'The date at which current entry is corrected in the system.',
- 'doctype': 'DocField',
- 'fieldname': 'amendment_date',
- 'fieldtype': 'Date',
- 'label': 'Amendment Date',
- 'no_copy': 1,
- 'oldfieldname': 'amendment_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 0,
- 'print_hide': 1,
- 'width': '100px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'territory',
- 'fieldtype': 'Link',
- 'hidden': 0,
- 'in_filter': 1,
- 'label': 'Territory',
- 'options': 'Territory',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1,
- 'search_index': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'customer_group',
- 'fieldtype': 'Link',
- 'in_filter': 1,
- 'label': 'Customer Group',
- 'options': 'Customer Group',
- 'permlevel': 0,
- 'print_hide': 1,
- 'search_index': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Transporter Info',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'transporter_name',
- 'fieldtype': 'Data',
- 'label': 'Transporter Name',
- 'no_copy': 0,
- 'oldfieldname': 'transporter_name',
- 'oldfieldtype': 'Data',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 0,
- 'trigger': 'Client',
- 'width': '150px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Transporter lorry number',
- 'doctype': 'DocField',
- 'fieldname': 'lr_no',
- 'fieldtype': 'Data',
- 'label': 'LR No',
- 'no_copy': 0,
- 'oldfieldname': 'lr_no',
- 'oldfieldtype': 'Data',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 0,
- 'width': '100px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'default': 'Today',
- 'description': 'Date on which lorry started from your warehouse',
- 'doctype': 'DocField',
- 'fieldname': 'lr_date',
- 'fieldtype': 'Date',
- 'label': 'LR Date',
- 'no_copy': 0,
- 'oldfieldname': 'lr_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 0,
- 'print_hide': 1,
- 'width': '100px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'permlevel': 0,
- 'width': '50%'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'challan_no',
- 'fieldtype': 'Data',
- 'label': 'Challan No',
- 'oldfieldname': 'challan_no',
- 'oldfieldtype': 'Data',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'challan_date',
- 'fieldtype': 'Date',
- 'label': 'Challan Date',
- 'oldfieldname': 'challan_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Items',
- 'oldfieldtype': 'Section Break',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Select the price list as entered in "Price List" master. This will pull the reference rates of items against this price list as specified in "Item" master.',
- 'doctype': 'DocField',
- 'fieldname': 'price_list_name',
- 'fieldtype': 'Select',
- 'label': 'Price List',
- 'oldfieldname': 'price_list_name',
- 'oldfieldtype': 'Select',
- 'options': 'link:Price List',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Select the currency in which price list is maintained',
- 'doctype': 'DocField',
- 'fieldname': 'price_list_currency',
- 'fieldtype': 'Select',
- 'label': 'Price List Currency',
- 'options': 'link:Currency',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Rate at which Price list currency is converted to your currency',
- 'doctype': 'DocField',
- 'fieldname': 'plc_conversion_rate',
- 'fieldtype': 'Currency',
- 'label': 'Price List Currency Conversion Rate',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'permlevel': 0,
- 'width': '50%'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': "Customer's Currency",
- 'doctype': 'DocField',
- 'fieldname': 'currency',
- 'fieldtype': 'Select',
- 'label': 'Currency',
- 'oldfieldname': 'currency',
- 'oldfieldtype': 'Select',
- 'options': 'link:Currency',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'default': '1.00',
- 'description': "Rate at which customer's currency is converted to your currency",
- 'doctype': 'DocField',
- 'fieldname': 'conversion_rate',
- 'fieldtype': 'Currency',
- 'label': 'Conversion Rate',
- 'no_copy': 0,
- 'oldfieldname': 'conversion_rate',
- 'oldfieldtype': 'Currency',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'You can make a delivery note from multiple sales orders. Select sales orders one by one and click on the button below.',
- 'doctype': 'DocField',
- 'fieldname': 'sales_order_no',
- 'fieldtype': 'Link',
- 'label': 'Sales Order No',
- 'no_copy': 0,
- 'oldfieldname': 'sales_order_no',
- 'oldfieldtype': 'Link',
- 'options': 'Sales Order',
- 'permlevel': 0,
- 'print_hide': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'hidden': 0,
- 'label': 'Get Items',
- 'oldfieldtype': 'Button',
- 'options': 'pull_sales_order_details',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'delivery_note_details',
- 'fieldtype': 'Table',
- 'label': 'Delivery Note Details',
- 'no_copy': 0,
- 'oldfieldname': 'delivery_note_details',
- 'oldfieldtype': 'Table',
- 'options': 'Delivery Note Detail',
- 'permlevel': 0,
- 'print_hide': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'net_total',
- 'fieldtype': 'Currency',
- 'label': 'Net Total*',
- 'no_copy': 0,
- 'oldfieldname': 'net_total',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 0,
- 'reqd': 0,
- 'width': '150px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Re-Calculate Values',
- 'oldfieldtype': 'Button',
- 'permlevel': 0,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'Note',
- 'oldfieldtype': 'HTML',
- 'options': '<b>NOTE :</b>* In Base Currency',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Taxes',
- 'oldfieldtype': 'Section Break',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'If you have created a standard template in Other Charges master, select one and click on the button below.',
- 'doctype': 'DocField',
- 'fieldname': 'charge',
- 'fieldtype': 'Link',
- 'label': 'Charge',
- 'oldfieldname': 'charge',
- 'oldfieldtype': 'Link',
- 'options': 'Other Charges',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Get Charges',
- 'oldfieldtype': 'Button',
- 'permlevel': 0,
- 'print_hide': 1,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'other_charges',
- 'fieldtype': 'Table',
- 'label': 'Other Charges',
- 'no_copy': 0,
- 'oldfieldname': 'other_charges',
- 'oldfieldtype': 'Table',
- 'options': 'RV Tax Detail',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'other_charges_total',
- 'fieldtype': 'Currency',
- 'label': 'Charges Total',
- 'oldfieldname': 'other_charges_total',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1,
- 'width': '150px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Calculate Charges',
- 'oldfieldtype': 'Button',
- 'permlevel': 0,
- 'print_hide': 1,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'Other Charges Calculation',
- 'oldfieldtype': 'HTML',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Totals',
- 'oldfieldtype': 'Section Break',
- 'permlevel': 0,
- 'print_hide': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'grand_total',
- 'fieldtype': 'Currency',
- 'label': 'Grand Total',
- 'no_copy': 0,
- 'oldfieldname': 'grand_total',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1,
- 'reqd': 0,
- 'width': '150px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'rounded_total',
- 'fieldtype': 'Currency',
- 'label': 'Rounded Total',
- 'no_copy': 0,
- 'oldfieldname': 'rounded_total',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1,
- 'width': '150px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'In Words will be visible once you save the Delivery Note.',
- 'doctype': 'DocField',
- 'fieldname': 'in_words',
- 'fieldtype': 'Data',
- 'label': 'In Words',
- 'no_copy': 0,
- 'oldfieldname': 'in_words',
- 'oldfieldtype': 'Data',
- 'permlevel': 1,
- 'print_hide': 1,
- 'width': '200px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'grand_total_export',
- 'fieldtype': 'Currency',
- 'label': 'Grand Total (Export)',
- 'no_copy': 0,
- 'oldfieldname': 'grand_total_export',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 0,
- 'reqd': 0,
- 'width': '150px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'rounded_total_export',
- 'fieldtype': 'Currency',
- 'label': 'Rounded Total (Export)',
- 'no_copy': 0,
- 'oldfieldname': 'rounded_total_export',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 0,
- 'width': '150px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'In Words (Export) will be visible once you save the Delivery Note.',
- 'doctype': 'DocField',
- 'fieldname': 'in_words_export',
- 'fieldtype': 'Data',
- 'label': 'In Words (Export)',
- 'no_copy': 0,
- 'oldfieldname': 'in_words_export',
- 'oldfieldtype': 'Data',
- 'permlevel': 1,
- 'print_hide': 1,
- 'width': '150px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Terms',
- 'oldfieldtype': 'Section Break',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'tc_name',
- 'fieldtype': 'Link',
- 'label': 'Select Terms',
- 'oldfieldname': 'tc_name',
- 'oldfieldtype': 'Link',
- 'options': 'Term',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Get Terms',
- 'oldfieldtype': 'Button',
- 'options': 'get_tc_details',
- 'permlevel': 0,
- 'trigger': 'Server'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'label': 'Terms HTML',
- 'oldfieldtype': 'HTML',
- 'options': 'You can add Terms and Notes that will be printed in the Transaction',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'terms',
- 'fieldtype': 'Text Editor',
- 'label': 'Term Details',
- 'oldfieldname': 'terms',
- 'oldfieldtype': 'Text Editor',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Filling in Additional Information about the Delivery Note will help you analyze your data better.',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'More Info',
- 'oldfieldtype': 'Section Break',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Select the relevant company name if you have multiple companies',
- 'doctype': 'DocField',
- 'fieldname': 'company',
- 'fieldtype': 'Link',
- 'in_filter': 1,
- 'label': 'Company',
- 'oldfieldname': 'company',
- 'oldfieldtype': 'Link',
- 'options': 'Company',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1,
- 'search_index': 1,
- 'width': '150px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'fiscal_year',
- 'fieldtype': 'Select',
- 'in_filter': 1,
- 'label': 'Fiscal Year',
- 'oldfieldname': 'fiscal_year',
- 'oldfieldtype': 'Select',
- 'options': 'link:Fiscal Year',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1,
- 'search_index': 1,
- 'width': '150px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'default': 'Today',
- 'description': 'The date at which current entry will get or has actually executed.',
- 'doctype': 'DocField',
- 'fieldname': 'posting_date',
- 'fieldtype': 'Date',
- 'in_filter': 1,
- 'label': 'Posting Date',
- 'no_copy': 1,
- 'oldfieldname': 'posting_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1,
- 'search_index': 1,
- 'width': '100px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Time at which items were delivered from warehouse',
- 'doctype': 'DocField',
- 'fieldname': 'posting_time',
- 'fieldtype': 'Time',
+ 'colour': u'White:FFF',
+ 'description': u'Time at which items were delivered from warehouse',
+ 'doctype': u'DocField',
+ 'fieldname': u'posting_time',
+ 'fieldtype': u'Time',
'in_filter': 0,
- 'label': 'Posting Time',
- 'oldfieldname': 'posting_time',
- 'oldfieldtype': 'Time',
+ 'label': u'Posting Time',
+ 'oldfieldname': u'posting_time',
+ 'oldfieldtype': u'Time',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Track this Delivery Note against any Project',
- 'doctype': 'DocField',
- 'fieldname': 'project_name',
- 'fieldtype': 'Link',
+ 'default': u'Draft',
+ 'doctype': u'DocField',
+ 'fieldname': u'status',
+ 'fieldtype': u'Select',
'in_filter': 1,
- 'label': 'Project Name',
- 'oldfieldname': 'project_name',
- 'oldfieldtype': 'Link',
- 'options': 'Project',
- 'permlevel': 0,
+ 'label': u'Status',
+ 'no_copy': 1,
+ 'oldfieldname': u'status',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nDraft\nSubmitted\nCancelled',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'reqd': 1,
'search_index': 1,
- 'trigger': 'Client'
+ 'width': u'150px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Required only for sample item.',
- 'doctype': 'DocField',
- 'fieldname': 'to_warehouse',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'description': u'% of materials billed against this Delivery Note',
+ 'doctype': u'DocField',
+ 'fieldname': u'per_billed',
+ 'fieldtype': u'Currency',
+ 'in_filter': 1,
+ 'label': u'% Amount Billed',
+ 'no_copy': 1,
+ 'oldfieldname': u'per_billed',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'search_index': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'description': u'% of materials delivered against this Delivery Note',
+ 'doctype': u'DocField',
+ 'fieldname': u'per_installed',
+ 'fieldtype': u'Currency',
+ 'in_filter': 1,
+ 'label': u'% Installed',
+ 'no_copy': 1,
+ 'oldfieldname': u'per_installed',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'search_index': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'po_no',
+ 'fieldtype': u'Data',
+ 'hidden': 1,
+ 'label': u'P.O. No',
+ 'no_copy': 0,
+ 'oldfieldname': u'po_no',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:doc.po_no',
+ 'doctype': u'DocField',
+ 'fieldname': u'po_date',
+ 'fieldtype': u'Data',
+ 'hidden': 1,
+ 'label': u'P.O. Date',
+ 'no_copy': 0,
+ 'oldfieldname': u'po_date',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'allow_on_submit': 0,
+ 'doctype': u'DocField',
+ 'fieldname': u'amended_from',
+ 'fieldtype': u'Data',
+ 'label': u'Amended From',
+ 'no_copy': 1,
+ 'oldfieldname': u'amended_from',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'description': u'The date at which current entry is corrected in the system.',
+ 'doctype': u'DocField',
+ 'fieldname': u'amendment_date',
+ 'fieldtype': u'Date',
+ 'label': u'Amendment Date',
+ 'no_copy': 1,
+ 'oldfieldname': u'amendment_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'territory',
+ 'fieldtype': u'Link',
'hidden': 0,
- 'label': 'To Warehouse',
- 'no_copy': 1,
- 'oldfieldname': 'to_warehouse',
- 'oldfieldtype': 'Link',
- 'options': 'Warehouse',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'oldfieldtype': 'Column Break',
- 'permlevel': 0,
- 'width': '50%'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'billing_status',
- 'fieldtype': 'Select',
- 'hidden': 1,
- 'label': 'Billing Status',
- 'no_copy': 1,
- 'options': '\nNot Billed\nPartly Billed\nFully Billed',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'installation_status',
- 'fieldtype': 'Select',
- 'hidden': 1,
- 'label': 'Installation Status',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'letter_head',
- 'fieldtype': 'Select',
- 'label': 'Letter Head',
- 'oldfieldname': 'letter_head',
- 'oldfieldtype': 'Link',
- 'options': 'link:Letter Head',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'source',
- 'fieldtype': 'Select',
- 'label': 'Source',
- 'oldfieldname': 'source',
- 'oldfieldtype': 'Select',
- 'options': "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'depends_on': "eval:doc.source == 'Campaign'",
- 'doctype': 'DocField',
- 'fieldname': 'campaign',
- 'fieldtype': 'Link',
- 'label': 'Campaign',
- 'oldfieldname': 'campaign',
- 'oldfieldtype': 'Link',
- 'options': 'Campaign',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'allow_on_submit': 1,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'select_print_heading',
- 'fieldtype': 'Link',
- 'label': 'Select Print Heading',
- 'no_copy': 1,
- 'oldfieldname': 'select_print_heading',
- 'oldfieldtype': 'Link',
- 'options': 'Print Heading',
+ 'in_filter': 1,
+ 'label': u'Territory',
+ 'options': u'Territory',
'permlevel': 0,
'print_hide': 1,
- 'report_hide': 1,
- 'trigger': 'Client'
+ 'reqd': 1,
+ 'search_index': 1
},
# DocField
{
- 'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'print_without_amount',
- 'fieldtype': 'Check',
- 'label': 'Print Without Amount',
- 'oldfieldname': 'print_without_amount',
- 'oldfieldtype': 'Check',
+ 'doctype': u'DocField',
+ 'fieldname': u'customer_group',
+ 'fieldtype': u'Link',
+ 'in_filter': 1,
+ 'label': u'Customer Group',
+ 'options': u'Customer Group',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'search_index': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'instructions',
- 'fieldtype': 'Text',
- 'label': 'Instructions',
- 'oldfieldname': 'instructions',
- 'oldfieldtype': 'Text',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Items',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'depends_on': 'eval:!doc.__islocal',
- 'doctype': 'DocField',
- 'fieldname': 'cancel_reason',
- 'fieldtype': 'Data',
- 'hidden': 0,
- 'label': 'Cancel Reason',
- 'no_copy': 1,
- 'oldfieldname': 'cancel_reason',
- 'oldfieldtype': 'Data',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'excise_page',
- 'fieldtype': 'Data',
- 'hidden': 1,
- 'label': 'Excise Page Number',
- 'oldfieldname': 'excise_page',
- 'oldfieldtype': 'Data',
+ 'colour': u'White:FFF',
+ 'description': u'Select the price list as entered in "Price List" master. This will pull the reference rates of items against this price list as specified in "Item" master.',
+ 'doctype': u'DocField',
+ 'fieldname': u'price_list_name',
+ 'fieldtype': u'Select',
+ 'label': u'Price List',
+ 'oldfieldname': u'price_list_name',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Price List',
'permlevel': 0,
- 'print_hide': 1
+ 'print_hide': 1,
+ 'reqd': 1,
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Sales Team',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Select the currency in which price list is maintained',
+ 'doctype': u'DocField',
+ 'fieldname': u'price_list_currency',
+ 'fieldtype': u'Select',
+ 'label': u'Price List Currency',
+ 'options': u'link:Currency',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u"Rate at which Price list currency is converted to company's base currency",
+ 'doctype': u'DocField',
+ 'fieldname': u'plc_conversion_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Price List Currency Conversion Rate',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u"Customer's Currency",
+ 'doctype': u'DocField',
+ 'fieldname': u'currency',
+ 'fieldtype': u'Select',
+ 'label': u'Currency',
+ 'oldfieldname': u'currency',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Currency',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'default': u'1.00',
+ 'description': u"Rate at which customer's currency is converted to company's base currency",
+ 'doctype': u'DocField',
+ 'fieldname': u'conversion_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Conversion Rate',
+ 'no_copy': 0,
+ 'oldfieldname': u'conversion_rate',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'You can make a delivery note from multiple sales orders. Select sales orders one by one and click on the button below.',
+ 'doctype': u'DocField',
+ 'fieldname': u'sales_order_no',
+ 'fieldtype': u'Link',
+ 'label': u'Sales Order No',
+ 'no_copy': 0,
+ 'oldfieldname': u'sales_order_no',
+ 'oldfieldtype': u'Link',
+ 'options': u'Sales Order',
'permlevel': 0,
'print_hide': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'permlevel': 0,
- 'width': '50%'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'sales_partner',
- 'fieldtype': 'Link',
- 'label': 'Sales Partner',
- 'no_copy': 0,
- 'oldfieldname': 'sales_partner',
- 'oldfieldtype': 'Link',
- 'options': 'Sales Partner',
- 'permlevel': 0,
- 'print_hide': 1,
- 'trigger': 'Client',
- 'width': '150px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'commission_rate',
- 'fieldtype': 'Currency',
- 'label': 'Commission Rate (%)',
- 'no_copy': 0,
- 'oldfieldname': 'commission_rate',
- 'oldfieldtype': 'Currency',
- 'permlevel': 0,
- 'print_hide': 1,
- 'trigger': 'Client',
- 'width': '100px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'total_commission',
- 'fieldtype': 'Currency',
- 'label': 'Total Commission',
- 'no_copy': 0,
- 'oldfieldname': 'total_commission',
- 'oldfieldtype': 'Currency',
- 'permlevel': 0,
- 'print_hide': 1,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'permlevel': 0,
- 'width': '50%'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'sales_team',
- 'fieldtype': 'Table',
- 'label': 'Sales Team1',
- 'oldfieldname': 'sales_team',
- 'oldfieldtype': 'Table',
- 'options': 'Sales Team',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'hidden': 0,
+ 'label': u'Get Items',
+ 'oldfieldtype': u'Button',
+ 'options': u'pull_sales_order_details',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'hidden': 1,
- 'label': 'Supplier Details',
- 'oldfieldtype': 'Section Break',
- 'options': 'Simple',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'supplier',
- 'fieldtype': 'Link',
- 'hidden': 1,
- 'label': 'Supplier',
- 'oldfieldname': 'supplier',
- 'oldfieldtype': 'Link',
- 'options': 'Supplier',
+ 'allow_on_submit': 1,
+ 'doctype': u'DocField',
+ 'fieldname': u'delivery_note_details',
+ 'fieldtype': u'Table',
+ 'label': u'Delivery Note Details',
+ 'no_copy': 0,
+ 'oldfieldname': u'delivery_note_details',
+ 'oldfieldtype': u'Table',
+ 'options': u'Delivery Note Detail',
'permlevel': 0,
- 'print_hide': 1
+ 'print_hide': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'supplier_address',
- 'fieldtype': 'Text',
- 'hidden': 1,
- 'label': 'Supplier Address',
- 'oldfieldname': 'supplier_address',
- 'oldfieldtype': 'Text',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'allow_on_submit': 0,
- 'doctype': 'DocField',
- 'fieldname': 'purchase_receipt_no',
- 'fieldtype': 'Link',
- 'hidden': 1,
- 'label': 'Purchase Receipt No',
- 'no_copy': 1,
- 'oldfieldname': 'purchase_receipt_no',
- 'oldfieldtype': 'Link',
- 'options': 'Purchase Receipt',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'purchase_order_no',
- 'fieldtype': 'Link',
- 'hidden': 1,
- 'label': 'Purchase Order',
- 'no_copy': 1,
- 'oldfieldname': 'purchase_order_no',
- 'oldfieldtype': 'Link',
- 'options': 'Purchase Order',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'label': 'Packing List',
- 'oldfieldtype': 'Section Break',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'packing_details',
- 'fieldtype': 'Table',
- 'label': 'Packing Details',
- 'oldfieldname': 'packing_details',
- 'oldfieldtype': 'Table',
- 'options': 'Delivery Note Packing Detail',
+ 'doctype': u'DocField',
+ 'fieldname': u'net_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Net Total*',
+ 'no_copy': 0,
+ 'oldfieldname': u'net_total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
+ 'print_hide': 0,
+ 'reqd': 0,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Re-Calculate Values',
+ 'oldfieldtype': u'Button',
+ 'permlevel': 0,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Taxes',
+ 'oldfieldtype': u'Section Break',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'If you have created a standard template in Other Charges master, select one and click on the button below.',
+ 'doctype': u'DocField',
+ 'fieldname': u'charge',
+ 'fieldtype': u'Link',
+ 'label': u'Charge',
+ 'oldfieldname': u'charge',
+ 'oldfieldtype': u'Link',
+ 'options': u'Other Charges',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Charges',
+ 'oldfieldtype': u'Button',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges',
+ 'fieldtype': u'Table',
+ 'label': u'Other Charges',
+ 'no_copy': 0,
+ 'oldfieldname': u'other_charges',
+ 'oldfieldtype': u'Table',
+ 'options': u'RV Tax Detail',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Charges Total',
+ 'oldfieldname': u'other_charges_total',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Calculate Charges',
+ 'oldfieldtype': u'Button',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Other Charges Calculation',
+ 'oldfieldtype': u'HTML',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Totals',
+ 'oldfieldtype': u'Section Break',
+ 'permlevel': 0,
+ 'print_hide': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'grand_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Grand Total',
+ 'no_copy': 0,
+ 'oldfieldname': u'grand_total',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'reqd': 0,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'rounded_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Rounded Total',
+ 'no_copy': 0,
+ 'oldfieldname': u'rounded_total',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'In Words will be visible once you save the Delivery Note.',
+ 'doctype': u'DocField',
+ 'fieldname': u'in_words',
+ 'fieldtype': u'Data',
+ 'label': u'In Words',
+ 'no_copy': 0,
+ 'oldfieldname': u'in_words',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'width': u'200px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'grand_total_export',
+ 'fieldtype': u'Currency',
+ 'label': u'Grand Total (Export)',
+ 'no_copy': 0,
+ 'oldfieldname': u'grand_total_export',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 0,
+ 'reqd': 0,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'rounded_total_export',
+ 'fieldtype': u'Currency',
+ 'label': u'Rounded Total (Export)',
+ 'no_copy': 0,
+ 'oldfieldname': u'rounded_total_export',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 0,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'In Words (Export) will be visible once you save the Delivery Note.',
+ 'doctype': u'DocField',
+ 'fieldname': u'in_words_export',
+ 'fieldtype': u'Data',
+ 'label': u'In Words (Export)',
+ 'no_copy': 0,
+ 'oldfieldname': u'in_words_export',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Terms',
+ 'oldfieldtype': u'Section Break',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'tc_name',
+ 'fieldtype': u'Link',
+ 'label': u'Select Terms',
+ 'oldfieldname': u'tc_name',
+ 'oldfieldtype': u'Link',
+ 'options': u'Term',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Terms',
+ 'oldfieldtype': u'Button',
+ 'options': u'get_tc_details',
+ 'permlevel': 0,
+ 'trigger': u'Server'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Terms HTML',
+ 'oldfieldtype': u'HTML',
+ 'options': u'You can add Terms and Notes that will be printed in the Transaction',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'terms',
+ 'fieldtype': u'Text Editor',
+ 'label': u'Term Details',
+ 'oldfieldname': u'terms',
+ 'oldfieldtype': u'Text Editor',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Transporter Info',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'transporter_name',
+ 'fieldtype': u'Data',
+ 'label': u'Transporter Name',
+ 'no_copy': 0,
+ 'oldfieldname': u'transporter_name',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 0,
+ 'trigger': u'Client',
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Transporter lorry number',
+ 'doctype': u'DocField',
+ 'fieldname': u'lr_no',
+ 'fieldtype': u'Data',
+ 'label': u'LR No',
+ 'no_copy': 0,
+ 'oldfieldname': u'lr_no',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 0,
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'default': u'Today',
+ 'description': u'Date on which lorry started from your warehouse',
+ 'doctype': u'DocField',
+ 'fieldname': u'lr_date',
+ 'fieldtype': u'Date',
+ 'label': u'LR Date',
+ 'no_copy': 0,
+ 'oldfieldname': u'lr_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'challan_no',
+ 'fieldtype': u'Data',
+ 'label': u'Challan No',
+ 'oldfieldname': u'challan_no',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'challan_date',
+ 'fieldtype': u'Date',
+ 'label': u'Challan Date',
+ 'oldfieldname': u'challan_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Filling in Additional Information about the Delivery Note will help you analyze your data better.',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'More Info',
+ 'oldfieldtype': u'Section Break',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Select the relevant company name if you have multiple companies',
+ 'doctype': u'DocField',
+ 'fieldname': u'company',
+ 'fieldtype': u'Link',
+ 'in_filter': 1,
+ 'label': u'Company',
+ 'oldfieldname': u'company',
+ 'oldfieldtype': u'Link',
+ 'options': u'Company',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 1,
+ 'search_index': 1,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'fiscal_year',
+ 'fieldtype': u'Select',
+ 'in_filter': 1,
+ 'label': u'Fiscal Year',
+ 'oldfieldname': u'fiscal_year',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Fiscal Year',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 1,
+ 'search_index': 1,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Track this Delivery Note against any Project',
+ 'doctype': u'DocField',
+ 'fieldname': u'project_name',
+ 'fieldtype': u'Link',
+ 'in_filter': 1,
+ 'label': u'Project Name',
+ 'oldfieldname': u'project_name',
+ 'oldfieldtype': u'Link',
+ 'options': u'Project',
+ 'permlevel': 0,
+ 'search_index': 1,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'billing_status',
+ 'fieldtype': u'Select',
+ 'hidden': 1,
+ 'label': u'Billing Status',
+ 'no_copy': 1,
+ 'options': u'\nNot Billed\nPartly Billed\nFully Billed',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'installation_status',
+ 'fieldtype': u'Select',
+ 'hidden': 1,
+ 'label': u'Installation Status',
+ 'permlevel': 0,
'print_hide': 1
},
# DocField
{
'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'label': 'Repair Delivery Note',
- 'oldfieldtype': 'Button',
- 'options': 'repair_delivery_note',
+ 'doctype': u'DocField',
+ 'fieldname': u'letter_head',
+ 'fieldtype': u'Select',
+ 'label': u'Letter Head',
+ 'oldfieldname': u'letter_head',
+ 'oldfieldtype': u'Link',
+ 'options': u'link:Letter Head',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'source',
+ 'fieldtype': u'Select',
+ 'label': u'Source',
+ 'oldfieldname': u'source',
+ 'oldfieldtype': u'Select',
+ 'options': u"\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign",
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'depends_on': u"eval:doc.source == 'Campaign'",
+ 'doctype': u'DocField',
+ 'fieldname': u'campaign',
+ 'fieldtype': u'Link',
+ 'label': u'Campaign',
+ 'oldfieldname': u'campaign',
+ 'oldfieldtype': u'Link',
+ 'options': u'Campaign',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'allow_on_submit': 1,
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'select_print_heading',
+ 'fieldtype': u'Link',
+ 'label': u'Select Print Heading',
+ 'no_copy': 1,
+ 'oldfieldname': u'select_print_heading',
+ 'oldfieldtype': u'Link',
+ 'options': u'Print Heading',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'report_hide': 1,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'allow_on_submit': 1,
+ 'doctype': u'DocField',
+ 'fieldname': u'print_without_amount',
+ 'fieldtype': u'Check',
+ 'label': u'Print Without Amount',
+ 'oldfieldname': u'print_without_amount',
+ 'oldfieldtype': u'Check',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Required only for sample item.',
+ 'doctype': u'DocField',
+ 'fieldname': u'to_warehouse',
+ 'fieldtype': u'Link',
+ 'hidden': 0,
+ 'label': u'To Warehouse',
+ 'no_copy': 1,
+ 'oldfieldname': u'to_warehouse',
+ 'oldfieldtype': u'Link',
+ 'options': u'Warehouse',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'instructions',
+ 'fieldtype': u'Text',
+ 'label': u'Instructions',
+ 'oldfieldname': u'instructions',
+ 'oldfieldtype': u'Text',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'doctype': u'DocField',
+ 'fieldname': u'cancel_reason',
+ 'fieldtype': u'Data',
+ 'hidden': 0,
+ 'label': u'Cancel Reason',
+ 'no_copy': 1,
+ 'oldfieldname': u'cancel_reason',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'excise_page',
+ 'fieldtype': u'Data',
+ 'hidden': 1,
+ 'label': u'Excise Page Number',
+ 'oldfieldname': u'excise_page',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Packing List',
+ 'oldfieldtype': u'Section Break',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'packing_details',
+ 'fieldtype': u'Table',
+ 'label': u'Packing Details',
+ 'oldfieldname': u'packing_details',
+ 'oldfieldtype': u'Table',
+ 'options': u'Delivery Note Packing Detail',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Sales Team',
+ 'oldfieldtype': u'Section Break',
+ 'permlevel': 0,
+ 'print_hide': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'sales_partner',
+ 'fieldtype': u'Link',
+ 'label': u'Sales Partner',
+ 'no_copy': 0,
+ 'oldfieldname': u'sales_partner',
+ 'oldfieldtype': u'Link',
+ 'options': u'Sales Partner',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'trigger': u'Client',
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'commission_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Commission Rate (%)',
+ 'no_copy': 0,
+ 'oldfieldname': u'commission_rate',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'trigger': u'Client',
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'total_commission',
+ 'fieldtype': u'Currency',
+ 'label': u'Total Commission',
+ 'no_copy': 0,
+ 'oldfieldname': u'total_commission',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'options': u'Simple',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'sales_team',
+ 'fieldtype': u'Table',
+ 'label': u'Sales Team1',
+ 'oldfieldname': u'sales_team',
+ 'oldfieldtype': u'Table',
+ 'options': u'Sales Team',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'allow_on_submit': 1,
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Repair Delivery Note',
+ 'oldfieldtype': u'Button',
+ 'options': u'repair_delivery_note',
'permlevel': 0,
'print_hide': 1
}
diff --git a/erpnext/stock/doctype/delivery_note_detail/delivery_note_detail.txt b/erpnext/stock/doctype/delivery_note_detail/delivery_note_detail.txt
index a10d1d6..78fea52 100644
--- a/erpnext/stock/doctype/delivery_note_detail/delivery_note_detail.txt
+++ b/erpnext/stock/doctype/delivery_note_detail/delivery_note_detail.txt
@@ -5,403 +5,419 @@
{
'creation': '2010-08-08 17:08:58',
'docstatus': 0,
- 'modified': '2012-02-01 16:08:06',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-24 11:33:58',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocType
{
- '_last_update': '1311621379',
- 'autoname': 'DND/.#######',
- 'colour': 'White:FFF',
- 'default_print_format': 'Standard',
+ '_last_update': u'1311621379',
+ 'autoname': u'DND/.#######',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
'istable': 1,
- 'module': 'Stock',
+ 'module': u'Stock',
'name': '__common__',
- 'section_style': 'Tray',
- 'server_code_error': ' ',
+ 'section_style': u'Tray',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'version': 51
+ 'version': 53
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Delivery Note Detail',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'Delivery Note Detail',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# DocType, Delivery Note Detail
{
'doctype': 'DocType',
- 'name': 'Delivery Note Detail'
+ 'name': u'Delivery Note Detail'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_code',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_code',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Item Code',
- 'oldfieldname': 'item_code',
- 'oldfieldtype': 'Link',
- 'options': 'Item',
+ 'label': u'Item Code',
+ 'oldfieldname': u'item_code',
+ 'oldfieldtype': u'Link',
+ 'options': u'Item',
'permlevel': 0,
'reqd': 1,
'search_index': 1,
- 'trigger': 'Client',
- 'width': '150px'
+ 'trigger': u'Client',
+ 'width': u'150px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'item_name',
- 'fieldtype': 'Data',
- 'label': 'Item Name',
- 'oldfieldname': 'item_name',
- 'oldfieldtype': 'Data',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_name',
+ 'fieldtype': u'Data',
+ 'label': u'Item Name',
+ 'oldfieldname': u'item_name',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'description',
- 'fieldtype': 'Small Text',
- 'label': 'Description',
- 'oldfieldname': 'description',
- 'oldfieldtype': 'Small Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'description',
+ 'fieldtype': u'Small Text',
+ 'label': u'Description',
+ 'oldfieldname': u'description',
+ 'oldfieldtype': u'Small Text',
'permlevel': 0,
'reqd': 1,
- 'width': '300px'
+ 'width': u'300px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'qty',
- 'fieldtype': 'Currency',
- 'label': 'Quantity',
- 'oldfieldname': 'qty',
- 'oldfieldtype': 'Currency',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'qty',
+ 'fieldtype': u'Currency',
+ 'label': u'Quantity',
+ 'oldfieldname': u'qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'stock_uom',
- 'fieldtype': 'Data',
- 'label': 'UOM',
- 'oldfieldname': 'stock_uom',
- 'oldfieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'stock_uom',
+ 'fieldtype': u'Data',
+ 'label': u'UOM',
+ 'oldfieldname': u'stock_uom',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 0,
'reqd': 1,
- 'width': '50px'
+ 'width': u'50px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'ref_rate',
- 'fieldtype': 'Currency',
- 'label': 'Ref Rate',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'ref_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Price List Rate',
'no_copy': 0,
- 'oldfieldname': 'ref_rate',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'ref_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'adj_rate',
- 'fieldtype': 'Float',
- 'label': 'Discount (%)',
- 'oldfieldname': 'adj_rate',
- 'oldfieldtype': 'Float',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'adj_rate',
+ 'fieldtype': u'Float',
+ 'label': u'Discount (%)',
+ 'oldfieldname': u'adj_rate',
+ 'oldfieldtype': u'Float',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'export_rate',
- 'fieldtype': 'Currency',
- 'label': 'Rate',
- 'oldfieldname': 'export_rate',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'export_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Rate',
+ 'oldfieldname': u'export_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 0,
'reqd': 0,
- 'trigger': 'Client',
- 'width': '150px'
+ 'trigger': u'Client',
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'export_amount',
- 'fieldtype': 'Currency',
- 'label': 'Amount',
- 'oldfieldname': 'export_amount',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'export_amount',
+ 'fieldtype': u'Currency',
+ 'label': u'Amount',
+ 'oldfieldname': u'export_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'base_ref_rate',
- 'fieldtype': 'Currency',
- 'label': 'Ref Rate*',
- 'oldfieldname': 'base_ref_rate',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'base_ref_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Price List Rate*',
+ 'oldfieldname': u'base_ref_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'basic_rate',
- 'fieldtype': 'Currency',
- 'label': 'Rate*',
- 'oldfieldname': 'basic_rate',
- 'oldfieldtype': 'Currency',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'basic_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Rate*',
+ 'oldfieldname': u'basic_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
- 'trigger': 'Client',
- 'width': '150px'
+ 'trigger': u'Client',
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'amount',
- 'fieldtype': 'Currency',
- 'label': 'Amount*',
- 'oldfieldname': 'amount',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'amount',
+ 'fieldtype': u'Currency',
+ 'label': u'Amount*',
+ 'oldfieldname': u'amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 0,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'warehouse',
- 'fieldtype': 'Link',
- 'label': 'Warehouse',
- 'oldfieldname': 'warehouse',
- 'oldfieldtype': 'Link',
- 'options': 'Warehouse',
+ 'doctype': u'DocField',
+ 'fieldname': u'warehouse',
+ 'fieldtype': u'Link',
+ 'label': u'Warehouse',
+ 'oldfieldname': u'warehouse',
+ 'oldfieldtype': u'Link',
+ 'options': u'Warehouse',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'serial_no',
- 'fieldtype': 'Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'serial_no',
+ 'fieldtype': u'Text',
'in_filter': 1,
- 'label': 'Serial No',
+ 'label': u'Serial No',
'no_copy': 1,
- 'oldfieldname': 'serial_no',
- 'oldfieldtype': 'Text',
+ 'oldfieldname': u'serial_no',
+ 'oldfieldtype': u'Text',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'batch_no',
- 'fieldtype': 'Link',
- 'label': 'Batch No',
- 'oldfieldname': 'batch_no',
- 'oldfieldtype': 'Link',
- 'options': 'Batch',
+ 'doctype': u'DocField',
+ 'fieldname': u'batch_no',
+ 'fieldtype': u'Link',
+ 'label': u'Batch No',
+ 'oldfieldname': u'batch_no',
+ 'oldfieldtype': u'Link',
+ 'options': u'Batch',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_group',
- 'fieldtype': 'Link',
- 'label': 'Item Group',
- 'oldfieldname': 'item_group',
- 'oldfieldtype': 'Link',
- 'options': 'Item Group',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_group',
+ 'fieldtype': u'Link',
+ 'hidden': 1,
+ 'label': u'Item Group',
+ 'oldfieldname': u'item_group',
+ 'oldfieldtype': u'Link',
+ 'options': u'Item Group',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'brand',
- 'fieldtype': 'Link',
- 'label': 'Brand Name',
- 'oldfieldname': 'brand',
- 'oldfieldtype': 'Link',
- 'options': 'Brand',
+ 'doctype': u'DocField',
+ 'fieldname': u'brand',
+ 'fieldtype': u'Link',
+ 'hidden': 1,
+ 'label': u'Brand Name',
+ 'oldfieldname': u'brand',
+ 'oldfieldtype': u'Link',
+ 'options': u'Brand',
'permlevel': 1,
'print_hide': 1,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'installed_qty',
- 'fieldtype': 'Currency',
- 'label': 'Installed Qty',
+ 'doctype': u'DocField',
+ 'fieldname': u'actual_qty',
+ 'fieldtype': u'Currency',
+ 'label': u'Available Qty at Warehouse',
'no_copy': 1,
- 'oldfieldname': 'installed_qty',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'actual_qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'actual_qty',
- 'fieldtype': 'Currency',
- 'label': 'Available Qty at Warehouse',
- 'no_copy': 1,
- 'oldfieldname': 'actual_qty',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1,
- 'width': '150px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'billed_amt',
- 'fieldtype': 'Currency',
- 'label': 'Billed Amt',
+ 'doctype': u'DocField',
+ 'fieldname': u'billed_amt',
+ 'fieldtype': u'Currency',
+ 'label': u'Billed Amt',
'no_copy': 1,
'permlevel': 1,
'print_hide': 1,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'prevdoc_docname',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'installed_qty',
+ 'fieldtype': u'Currency',
+ 'label': u'Installed Qty',
+ 'no_copy': 1,
+ 'oldfieldname': u'installed_qty',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'allow_on_submit': 1,
+ 'colour': u'White:FFF',
+ 'default': u'0',
+ 'doctype': u'DocField',
+ 'fieldname': u'packed_qty',
+ 'fieldtype': u'Currency',
+ 'label': u'Packed Quantity',
+ 'no_copy': 1,
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'prevdoc_doctype',
+ 'fieldtype': u'Data',
+ 'hidden': 1,
+ 'in_filter': 1,
+ 'label': u'Document Type',
+ 'oldfieldname': u'prevdoc_doctype',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'search_index': 1,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'prevdoc_docname',
+ 'fieldtype': u'Data',
'hidden': 0,
'in_filter': 1,
- 'label': 'Against Document No',
+ 'label': u'Against Document No',
'no_copy': 1,
- 'oldfieldname': 'prevdoc_docname',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'prevdoc_docname',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'prevdoc_doctype',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'prevdoc_date',
+ 'fieldtype': u'Date',
'hidden': 1,
'in_filter': 1,
- 'label': 'Document Type',
- 'oldfieldname': 'prevdoc_doctype',
- 'oldfieldtype': 'Data',
- 'permlevel': 1,
- 'print_hide': 1,
- 'search_index': 1,
- 'width': '150px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'prevdoc_date',
- 'fieldtype': 'Date',
- 'hidden': 1,
- 'in_filter': 1,
- 'label': 'Against Document Date',
- 'oldfieldname': 'prevdoc_date',
- 'oldfieldtype': 'Date',
+ 'label': u'Against Document Date',
+ 'oldfieldname': u'prevdoc_date',
+ 'oldfieldtype': u'Date',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'prevdoc_detail_docname',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'prevdoc_detail_docname',
+ 'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
- 'label': 'Against Document Detail No',
- 'oldfieldname': 'prevdoc_detail_docname',
- 'oldfieldtype': 'Data',
+ 'label': u'Against Document Detail No',
+ 'oldfieldname': u'prevdoc_detail_docname',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 0,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_tax_rate',
- 'fieldtype': 'Small Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_tax_rate',
+ 'fieldtype': u'Small Text',
'hidden': 1,
- 'label': 'Item Tax Rate',
- 'oldfieldname': 'item_tax_rate',
- 'oldfieldtype': 'Small Text',
+ 'label': u'Item Tax Rate',
+ 'oldfieldname': u'item_tax_rate',
+ 'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1
},
@@ -409,26 +425,12 @@
# DocField
{
'allow_on_submit': 1,
- 'colour': 'White:FFF',
- 'default': '0',
- 'doctype': 'DocField',
- 'fieldname': 'packed_qty',
- 'fieldtype': 'Currency',
- 'label': 'Packed Quantity',
- 'no_copy': 1,
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'page_break',
- 'fieldtype': 'Check',
- 'label': 'Page Break',
- 'oldfieldname': 'page_break',
- 'oldfieldtype': 'Check',
+ 'doctype': u'DocField',
+ 'fieldname': u'page_break',
+ 'fieldtype': u'Check',
+ 'label': u'Page Break',
+ 'oldfieldname': u'page_break',
+ 'oldfieldtype': u'Check',
'permlevel': 0,
'print_hide': 1
}
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 691e259..59235ab 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.refresh = function(doc) {
// make sensitive fields(has_serial_no, is_stock_item, valuation_method)
// read only if any stock ledger entry exists
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index 4dca704..64cb0c9 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/stock/doctype/item/test_item.py b/erpnext/stock/doctype/item/test_item.py
index 529c82a..43ace79 100644
--- a/erpnext/stock/doctype/item/test_item.py
+++ b/erpnext/stock/doctype/item/test_item.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import unittest
import webnotes
import copy
diff --git a/erpnext/stock/doctype/landed_cost_master/landed_cost_master.js b/erpnext/stock/doctype/landed_cost_master/landed_cost_master.js
index 6ffef4a..3cad944 100644
--- a/erpnext/stock/doctype/landed_cost_master/landed_cost_master.js
+++ b/erpnext/stock/doctype/landed_cost_master/landed_cost_master.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
diff --git a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js
index 369fd4d..eb0c3df 100644
--- a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js
+++ b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(!doc.currency){doc.currency = sys_defaults.currency;}
}
diff --git a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
index ea63d04..2468247 100644
--- a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
+++ b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import cint, cstr, flt
from webnotes.model.doc import addchild, getchildren
diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.js b/erpnext/stock/doctype/packing_slip/packing_slip.js
index 7359ffa..d3f4fb4 100644
--- a/erpnext/stock/doctype/packing_slip/packing_slip.js
+++ b/erpnext/stock/doctype/packing_slip/packing_slip.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.fields_dict['delivery_note'].get_query = function(doc, cdt, cdn) {
return 'SELECT name FROM `tabDelivery Note` WHERE docstatus=0 AND %(key)s LIKE "%s"';
}
diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.py b/erpnext/stock/doctype/packing_slip/packing_slip.py
index 23367c7..90a1d71 100644
--- a/erpnext/stock/doctype/packing_slip/packing_slip.py
+++ b/erpnext/stock/doctype/packing_slip/packing_slip.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import flt, cint
diff --git a/erpnext/stock/doctype/packing_slip_detail/packing_slip_detail.py b/erpnext/stock/doctype/packing_slip_detail/packing_slip_detail.py
index 05f502c..2b48ed0 100644
--- a/erpnext/stock/doctype/packing_slip_detail/packing_slip_detail.py
+++ b/erpnext/stock/doctype/packing_slip_detail/packing_slip_detail.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
class DocType:
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
index 272f304..7ad9d91 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.tname = "Purchase Receipt Detail";
cur_frm.cscript.fname = "purchase_receipt_details";
cur_frm.cscript.other_fname = "purchase_tax_details";
@@ -24,12 +40,15 @@
cur_frm.cscript.onload_post_render = function(doc, dt, dn) {
var callback = function(doc, dt, dn) {
- if(doc.__islocal){
- cur_frm.cscript.get_default_schedule_date(doc);
+ var callback1 = function(doc, dt, dn) {
+ if(doc.__islocal){
+ cur_frm.cscript.get_default_schedule_date(doc);
+ }
}
+ // defined in purchase_common.js
+ cur_frm.cscript.update_item_details(doc, dt, dn, callback1);
}
- // defined in purchase_common.js
- cur_frm.cscript.update_item_details(doc, cdt, cdn, callback);
+ cur_frm.cscript.dynamic_label(doc, dt, dn, callback);
}
//========================== Refresh ===============================================================
@@ -38,6 +57,10 @@
// Unhide Fields in Next Steps
// ---------------------------------
cur_frm.clear_custom_buttons();
+
+ if (!cur_frm.cscript.is_onload) cur_frm.cscript.dynamic_label(doc, cdt, cdn);
+
+
if(doc.docstatus == 1){
var ch = getchildren('Purchase Receipt Detail',doc.name,'purchase_receipt_details');
allow_billing = 0;
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
index ccc4201..f3e5d77 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
@@ -72,6 +88,7 @@
def get_tc_details(self):
return get_obj('Purchase Common').get_tc_details(self)
+
# get available qty at warehouse
def get_bin_details(self, arg = ''):
return get_obj(dt='Purchase Common').get_bin_details(arg)
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
index 31f6cd6..2666f08 100755
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.txt
@@ -5,52 +5,53 @@
{
'creation': '2010-08-08 17:09:15',
'docstatus': 0,
- 'modified': '2011-05-17 16:33:17',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-27 17:54:59',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocType
{
- '_last_update': '1305630198',
- 'colour': 'White:FFF',
+ '_last_update': u'1330345245',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
- 'document_type': 'Transaction',
+ 'document_type': u'Transaction',
'is_transaction_doc': 1,
- 'module': 'Stock',
+ 'module': u'Stock',
'name': '__common__',
'read_only_onload': 1,
- 'search_fields': 'status, transaction_date, supplier',
- 'section_style': 'Tabbed',
- 'server_code_error': ' ',
+ 'search_fields': u'status, transaction_date, supplier',
+ 'section_style': u'Tabbed',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'subject': 'From %(supplier_name)s against %(purchase_order)s on %(transaction_date)s',
- 'version': 318
+ 'subject': u'From %(supplier_name)s against %(purchase_order)s on %(transaction_date)s',
+ 'version': 324
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Purchase Receipt',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'Purchase Receipt',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# These values are common for all DocPerm
{
- 'doctype': 'DocPerm',
+ 'doctype': u'DocPerm',
'name': '__common__',
- 'parent': 'Purchase Receipt',
- 'parentfield': 'permissions',
- 'parenttype': 'DocType',
+ 'parent': u'Purchase Receipt',
+ 'parentfield': u'permissions',
+ 'parenttype': u'DocType',
'read': 1
},
# DocType, Purchase Receipt
{
'doctype': 'DocType',
- 'name': 'Purchase Receipt'
+ 'name': u'Purchase Receipt'
},
# DocPerm
@@ -58,10 +59,9 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
- 'idx': 1,
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Material Manager',
+ 'role': u'Material Manager',
'submit': 0,
'write': 0
},
@@ -71,10 +71,9 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
- 'idx': 2,
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Material Manager',
+ 'role': u'Material Manager',
'submit': 1,
'write': 1
},
@@ -84,10 +83,9 @@
'amend': 0,
'cancel': 0,
'create': 0,
- 'doctype': 'DocPerm',
- 'idx': 3,
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Material User',
+ 'role': u'Material User',
'submit': 0,
'write': 0
},
@@ -97,10 +95,9 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
- 'idx': 4,
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Material User',
+ 'role': u'Material User',
'submit': 1,
'write': 1
},
@@ -110,75 +107,68 @@
'amend': 1,
'cancel': 1,
'create': 1,
- 'doctype': 'DocPerm',
- 'idx': 5,
+ 'doctype': u'DocPerm',
'permlevel': 0,
- 'role': 'Purchase User',
+ 'role': u'Purchase User',
'submit': 1,
'write': 1
},
# DocPerm
{
- 'doctype': 'DocPerm',
- 'idx': 6,
+ 'doctype': u'DocPerm',
'permlevel': 1,
- 'role': 'Purchase User'
+ 'role': u'Purchase User'
},
# DocPerm
{
- 'doctype': 'DocPerm',
- 'idx': 7,
- 'match': 'supplier',
+ 'doctype': u'DocPerm',
+ 'match': u'supplier',
'permlevel': 0,
- 'role': 'Supplier'
+ 'role': u'Supplier'
},
# DocPerm
{
- 'doctype': 'DocPerm',
- 'idx': 8,
+ 'doctype': u'DocPerm',
'permlevel': 2,
- 'role': 'All',
+ 'role': u'All',
'write': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Enter Basic Information about the Purchase Receipt',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 1,
- 'label': 'Basic Info',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Enter Basic Information about the Purchase Receipt',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Basic Info',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'idx': 2,
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'To manage multiple series please go to Setup > Manage Series',
- 'doctype': 'DocField',
- 'fieldname': 'naming_series',
- 'fieldtype': 'Select',
- 'idx': 3,
- 'label': 'Series',
+ 'colour': u'White:FFF',
+ 'description': u'To manage multiple series please go to Setup > Manage Series',
+ 'doctype': u'DocField',
+ 'fieldname': u'naming_series',
+ 'fieldtype': u'Select',
+ 'label': u'Series',
'no_copy': 1,
- 'oldfieldname': 'naming_series',
- 'oldfieldtype': 'Select',
- 'options': '\nGRN',
+ 'oldfieldname': u'naming_series',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nGRN',
'permlevel': 0,
'print_hide': 1,
'reqd': 1
@@ -187,391 +177,300 @@
# DocField
{
'allow_on_submit': 0,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'supplier',
- 'fieldtype': 'Link',
- 'idx': 4,
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'supplier',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Supplier',
- 'oldfieldname': 'supplier',
- 'oldfieldtype': 'Link',
- 'options': 'Supplier',
+ 'label': u'Supplier',
+ 'oldfieldname': u'supplier',
+ 'oldfieldtype': u'Link',
+ 'options': u'Supplier',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 1,
- 'trigger': 'Client',
- 'width': '150px'
+ 'trigger': u'Client',
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'supplier_address',
- 'fieldtype': 'Link',
- 'idx': 5,
- 'label': 'Supplier Address',
- 'options': 'Address',
+ 'doctype': u'DocField',
+ 'fieldname': u'supplier_address',
+ 'fieldtype': u'Link',
+ 'label': u'Supplier Address',
+ 'options': u'Address',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_person',
- 'fieldtype': 'Link',
- 'idx': 6,
- 'label': 'Contact Person',
- 'options': 'Contact',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_person',
+ 'fieldtype': u'Link',
+ 'label': u'Contact Person',
+ 'options': u'Contact',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'supplier_name',
- 'fieldtype': 'Data',
- 'idx': 7,
- 'label': 'Name',
+ 'doctype': u'DocField',
+ 'fieldname': u'supplier_name',
+ 'fieldtype': u'Data',
+ 'label': u'Name',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'address_display',
- 'fieldtype': 'Small Text',
- 'idx': 8,
- 'label': 'Address',
+ 'doctype': u'DocField',
+ 'fieldname': u'address_display',
+ 'fieldtype': u'Small Text',
+ 'label': u'Address',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_display',
- 'fieldtype': 'Small Text',
- 'idx': 9,
- 'label': 'Contact',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_display',
+ 'fieldtype': u'Small Text',
+ 'label': u'Contact',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_mobile',
- 'fieldtype': 'Text',
- 'idx': 10,
- 'label': 'Mobile No',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_mobile',
+ 'fieldtype': u'Text',
+ 'label': u'Mobile No',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'contact_email',
- 'fieldtype': 'Text',
- 'idx': 11,
- 'label': 'Contact Email',
+ 'doctype': u'DocField',
+ 'fieldname': u'contact_email',
+ 'fieldtype': u'Text',
+ 'label': u'Contact Email',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'amended_from',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'amended_from',
+ 'fieldtype': u'Data',
'hidden': 1,
- 'idx': 12,
- 'label': 'Amended From',
+ 'label': u'Amended From',
'no_copy': 1,
- 'oldfieldname': 'amended_from',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'amended_from',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'description': 'The date at which current entry is corrected in the system.',
- 'doctype': 'DocField',
- 'fieldname': 'amendment_date',
- 'fieldtype': 'Date',
+ 'description': u'The date at which current entry is corrected in the system.',
+ 'doctype': u'DocField',
+ 'fieldname': u'amendment_date',
+ 'fieldtype': u'Date',
'hidden': 1,
- 'idx': 13,
- 'label': 'Amendment Date',
+ 'label': u'Amendment Date',
'no_copy': 1,
- 'oldfieldname': 'amendment_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'amendment_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'idx': 14,
- 'oldfieldtype': 'Column Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
- 'width': '50%'
+ 'width': u'50%'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'The date at which current entry is made in system.',
- 'doctype': 'DocField',
- 'fieldname': 'transaction_date',
- 'fieldtype': 'Date',
- 'idx': 15,
+ 'colour': u'White:FFF',
+ 'description': u'The date at which current entry is made in system.',
+ 'doctype': u'DocField',
+ 'fieldname': u'transaction_date',
+ 'fieldtype': u'Date',
'in_filter': 1,
- 'label': 'Transaction Date',
+ 'label': u'Transaction Date',
'no_copy': 1,
- 'oldfieldname': 'transaction_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'transaction_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'reqd': 1,
- 'search_index': 0,
- 'trigger': 'Client',
- 'width': '100px'
+ 'search_index': 1,
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'status',
- 'fieldtype': 'Select',
- 'idx': 16,
+ 'colour': u'White:FFF',
+ 'description': u'The date at which current entry will get or has actually executed.',
+ 'doctype': u'DocField',
+ 'fieldname': u'posting_date',
+ 'fieldtype': u'Date',
'in_filter': 1,
- 'label': 'Status',
+ 'label': u'Posting Date',
'no_copy': 1,
- 'oldfieldname': 'status',
- 'oldfieldtype': 'Select',
- 'options': '\nDraft\nSubmitted\nCancelled',
- 'permlevel': 1,
+ 'oldfieldname': u'posting_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'reqd': 1,
+ 'search_index': 1,
+ 'width': u'100px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Time at which materials were received',
+ 'doctype': u'DocField',
+ 'fieldname': u'posting_time',
+ 'fieldtype': u'Time',
+ 'in_filter': 0,
+ 'label': u'Posting Time',
+ 'no_copy': 1,
+ 'oldfieldname': u'posting_time',
+ 'oldfieldtype': u'Time',
+ 'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 0,
- 'width': '150px'
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': '% of materials billed against this Purchase Receipt',
- 'doctype': 'DocField',
- 'fieldname': 'per_billed',
- 'fieldtype': 'Currency',
- 'idx': 17,
- 'label': '% Billed',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'status',
+ 'fieldtype': u'Select',
+ 'in_filter': 1,
+ 'label': u'Status',
'no_copy': 1,
- 'oldfieldname': 'per_billed',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'status',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nDraft\nSubmitted\nCancelled',
+ 'permlevel': 1,
+ 'print_hide': 1,
+ 'reqd': 1,
+ 'search_index': 1,
+ 'width': u'150px'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'description': u'% of materials billed against this Purchase Receipt',
+ 'doctype': u'DocField',
+ 'fieldname': u'per_billed',
+ 'fieldtype': u'Currency',
+ 'label': u'% Billed',
+ 'no_copy': 1,
+ 'oldfieldname': u'per_billed',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'bill_no',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'bill_no',
+ 'fieldtype': u'Data',
'hidden': 1,
- 'idx': 18,
- 'label': 'Bill No',
- 'oldfieldname': 'bill_no',
- 'oldfieldtype': 'Data',
+ 'label': u'Bill No',
+ 'oldfieldname': u'bill_no',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'bill_date',
- 'fieldtype': 'Date',
+ 'doctype': u'DocField',
+ 'fieldname': u'bill_date',
+ 'fieldtype': u'Date',
'hidden': 1,
- 'idx': 19,
- 'label': 'Bill Date',
- 'oldfieldname': 'bill_date',
- 'oldfieldtype': 'Date',
+ 'label': u'Bill Date',
+ 'oldfieldname': u'bill_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'range',
- 'fieldtype': 'Data',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'range',
+ 'fieldtype': u'Data',
'hidden': 1,
- 'idx': 20,
- 'label': 'Range',
- 'oldfieldname': 'range',
- 'oldfieldtype': 'Data',
+ 'label': u'Range',
+ 'oldfieldname': u'range',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 21,
- 'label': 'Transporter Info',
+ 'colour': u'White:FFF',
+ 'default': u'No',
+ 'description': u'Select "Yes" for sub - contracting items',
+ 'doctype': u'DocField',
+ 'fieldname': u'is_subcontracted',
+ 'fieldtype': u'Select',
+ 'label': u'Is Subcontracted',
+ 'oldfieldname': u'is_subcontracted',
+ 'oldfieldtype': u'Select',
+ 'options': u'\nYes\nNo',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Items',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'transporter_name',
- 'fieldtype': 'Data',
- 'idx': 22,
- 'label': 'Transporter Name',
- 'oldfieldname': 'transporter_name',
- 'oldfieldtype': 'Data',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Transporter lorry number',
- 'doctype': 'DocField',
- 'fieldname': 'lr_no',
- 'fieldtype': 'Data',
- 'idx': 23,
- 'label': 'LR No',
- 'no_copy': 1,
- 'oldfieldname': 'lr_no',
- 'oldfieldtype': 'Data',
- 'permlevel': 0,
- 'print_hide': 0,
- 'width': '100px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Date on which lorry started from supplier warehouse',
- 'doctype': 'DocField',
- 'fieldname': 'lr_date',
- 'fieldtype': 'Date',
- 'idx': 24,
- 'label': 'LR Date',
- 'no_copy': 1,
- 'oldfieldname': 'lr_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 0,
- 'print_hide': 0,
- 'width': '100px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'idx': 25,
- 'permlevel': 0,
- 'width': '50%'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'challan_no',
- 'fieldtype': 'Data',
- 'idx': 26,
- 'label': 'Challan No',
- 'no_copy': 1,
- 'oldfieldname': 'challan_no',
- 'oldfieldtype': 'Data',
- 'permlevel': 0,
- 'print_hide': 0,
- 'reqd': 0,
- 'width': '100px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'challan_date',
- 'fieldtype': 'Date',
- 'idx': 27,
- 'label': 'Challan Date',
- 'no_copy': 1,
- 'oldfieldname': 'challan_date',
- 'oldfieldtype': 'Date',
- 'permlevel': 0,
- 'print_hide': 0,
- 'reqd': 0,
- 'width': '100px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 28,
- 'label': 'Items',
- 'oldfieldtype': 'Section Break',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'You can make a purchase receipt from multiple purchase orders. Select purchase orders one by one and click on the button below.',
- 'doctype': 'DocField',
- 'fieldname': 'purchase_order_no',
- 'fieldtype': 'Link',
- 'idx': 29,
- 'label': 'Purchase Order',
- 'no_copy': 1,
- 'oldfieldname': 'purchase_order_no',
- 'oldfieldtype': 'Link',
- 'options': 'Purchase Order',
- 'permlevel': 0,
- 'print_hide': 0
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'idx': 30,
- 'label': 'Pull Purchase Order Details',
- 'oldfieldtype': 'Button',
- 'options': 'get_po_details',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': "Supplier's currency",
- 'doctype': 'DocField',
- 'fieldname': 'currency',
- 'fieldtype': 'Select',
- 'idx': 31,
- 'label': 'Currency',
- 'oldfieldname': 'currency',
- 'oldfieldtype': 'Select',
- 'options': 'link:Currency',
+ 'colour': u'White:FFF',
+ 'description': u"Supplier's currency",
+ 'doctype': u'DocField',
+ 'fieldname': u'currency',
+ 'fieldtype': u'Select',
+ 'label': u'Currency',
+ 'oldfieldname': u'currency',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1
@@ -579,60 +478,33 @@
# DocField
{
- 'colour': 'White:FFF',
- 'default': '1.00',
- 'description': "Rate at which supplier's currency is converted to your currency",
- 'doctype': 'DocField',
- 'fieldname': 'conversion_rate',
- 'fieldtype': 'Currency',
- 'idx': 32,
- 'label': 'Conversion Rate',
- 'oldfieldname': 'conversion_rate',
- 'oldfieldtype': 'Currency',
+ 'colour': u'White:FFF',
+ 'default': u'1.00',
+ 'description': u"Rate at which supplier's currency is converted to company's base currency",
+ 'doctype': u'DocField',
+ 'fieldname': u'conversion_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Conversion Rate',
+ 'oldfieldname': u'conversion_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'idx': 33,
- 'oldfieldtype': 'Column Break',
- 'permlevel': 0
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Select "Yes" for sub - contracting items',
- 'doctype': 'DocField',
- 'fieldname': 'is_subcontracted',
- 'fieldtype': 'Select',
- 'idx': 34,
- 'label': 'Is Subcontracted',
- 'oldfieldname': 'is_subcontracted',
- 'oldfieldtype': 'Select',
- 'options': '\nYes\nNo',
- 'permlevel': 0,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Warehouse where you are maintaining stock of rejected items',
- 'doctype': 'DocField',
- 'fieldname': 'rejected_warehouse',
- 'fieldtype': 'Link',
- 'idx': 35,
- 'label': 'Rejected Warehouse',
+ 'colour': u'White:FFF',
+ 'description': u'Warehouse where you are maintaining stock of rejected items',
+ 'doctype': u'DocField',
+ 'fieldname': u'rejected_warehouse',
+ 'fieldtype': u'Link',
+ 'label': u'Rejected Warehouse',
'no_copy': 1,
- 'oldfieldname': 'rejected_warehouse',
- 'oldfieldtype': 'Link',
- 'options': 'Warehouse',
+ 'oldfieldname': u'rejected_warehouse',
+ 'oldfieldtype': u'Link',
+ 'options': u'Warehouse',
'permlevel': 0,
'print_hide': 1,
'reqd': 0
@@ -640,43 +512,77 @@
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Supplier warehouse where you have issued raw materials for sub - contracting',
- 'doctype': 'DocField',
- 'fieldname': 'supplier_warehouse',
- 'fieldtype': 'Link',
- 'idx': 36,
- 'label': 'Supplier Warehouse',
+ 'colour': u'White:FFF',
+ 'description': u'Supplier warehouse where you have issued raw materials for sub - contracting',
+ 'doctype': u'DocField',
+ 'fieldname': u'supplier_warehouse',
+ 'fieldtype': u'Link',
+ 'label': u'Supplier Warehouse',
'no_copy': 1,
- 'oldfieldname': 'supplier_warehouse',
- 'oldfieldtype': 'Link',
- 'options': 'Warehouse',
+ 'oldfieldname': u'supplier_warehouse',
+ 'oldfieldtype': u'Link',
+ 'options': u'Warehouse',
'permlevel': 0,
'print_hide': 1,
- 'width': '50px'
+ 'width': u'50px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 37,
- 'oldfieldtype': 'Section Break',
- 'options': 'Simple',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'purchase_receipt_details',
- 'fieldtype': 'Table',
- 'idx': 38,
- 'label': 'Purchase Receipt Details',
- 'oldfieldname': 'purchase_receipt_details',
- 'oldfieldtype': 'Table',
- 'options': 'Purchase Receipt Detail',
+ 'colour': u'White:FFF',
+ 'description': u'You can make a purchase receipt from multiple purchase orders. Select purchase orders one by one and click on the button below.',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_order_no',
+ 'fieldtype': u'Link',
+ 'label': u'Purchase Order',
+ 'no_copy': 1,
+ 'oldfieldname': u'purchase_order_no',
+ 'oldfieldtype': u'Link',
+ 'options': u'Purchase Order',
+ 'permlevel': 0,
+ 'print_hide': 0
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Pull Purchase Order Details',
+ 'oldfieldtype': u'Button',
+ 'options': u'get_po_details',
+ 'permlevel': 0,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'oldfieldtype': u'Section Break',
+ 'options': u'Simple',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'allow_on_submit': 1,
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_receipt_details',
+ 'fieldtype': u'Table',
+ 'label': u'Purchase Receipt Details',
+ 'oldfieldname': u'purchase_receipt_details',
+ 'oldfieldtype': u'Table',
+ 'options': u'Purchase Receipt Detail',
'permlevel': 0,
'print_hide': 0,
'reqd': 0
@@ -684,564 +590,559 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'net_total',
- 'fieldtype': 'Currency',
- 'idx': 39,
- 'label': 'Net Total',
- 'oldfieldname': 'net_total',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'net_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Net Total',
+ 'oldfieldname': u'net_total',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 1,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'idx': 40,
- 'label': 'Re-Calculate Values',
- 'oldfieldtype': 'Button',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Re-Calculate Values',
+ 'oldfieldtype': u'Button',
'permlevel': 0,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Add / Edit taxes and other charges',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 41,
- 'label': 'Taxes',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Add / Edit taxes and other charges',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Taxes',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'If you have created a standard template in Other Charges master, select one and click on the button below.',
- 'doctype': 'DocField',
- 'fieldname': 'purchase_other_charges',
- 'fieldtype': 'Link',
- 'idx': 42,
- 'label': 'Purchase Other Charges',
- 'oldfieldname': 'purchase_other_charges',
- 'oldfieldtype': 'Link',
- 'options': 'Purchase Other Charges',
+ 'colour': u'White:FFF',
+ 'description': u'If you have created a standard template in Other Charges master, select one and click on the button below.',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_other_charges',
+ 'fieldtype': u'Link',
+ 'label': u'Purchase Other Charges',
+ 'oldfieldname': u'purchase_other_charges',
+ 'oldfieldtype': u'Link',
+ 'options': u'Purchase Other Charges',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'idx': 43,
- 'label': 'Get Tax Detail',
- 'oldfieldtype': 'Button',
- 'options': 'get_purchase_tax_details',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Tax Detail',
+ 'oldfieldtype': u'Button',
+ 'options': u'get_purchase_tax_details',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'purchase_tax_details',
- 'fieldtype': 'Table',
- 'idx': 44,
- 'label': 'Purchase Tax Details',
- 'oldfieldname': 'purchase_tax_details',
- 'oldfieldtype': 'Table',
- 'options': 'Purchase Tax Detail',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_tax_details',
+ 'fieldtype': u'Table',
+ 'label': u'Purchase Tax Details',
+ 'oldfieldname': u'purchase_tax_details',
+ 'oldfieldtype': u'Table',
+ 'options': u'Purchase Tax Detail',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'idx': 45,
- 'label': 'Calculate Tax',
- 'oldfieldtype': 'Button',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Calculate Tax',
+ 'oldfieldtype': u'Button',
'permlevel': 0,
'print_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'total_tax',
- 'fieldtype': 'Currency',
- 'idx': 46,
- 'label': 'Total Tax',
- 'oldfieldname': 'total_tax',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'total_tax',
+ 'fieldtype': u'Currency',
+ 'label': u'Total Tax',
+ 'oldfieldname': u'total_tax',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'idx': 47,
- 'label': 'Tax Calculation',
- 'oldfieldtype': 'HTML',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Tax Calculation',
+ 'oldfieldtype': u'HTML',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Add Terms and Conditions for the Purchase Receipt. You can also prepare a master Term Sheet and use the Template.',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 48,
- 'label': 'Terms',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Detailed Breakup of the totals',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Totals',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'tc_name',
- 'fieldtype': 'Link',
- 'idx': 49,
- 'label': 'Select Terms',
- 'oldfieldname': 'tc_name',
- 'oldfieldtype': 'Link',
- 'options': 'Term',
+ 'doctype': u'DocField',
+ 'fieldname': u'grand_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Grand Total',
+ 'oldfieldname': u'grand_total',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'rounded_total',
+ 'fieldtype': u'Currency',
+ 'label': u'Rounded Total',
+ 'oldfieldname': u'rounded_total',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'In Words will be visible once you save the Purchase Receipt.',
+ 'doctype': u'DocField',
+ 'fieldname': u'in_words',
+ 'fieldtype': u'Data',
+ 'label': u'In Words',
+ 'oldfieldname': u'in_words',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges_added',
+ 'fieldtype': u'Currency',
+ 'label': u'Other Charges Added',
+ 'oldfieldname': u'other_charges_added',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges_deducted',
+ 'fieldtype': u'Currency',
+ 'label': u'Other Charges Deducted',
+ 'oldfieldname': u'other_charges_deducted',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'width': u'50%'
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'net_total_import',
+ 'fieldtype': u'Currency',
+ 'label': u'Net Total (Import)',
+ 'oldfieldname': u'net_total_import',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'grand_total_import',
+ 'fieldtype': u'Currency',
+ 'label': u'Grand Total (Import)',
+ 'oldfieldname': u'grand_total_import',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'in_words_import',
+ 'fieldtype': u'Data',
+ 'label': u'In Words (Import)',
+ 'oldfieldname': u'in_words_import',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges_added_import',
+ 'fieldtype': u'Currency',
+ 'label': u'Other Charges Added (Import)',
+ 'oldfieldname': u'other_charges_added_import',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'other_charges_deducted_import',
+ 'fieldtype': u'Currency',
+ 'label': u'Other Charges Deducted (Import)',
+ 'oldfieldname': u'other_charges_deducted_import',
+ 'oldfieldtype': u'Currency',
+ 'permlevel': 1,
+ 'print_hide': 1
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'description': u'Add Terms and Conditions for the Purchase Receipt. You can also prepare a master Term Sheet and use the Template.',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Terms',
+ 'oldfieldtype': u'Section Break',
+ 'permlevel': 0
+ },
+
+ # DocField
+ {
+ 'doctype': u'DocField',
+ 'fieldname': u'tc_name',
+ 'fieldtype': u'Link',
+ 'label': u'Select Terms',
+ 'oldfieldname': u'tc_name',
+ 'oldfieldtype': u'Link',
+ 'options': u'Term',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'idx': 50,
- 'label': 'Get Terms',
- 'oldfieldtype': 'Button',
- 'options': 'get_tc_details',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Terms',
+ 'oldfieldtype': u'Button',
+ 'options': u'get_tc_details',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
- 'idx': 51,
- 'label': 'Terms HTML',
- 'oldfieldtype': 'HTML',
- 'options': 'You can add Terms and Notes that will be printed in the Transaction',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
+ 'label': u'Terms HTML',
+ 'oldfieldtype': u'HTML',
+ 'options': u'You can add Terms and Notes that will be printed in the Transaction',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'terms',
- 'fieldtype': 'Text Editor',
- 'idx': 52,
- 'label': 'Terms1',
- 'oldfieldname': 'terms',
- 'oldfieldtype': 'Text Editor',
+ 'doctype': u'DocField',
+ 'fieldname': u'terms',
+ 'fieldtype': u'Text Editor',
+ 'label': u'Terms1',
+ 'oldfieldname': u'terms',
+ 'oldfieldtype': u'Text Editor',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Filing in Additional Information about the Purchase Receipt will help you analyze your data better.',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 53,
- 'label': 'More Info',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Filing in Additional Information about the Purchase Receipt will help you analyze your data better.',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'More Info',
+ 'oldfieldtype': u'Section Break',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Select the relevant company name if you have multiple companies',
- 'doctype': 'DocField',
- 'fieldname': 'company',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'description': u'Select the relevant company name if you have multiple companies',
+ 'doctype': u'DocField',
+ 'fieldname': u'company',
+ 'fieldtype': u'Link',
'hidden': 0,
- 'idx': 54,
'in_filter': 1,
- 'label': 'Company',
+ 'label': u'Company',
'no_copy': 0,
- 'oldfieldname': 'company',
- 'oldfieldtype': 'Link',
- 'options': 'Company',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1,
- 'search_index': 0,
- 'width': '150px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'fiscal_year',
- 'fieldtype': 'Select',
- 'idx': 55,
- 'in_filter': 1,
- 'label': 'Fiscal Year',
- 'oldfieldname': 'fiscal_year',
- 'oldfieldtype': 'Select',
- 'options': 'link:Fiscal Year',
- 'permlevel': 0,
- 'print_hide': 1,
- 'reqd': 1,
- 'search_index': 0,
- 'width': '150px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'The date at which current entry will get or has actually executed.',
- 'doctype': 'DocField',
- 'fieldname': 'posting_date',
- 'fieldtype': 'Date',
- 'idx': 56,
- 'in_filter': 1,
- 'label': 'Posting Date',
- 'no_copy': 1,
- 'oldfieldname': 'posting_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'company',
+ 'oldfieldtype': u'Link',
+ 'options': u'Company',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
'search_index': 1,
- 'width': '100px'
+ 'width': u'150px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Time at which materials were received',
- 'doctype': 'DocField',
- 'fieldname': 'posting_time',
- 'fieldtype': 'Time',
- 'idx': 57,
- 'in_filter': 0,
- 'label': 'Posting Time',
- 'no_copy': 1,
- 'oldfieldname': 'posting_time',
- 'oldfieldtype': 'Time',
+ 'doctype': u'DocField',
+ 'fieldname': u'fiscal_year',
+ 'fieldtype': u'Select',
+ 'in_filter': 1,
+ 'label': u'Fiscal Year',
+ 'oldfieldname': u'fiscal_year',
+ 'oldfieldtype': u'Select',
+ 'options': u'link:Fiscal Year',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'search_index': 0,
- 'width': '100px'
+ 'search_index': 1,
+ 'width': u'150px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Track this Purchase Receipt against any Project',
- 'doctype': 'DocField',
- 'fieldname': 'project_name',
- 'fieldtype': 'Link',
- 'idx': 58,
- 'in_filter': 1,
- 'label': 'Project Name',
- 'oldfieldname': 'project_name',
- 'oldfieldtype': 'Link',
- 'options': 'Project',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'oldfieldtype': u'Column Break',
'permlevel': 0,
- 'search_index': 1
+ 'width': u'50%'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'idx': 59,
- 'oldfieldtype': 'Column Break',
- 'permlevel': 0,
- 'width': '50%'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'HTML',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'HTML',
'hidden': 1,
- 'idx': 60,
- 'label': 'Other Details',
- 'oldfieldtype': 'HTML',
- 'options': "<div class='columnHeading'>Other Details</div>",
+ 'label': u'Other Details',
+ 'oldfieldtype': u'HTML',
+ 'options': u"<div class='columnHeading'>Other Details</div>",
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
- 'width': '30%'
+ 'width': u'30%'
},
# DocField
{
'allow_on_submit': 1,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'select_print_heading',
- 'fieldtype': 'Link',
- 'idx': 61,
- 'label': 'Select Print Heading',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'select_print_heading',
+ 'fieldtype': u'Link',
+ 'label': u'Select Print Heading',
'no_copy': 1,
- 'oldfieldname': 'select_print_heading',
- 'oldfieldtype': 'Link',
- 'options': 'Print Heading',
+ 'oldfieldname': u'select_print_heading',
+ 'oldfieldtype': u'Link',
+ 'options': u'Print Heading',
'permlevel': 0,
'print_hide': 1,
'report_hide': 1,
- 'trigger': 'Client'
+ 'trigger': u'Client'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'instructions',
- 'fieldtype': 'Small Text',
- 'idx': 62,
- 'label': 'Instructions',
- 'oldfieldname': 'instructions',
- 'oldfieldtype': 'Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'instructions',
+ 'fieldtype': u'Small Text',
+ 'label': u'Instructions',
+ 'oldfieldname': u'instructions',
+ 'oldfieldtype': u'Text',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'remarks',
- 'fieldtype': 'Small Text',
- 'idx': 63,
- 'label': 'Remarks',
+ 'doctype': u'DocField',
+ 'fieldname': u'remarks',
+ 'fieldtype': u'Small Text',
+ 'label': u'Remarks',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'depends_on': 'eval:!doc.__islocal',
- 'doctype': 'DocField',
- 'fieldname': 'cancel_reason',
- 'fieldtype': 'Data',
+ 'colour': u'White:FFF',
+ 'depends_on': u'eval:!doc.__islocal',
+ 'doctype': u'DocField',
+ 'fieldname': u'cancel_reason',
+ 'fieldtype': u'Data',
'hidden': 0,
- 'idx': 64,
- 'label': 'Cancel Reason',
+ 'label': u'Cancel Reason',
'no_copy': 1,
- 'oldfieldname': 'cancel_reason',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'cancel_reason',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Detailed Breakup of the totals',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 65,
- 'label': 'Totals',
- 'oldfieldtype': 'Section Break',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Transporter Info',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'rounded_total',
- 'fieldtype': 'Currency',
- 'idx': 66,
- 'label': 'Rounded Total',
- 'oldfieldname': 'rounded_total',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1
+ 'doctype': u'DocField',
+ 'fieldname': u'transporter_name',
+ 'fieldtype': u'Data',
+ 'label': u'Transporter Name',
+ 'oldfieldname': u'transporter_name',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'grand_total',
- 'fieldtype': 'Currency',
- 'idx': 67,
- 'label': 'Grand Total',
- 'oldfieldname': 'grand_total',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'other_charges_added',
- 'fieldtype': 'Currency',
- 'idx': 68,
- 'label': 'Other Charges Added',
- 'oldfieldname': 'other_charges_added',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'other_charges_deducted',
- 'fieldtype': 'Currency',
- 'idx': 69,
- 'label': 'Other Charges Deducted',
- 'oldfieldname': 'other_charges_deducted',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'In Words will be visible once you save the Purchase Receipt.',
- 'doctype': 'DocField',
- 'fieldname': 'in_words',
- 'fieldtype': 'Data',
- 'idx': 70,
- 'label': 'In Words',
- 'oldfieldname': 'in_words',
- 'oldfieldtype': 'Data',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Column Break',
- 'idx': 71,
+ 'colour': u'White:FFF',
+ 'description': u'Transporter lorry number',
+ 'doctype': u'DocField',
+ 'fieldname': u'lr_no',
+ 'fieldtype': u'Data',
+ 'label': u'LR No',
+ 'no_copy': 1,
+ 'oldfieldname': u'lr_no',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
- 'width': '50%'
+ 'print_hide': 0,
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'net_total_import',
- 'fieldtype': 'Currency',
- 'idx': 72,
- 'label': 'Net Total (Import)',
- 'oldfieldname': 'net_total_import',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1
+ 'colour': u'White:FFF',
+ 'description': u'Date on which lorry started from supplier warehouse',
+ 'doctype': u'DocField',
+ 'fieldname': u'lr_date',
+ 'fieldtype': u'Date',
+ 'label': u'LR Date',
+ 'no_copy': 1,
+ 'oldfieldname': u'lr_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 0,
+ 'print_hide': 0,
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'grand_total_import',
- 'fieldtype': 'Currency',
- 'idx': 73,
- 'label': 'Grand Total (Import)',
- 'oldfieldname': 'grand_total_import',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1
+ 'doctype': u'DocField',
+ 'fieldtype': u'Column Break',
+ 'permlevel': 0,
+ 'width': u'50%'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'other_charges_added_import',
- 'fieldtype': 'Currency',
- 'idx': 74,
- 'label': 'Other Charges Added (Import)',
- 'oldfieldname': 'other_charges_added_import',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'challan_no',
+ 'fieldtype': u'Data',
+ 'label': u'Challan No',
+ 'no_copy': 1,
+ 'oldfieldname': u'challan_no',
+ 'oldfieldtype': u'Data',
+ 'permlevel': 0,
+ 'print_hide': 0,
+ 'reqd': 0,
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'other_charges_deducted_import',
- 'fieldtype': 'Currency',
- 'idx': 75,
- 'label': 'Other Charges Deducted (Import)',
- 'oldfieldname': 'other_charges_deducted_import',
- 'oldfieldtype': 'Currency',
- 'permlevel': 1,
- 'print_hide': 1
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'challan_date',
+ 'fieldtype': u'Date',
+ 'label': u'Challan Date',
+ 'no_copy': 1,
+ 'oldfieldname': u'challan_date',
+ 'oldfieldtype': u'Date',
+ 'permlevel': 0,
+ 'print_hide': 0,
+ 'reqd': 0,
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'In Words (Import) will be visible once you save the Purchase Receipt.',
- 'doctype': 'DocField',
- 'fieldname': 'in_words_import',
- 'fieldtype': 'Data',
- 'idx': 76,
- 'label': 'In Words (Import)',
- 'oldfieldname': 'in_words_import',
- 'oldfieldtype': 'Data',
- 'permlevel': 1,
- 'print_hide': 1
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'description': 'Following table will show values if items are sub - contracted. These values will be fetched from the master of "Bill of Materials" of sub - contracted items.',
- 'doctype': 'DocField',
- 'fieldtype': 'Section Break',
- 'idx': 77,
- 'label': 'Raw Material Details',
- 'oldfieldtype': 'Section Break',
+ 'colour': u'White:FFF',
+ 'description': u'Following table will show values if items are sub - contracted. These values will be fetched from the master of "Bill of Materials" of sub - contracted items.',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Section Break',
+ 'label': u'Raw Material Details',
+ 'oldfieldtype': u'Section Break',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'idx': 78,
- 'label': 'Get Current Stock',
- 'oldfieldtype': 'Button',
- 'options': 'get_current_stock',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Get Current Stock',
+ 'oldfieldtype': u'Button',
+ 'options': u'get_current_stock',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'pr_raw_material_details',
- 'fieldtype': 'Table',
- 'idx': 79,
- 'label': 'PR Raw Material Details',
+ 'doctype': u'DocField',
+ 'fieldname': u'pr_raw_material_details',
+ 'fieldtype': u'Table',
+ 'label': u'PR Raw Material Details',
'no_copy': 1,
- 'oldfieldname': 'pr_raw_material_details',
- 'oldfieldtype': 'Table',
- 'options': 'PR Raw Material Detail',
+ 'oldfieldname': u'pr_raw_material_details',
+ 'oldfieldtype': u'Table',
+ 'options': u'PR Raw Material Detail',
'permlevel': 1,
'print_hide': 1
},
@@ -1249,13 +1150,12 @@
# DocField
{
'allow_on_submit': 1,
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'idx': 80,
- 'label': 'Repair Purchase Receipt',
- 'oldfieldtype': 'Button',
- 'options': 'repair_purchase_receipt',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldtype': u'Button',
+ 'label': u'Repair Purchase Receipt',
+ 'oldfieldtype': u'Button',
+ 'options': u'repair_purchase_receipt',
'permlevel': 0,
'print_hide': 1
}
diff --git a/erpnext/stock/doctype/purchase_receipt_detail/purchase_receipt_detail.txt b/erpnext/stock/doctype/purchase_receipt_detail/purchase_receipt_detail.txt
index 9aacefd..7f63644 100755
--- a/erpnext/stock/doctype/purchase_receipt_detail/purchase_receipt_detail.txt
+++ b/erpnext/stock/doctype/purchase_receipt_detail/purchase_receipt_detail.txt
@@ -5,67 +5,67 @@
{
'creation': '2010-08-08 17:09:16',
'docstatus': 0,
- 'modified': '2011-12-14 10:50:00',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
+ 'modified': '2012-02-27 18:43:39',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
},
# These values are common for all DocType
{
- 'autoname': 'GRND/.#######',
- 'colour': 'White:FFF',
- 'default_print_format': 'Standard',
+ 'autoname': u'GRND/.#######',
+ 'colour': u'White:FFF',
+ 'default_print_format': u'Standard',
'doctype': 'DocType',
'istable': 1,
- 'module': 'Stock',
+ 'module': u'Stock',
'name': '__common__',
- 'section_style': 'Tray',
- 'server_code_error': ' ',
+ 'section_style': u'Tray',
+ 'server_code_error': u' ',
'show_in_menu': 0,
- 'version': 73
+ 'version': 74
},
# These values are common for all DocField
{
- 'doctype': 'DocField',
+ 'doctype': u'DocField',
'name': '__common__',
- 'parent': 'Purchase Receipt Detail',
- 'parentfield': 'fields',
- 'parenttype': 'DocType'
+ 'parent': u'Purchase Receipt Detail',
+ 'parentfield': u'fields',
+ 'parenttype': u'DocType'
},
# DocType, Purchase Receipt Detail
{
'doctype': 'DocType',
- 'name': 'Purchase Receipt Detail'
+ 'name': u'Purchase Receipt Detail'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_code',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_code',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Item Code',
- 'oldfieldname': 'item_code',
- 'oldfieldtype': 'Link',
- 'options': 'Item',
+ 'label': u'Item Code',
+ 'oldfieldname': u'item_code',
+ 'oldfieldtype': u'Link',
+ 'options': u'Item',
'permlevel': 0,
'reqd': 1,
'search_index': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_name',
- 'fieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_name',
+ 'fieldtype': u'Data',
'in_filter': 0,
- 'label': 'Item Name',
- 'oldfieldname': 'item_name',
- 'oldfieldtype': 'Data',
+ 'label': u'Item Name',
+ 'oldfieldname': u'item_name',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
@@ -74,236 +74,267 @@
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'description',
- 'fieldtype': 'Text',
- 'label': 'Description',
- 'oldfieldname': 'description',
- 'oldfieldtype': 'Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'description',
+ 'fieldtype': u'Text',
+ 'label': u'Description',
+ 'oldfieldname': u'description',
+ 'oldfieldtype': u'Text',
'permlevel': 0,
'reqd': 1,
- 'width': '300px'
+ 'width': u'300px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'received_qty',
- 'fieldtype': 'Currency',
- 'label': 'Recd Quantity',
- 'oldfieldname': 'received_qty',
- 'oldfieldtype': 'Currency',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'received_qty',
+ 'fieldtype': u'Currency',
+ 'label': u'Recd Quantity',
+ 'oldfieldname': u'received_qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'reqd': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'qty',
- 'fieldtype': 'Currency',
- 'label': 'Accepted Quantity',
- 'oldfieldname': 'qty',
- 'oldfieldtype': 'Currency',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'qty',
+ 'fieldtype': u'Currency',
+ 'label': u'Accepted Quantity',
+ 'oldfieldname': u'qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'rejected_qty',
- 'fieldtype': 'Currency',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'rejected_qty',
+ 'fieldtype': u'Currency',
'in_filter': 0,
- 'label': 'Rejected Quantity',
- 'oldfieldname': 'rejected_qty',
- 'oldfieldtype': 'Currency',
+ 'label': u'Rejected Quantity',
+ 'oldfieldname': u'rejected_qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'search_index': 0,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'import_ref_rate',
- 'fieldtype': 'Currency',
- 'label': 'Ref Rate ',
+ 'doctype': u'DocField',
+ 'fieldname': u'import_ref_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Ref Rate ',
'permlevel': 0
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'discount_rate',
- 'fieldtype': 'Currency',
- 'label': 'Discount %',
+ 'doctype': u'DocField',
+ 'fieldname': u'discount_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Discount %',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'import_rate',
- 'fieldtype': 'Currency',
- 'label': 'Rate',
- 'oldfieldname': 'import_rate',
- 'oldfieldtype': 'Currency',
+ 'colour': u'White:FFF',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'import_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Rate',
+ 'oldfieldname': u'import_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 0,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'import_amount',
- 'fieldtype': 'Currency',
- 'label': 'Amount',
- 'oldfieldname': 'import_amount',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'import_amount',
+ 'fieldtype': u'Currency',
+ 'label': u'Amount',
+ 'oldfieldname': u'import_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'purchase_ref_rate',
- 'fieldtype': 'Currency',
- 'label': 'Ref Rate *',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_ref_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Ref Rate *',
'permlevel': 0
},
# DocField
{
- 'colour': 'White:FFF',
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'purchase_rate',
- 'fieldtype': 'Currency',
- 'label': 'Rate *(Default Curr.)',
- 'oldfieldname': 'purchase_rate',
- 'oldfieldtype': 'Currency',
+ 'colour': u'White:FFF',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'purchase_rate',
+ 'fieldtype': u'Currency',
+ 'label': u'Rate *(Default Curr.)',
+ 'oldfieldname': u'purchase_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'amount',
- 'fieldtype': 'Currency',
- 'label': 'Amount (Default Curr.)',
- 'oldfieldname': 'amount',
- 'oldfieldtype': 'Currency',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'amount',
+ 'fieldtype': u'Currency',
+ 'label': u'Amount (Default Curr.)',
+ 'oldfieldname': u'amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 0,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'warehouse',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'warehouse',
+ 'fieldtype': u'Link',
'hidden': 0,
- 'label': 'Accepted Warehouse',
- 'oldfieldname': 'warehouse',
- 'oldfieldtype': 'Link',
- 'options': 'Warehouse',
+ 'label': u'Accepted Warehouse',
+ 'oldfieldname': u'warehouse',
+ 'oldfieldtype': u'Link',
+ 'options': u'Warehouse',
'permlevel': 0,
'print_hide': 0,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'uom',
- 'fieldtype': 'Link',
- 'label': 'UOM',
- 'oldfieldname': 'uom',
- 'oldfieldtype': 'Link',
- 'options': 'UOM',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'uom',
+ 'fieldtype': u'Link',
+ 'label': u'UOM',
+ 'oldfieldname': u'uom',
+ 'oldfieldtype': u'Link',
+ 'options': u'UOM',
'permlevel': 0,
'reqd': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'conversion_factor',
- 'fieldtype': 'Currency',
- 'label': 'Conversion Factor',
- 'oldfieldname': 'conversion_factor',
- 'oldfieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'conversion_factor',
+ 'fieldtype': u'Currency',
+ 'label': u'Conversion Factor',
+ 'oldfieldname': u'conversion_factor',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
'reqd': 1,
- 'trigger': 'Client',
- 'width': '100px'
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'stock_uom',
- 'fieldtype': 'Data',
- 'label': 'Stock UOM',
- 'oldfieldname': 'stock_uom',
- 'oldfieldtype': 'Data',
+ 'doctype': u'DocField',
+ 'fieldname': u'stock_uom',
+ 'fieldtype': u'Data',
+ 'label': u'Stock UOM',
+ 'oldfieldname': u'stock_uom',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'reqd': 1,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'rejected_warehouse',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'serial_no',
+ 'fieldtype': u'Text',
+ 'in_filter': 1,
+ 'label': u'Serial No',
+ 'no_copy': 1,
+ 'oldfieldname': u'serial_no',
+ 'oldfieldtype': u'Text',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'report_hide': 0
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'batch_no',
+ 'fieldtype': u'Link',
+ 'label': u'Batch No',
+ 'oldfieldname': u'batch_no',
+ 'oldfieldtype': u'Link',
+ 'options': u'Batch',
+ 'permlevel': 0,
+ 'print_hide': 1,
+ 'trigger': u'Client'
+ },
+
+ # DocField
+ {
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'rejected_warehouse',
+ 'fieldtype': u'Link',
'hidden': 1,
- 'label': 'Rejected Warehouse',
+ 'label': u'Rejected Warehouse',
'no_copy': 1,
- 'oldfieldname': 'rejected_warehouse',
- 'oldfieldtype': 'Link',
- 'options': 'Warehouse',
+ 'oldfieldname': u'rejected_warehouse',
+ 'oldfieldtype': u'Link',
+ 'options': u'Warehouse',
'permlevel': 1,
'print_hide': 1,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'schedule_date',
- 'fieldtype': 'Date',
- 'label': 'Schedule date',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'schedule_date',
+ 'fieldtype': u'Date',
+ 'label': u'Schedule date',
'no_copy': 1,
- 'oldfieldname': 'schedule_date',
- 'oldfieldtype': 'Date',
+ 'oldfieldname': u'schedule_date',
+ 'oldfieldtype': u'Date',
'permlevel': 0,
'print_hide': 1,
'report_hide': 0,
@@ -312,57 +343,57 @@
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'project_name',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'project_name',
+ 'fieldtype': u'Link',
'in_filter': 1,
- 'label': 'Project Name',
- 'options': 'Project',
+ 'label': u'Project Name',
+ 'options': u'Project',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'qa_no',
- 'fieldtype': 'Link',
- 'label': 'QA No',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'qa_no',
+ 'fieldtype': u'Link',
+ 'label': u'QA No',
'no_copy': 1,
- 'oldfieldname': 'qa_no',
- 'oldfieldtype': 'Link',
- 'options': 'QA Inspection Report',
+ 'oldfieldname': u'qa_no',
+ 'oldfieldtype': u'Link',
+ 'options': u'QA Inspection Report',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'brand',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'brand',
+ 'fieldtype': u'Link',
'hidden': 1,
- 'label': 'Brand',
- 'oldfieldname': 'brand',
- 'oldfieldtype': 'Link',
- 'options': 'Brand',
+ 'label': u'Brand',
+ 'oldfieldname': u'brand',
+ 'oldfieldtype': u'Link',
+ 'options': u'Brand',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'item_group',
- 'fieldtype': 'Link',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_group',
+ 'fieldtype': u'Link',
'hidden': 1,
'in_filter': 1,
- 'label': 'Item Group',
- 'oldfieldname': 'item_group',
- 'oldfieldtype': 'Link',
- 'options': 'Item Group',
+ 'label': u'Item Group',
+ 'oldfieldname': u'item_group',
+ 'oldfieldtype': u'Link',
+ 'options': u'Item Group',
'permlevel': 1,
'print_hide': 1,
'search_index': 1
@@ -370,192 +401,161 @@
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'serial_no',
- 'fieldtype': 'Text',
- 'in_filter': 1,
- 'label': 'Serial No',
- 'no_copy': 1,
- 'oldfieldname': 'serial_no',
- 'oldfieldtype': 'Text',
+ 'doctype': u'DocField',
+ 'fieldname': u'stock_qty',
+ 'fieldtype': u'Currency',
+ 'label': u'Stock Qty',
+ 'oldfieldname': u'stock_qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 0,
'print_hide': 1,
- 'report_hide': 0
+ 'trigger': u'Client',
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'batch_no',
- 'fieldtype': 'Link',
- 'label': 'Batch No',
- 'oldfieldname': 'batch_no',
- 'oldfieldtype': 'Link',
- 'options': 'Batch',
- 'permlevel': 0,
- 'print_hide': 1,
- 'trigger': 'Client'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'stock_qty',
- 'fieldtype': 'Currency',
- 'label': 'Stock Qty',
- 'oldfieldname': 'stock_qty',
- 'oldfieldtype': 'Currency',
- 'permlevel': 0,
- 'print_hide': 1,
- 'trigger': 'Client',
- 'width': '100px'
- },
-
- # DocField
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'prevdoc_doctype',
- 'fieldtype': 'Data',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'prevdoc_doctype',
+ 'fieldtype': u'Data',
'hidden': 1,
- 'label': 'Prevdoc Doctype',
- 'oldfieldname': 'prevdoc_doctype',
- 'oldfieldtype': 'Data',
+ 'label': u'Prevdoc Doctype',
+ 'oldfieldname': u'prevdoc_doctype',
+ 'oldfieldtype': u'Data',
'permlevel': 0,
'print_hide': 1
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'prevdoc_docname',
- 'fieldtype': 'Link',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'prevdoc_docname',
+ 'fieldtype': u'Link',
'hidden': 0,
'in_filter': 1,
- 'label': 'PO No',
+ 'label': u'PO No',
'no_copy': 0,
- 'oldfieldname': 'prevdoc_docname',
- 'oldfieldtype': 'Link',
- 'options': 'Purchase Order',
+ 'oldfieldname': u'prevdoc_docname',
+ 'oldfieldtype': u'Link',
+ 'options': u'Purchase Order',
'permlevel': 1,
'print_hide': 0,
'reqd': 0,
'search_index': 1,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'prevdoc_date',
- 'fieldtype': 'Date',
+ 'doctype': u'DocField',
+ 'fieldname': u'prevdoc_date',
+ 'fieldtype': u'Date',
'hidden': 1,
'in_filter': 1,
- 'label': 'PO Date',
- 'oldfieldname': 'prevdoc_date',
- 'oldfieldtype': 'Date',
+ 'label': u'PO Date',
+ 'oldfieldname': u'prevdoc_date',
+ 'oldfieldtype': u'Date',
'permlevel': 1,
'print_hide': 1
},
# DocField
{
- 'doctype': 'DocField',
- 'fieldname': 'rm_supp_cost',
- 'fieldtype': 'Currency',
+ 'doctype': u'DocField',
+ 'fieldname': u'rm_supp_cost',
+ 'fieldtype': u'Currency',
'hidden': 1,
'in_filter': 0,
- 'label': 'Raw Materials Supplied Cost',
- 'oldfieldname': 'rm_supp_cost',
- 'oldfieldtype': 'Currency',
+ 'label': u'Raw Materials Supplied Cost',
+ 'oldfieldname': u'rm_supp_cost',
+ 'oldfieldtype': u'Currency',
'permlevel': 2,
'print_hide': 1,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'item_tax_amount',
- 'fieldtype': 'Currency',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_tax_amount',
+ 'fieldtype': u'Currency',
'hidden': 1,
- 'label': 'Item Tax Amount',
+ 'label': u'Item Tax Amount',
'no_copy': 1,
- 'oldfieldname': 'item_tax_amount',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'item_tax_amount',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
'reqd': 0,
'search_index': 1,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'prevdoc_detail_docname',
- 'fieldtype': 'Data',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'prevdoc_detail_docname',
+ 'fieldtype': u'Data',
'hidden': 1,
'in_filter': 1,
- 'label': 'PO Detail No',
+ 'label': u'PO Detail No',
'no_copy': 0,
- 'oldfieldname': 'prevdoc_detail_docname',
- 'oldfieldtype': 'Data',
+ 'oldfieldname': u'prevdoc_detail_docname',
+ 'oldfieldtype': u'Data',
'permlevel': 1,
'print_hide': 1,
'search_index': 1,
- 'width': '150px'
+ 'width': u'150px'
},
# DocField
{
- 'default': '0.00',
- 'doctype': 'DocField',
- 'fieldname': 'billed_qty',
- 'fieldtype': 'Currency',
- 'label': 'Billed Quantity',
+ 'default': u'0.00',
+ 'doctype': u'DocField',
+ 'fieldname': u'billed_qty',
+ 'fieldtype': u'Currency',
+ 'label': u'Billed Quantity',
'no_copy': 1,
- 'oldfieldname': 'billed_qty',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'billed_qty',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
- 'width': '100px'
+ 'width': u'100px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'doctype': 'DocField',
- 'fieldname': 'valuation_rate',
- 'fieldtype': 'Currency',
+ 'colour': u'White:FFF',
+ 'doctype': u'DocField',
+ 'fieldname': u'valuation_rate',
+ 'fieldtype': u'Currency',
'hidden': 1,
'in_filter': 0,
- 'label': 'Valuation Rate',
+ 'label': u'Valuation Rate',
'no_copy': 1,
- 'oldfieldname': 'valuation_rate',
- 'oldfieldtype': 'Currency',
+ 'oldfieldname': u'valuation_rate',
+ 'oldfieldtype': u'Currency',
'permlevel': 1,
'print_hide': 1,
- 'width': '80px'
+ 'width': u'80px'
},
# DocField
{
- 'colour': 'White:FFF',
- 'description': 'Tax detail table fetched from item master as a string and stored in this field.\nUsed for Purchase Other Charges',
- 'doctype': 'DocField',
- 'fieldname': 'item_tax_rate',
- 'fieldtype': 'Small Text',
+ 'colour': u'White:FFF',
+ 'description': u'Tax detail table fetched from item master as a string and stored in this field.\nUsed for Purchase Other Charges',
+ 'doctype': u'DocField',
+ 'fieldname': u'item_tax_rate',
+ 'fieldtype': u'Small Text',
'hidden': 1,
'in_filter': 0,
- 'label': 'Item Tax Rate',
- 'oldfieldname': 'item_tax_rate',
- 'oldfieldtype': 'Small Text',
+ 'label': u'Item Tax Rate',
+ 'oldfieldname': u'item_tax_rate',
+ 'oldfieldtype': u'Small Text',
'permlevel': 1,
'print_hide': 1,
'report_hide': 1
@@ -564,12 +564,12 @@
# DocField
{
'allow_on_submit': 1,
- 'doctype': 'DocField',
- 'fieldname': 'page_break',
- 'fieldtype': 'Check',
- 'label': 'Page Break',
- 'oldfieldname': 'page_break',
- 'oldfieldtype': 'Check',
+ 'doctype': u'DocField',
+ 'fieldname': u'page_break',
+ 'fieldtype': u'Check',
+ 'label': u'Page Break',
+ 'oldfieldname': u'page_break',
+ 'oldfieldtype': u'Check',
'permlevel': 0,
'print_hide': 1
}
diff --git a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.js b/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.js
index 5e49713..2320f00 100644
--- a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.js
+++ b/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// Onload
//-------------------------------
cur_frm.cscript.onload = function(doc,dt,dn){
diff --git a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py b/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py
index ca6761e..9b421d3 100644
--- a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py
+++ b/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/stock/doctype/sales_bom/sales_bom.js b/erpnext/stock/doctype/sales_bom/sales_bom.js
index 5bae649..be159e7 100644
--- a/erpnext/stock/doctype/sales_bom/sales_bom.js
+++ b/erpnext/stock/doctype/sales_bom/sales_bom.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc, cdt, cdn) {
diff --git a/erpnext/stock/doctype/sales_bom/sales_bom.py b/erpnext/stock/doctype/sales_bom/sales_bom.py
index ce4567e..39fa2cd 100644
--- a/erpnext/stock/doctype/sales_bom/sales_bom.py
+++ b/erpnext/stock/doctype/sales_bom/sales_bom.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/stock/doctype/serial_no/serial_no.js b/erpnext/stock/doctype/serial_no/serial_no.js
index a41113c..00929ec 100644
--- a/erpnext/stock/doctype/serial_no/serial_no.js
+++ b/erpnext/stock/doctype/serial_no/serial_no.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// ************************************** onload ****************************************************
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(!doc.status) set_multiple(cdt, cdn, {status:'In Store'});
diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py
index b242edb..2384171 100644
--- a/erpnext/stock/doctype/serial_no/serial_no.py
+++ b/erpnext/stock/doctype/serial_no/serial_no.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 161e094..0eb78df 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if (!doc.posting_date) doc.posting_date = dateutil.obj_to_str(new Date());
if (!doc.transfer_date) doc.transfer_date = dateutil.obj_to_str(new Date());
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index d9196d8..530c5e6 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/stock/doctype/stock_ledger/stock_ledger.py b/erpnext/stock/doctype/stock_ledger/stock_ledger.py
index f22d2c2..577d2ef 100644
--- a/erpnext/stock/doctype/stock_ledger/stock_ledger.py
+++ b/erpnext/stock/doctype/stock_ledger/stock_ledger.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
index 3833e45..c9d23c6 100644
--- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
+++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
index 2e428df..613c230 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.refresh = function(doc) {
if (doc.docstatus) hide_field('Steps');
}
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
index ace16fb..8ea8273 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import cstr, flt, get_defaults, nowdate
from webnotes import msgprint
diff --git a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.js b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.js
index 8352506..b71f94b 100644
--- a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.js
+++ b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.fields_dict['item_code'].get_query = function(doc) {
return 'SELECT DISTINCT `tabItem`.`name`, `tabItem`.description FROM `tabItem` WHERE (IFNULL(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` ="0000-00-00" OR `tabItem`.`end_of_life` > NOW()) AND `tabItem`.`%(key)s` like "%s" ORDER BY `tabItem`.`name` LIMIT 50';
}
diff --git a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py
index 0fa7a3b..e80e66f 100644
--- a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py
+++ b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/stock/doctype/valuation_control/valuation_control.py b/erpnext/stock/doctype/valuation_control/valuation_control.py
index 52d9640..f0cbed9 100644
--- a/erpnext/stock/doctype/valuation_control/valuation_control.py
+++ b/erpnext/stock/doctype/valuation_control/valuation_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes, unittest
diff --git a/erpnext/stock/doctype/warehouse/warehouse.js b/erpnext/stock/doctype/warehouse/warehouse.js
index a418027..cf0d4a0 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.js
+++ b/erpnext/stock/doctype/warehouse/warehouse.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.country = function(doc, cdt, cdn) {
var mydoc=doc;
$c('runserverobj', args={'method':'check_state', 'docs':compress_doclist([doc])},
diff --git a/erpnext/stock/doctype/warehouse/warehouse.py b/erpnext/stock/doctype/warehouse/warehouse.py
index b9d560a..8b08fab 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.py
+++ b/erpnext/stock/doctype/warehouse/warehouse.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/stock/page/stock_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/stock/page/stock_home/__init__.py
diff --git a/erpnext/stock/page/stock_home/stock_home.html b/erpnext/stock/page/stock_home/stock_home.html
new file mode 100644
index 0000000..bab93dc
--- /dev/null
+++ b/erpnext/stock/page/stock_home/stock_home.html
@@ -0,0 +1,105 @@
+<div class="layout-wrapper layout-wrapper-background">
+ <div class="layout-main-section">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Stock</h1>
+ <hr>
+ <div style="width: 48%; float: left;">
+ <h4><a href="#!List/Stock Entry">Stock Entry</a></h4>
+ <p class="help">Transfer stock from one warehouse to another</p>
+ <h4><a href="#!List/Delivery Note">Delivery Note</a></h4>
+ <p class="help">Delivery (shipment) to customers</p>
+ <h4><a href="#!List/Purchase Receipt">Purchase Receipt</a></h4>
+ <p class="help">Goods received from Suppliers</p>
+ </div>
+ <div style="width: 48%; float: right;">
+ <h4><a href="#!List/Item">Item</a></h4>
+ <p class="help">Item Master</p>
+ <h4><a href="#!List/Serial No">Serial No</a></h4>
+ <p class="help">Single unit of an Item</p>
+ <h4><a href="#!List/Batch">Batch</a></h4>
+ <p class="help">Batch of units of an Item</p>
+ <h4><a href="#!List/Item">Warehouse</a></h4>
+ <p class="help">Warehouse is where items are stored</p>
+ </div>
+ <div style="clear: both"></div>
+ <hr>
+ <h3>Reports</h3>
+ <div class="reports-list"></div>
+ </div>
+ <div class="layout-side-section">
+ <div class="psidebar">
+ <div class="section">
+ <div class="section-head">Tools</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "Update stock by uploading a spreadsheet (csv) file"
+ href="#!List/Stock Reconciliation">Stock Reconciliation</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Details of item installations"
+ href="#!List/Installation Note">Installation Note</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Details packages against a delivery"
+ href="#!List/Packing Slip">Packing Slip</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Readings of incoming quality inspections"
+ href="#!List/List/QA Inspection Report">Incoming Inspection</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "List of expense heads (Account) that will be distributed across incoming purchases (costs that you find out some time after you receive goods, like Custom Duty, but are a part of item valuation)"
+ href="#!List/Landed Cost Master">Landed Cost Master</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Distribute costs on Purchase Receipts and add them to item value"
+ href="#!List/Landed Cost Wizard">Landed Cost Wizard</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Change Unit of Measure (UOM) of an item"
+ href="#!Form/Stock UOM Replace Utility/Stock UOM Replace Utility">UOM Replace Utility</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Helper for managing return of goods (sales or purchase)"
+ href="#!Form/Sales and Purchase Return Wizard/Sales and Purchase Return Wizard">Sales or Purchase Returns</a>
+ </div>
+
+ </div>
+ </div>
+ <div class="section">
+ <div class="section-head">Setup</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "Tree of item classification"
+ href="#!Sales Browser/Item Group">Item Group</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Unit of Measure (UOM) master"
+ href="#!List/UOM">Unit of Measure (UOM)</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "List of Item Brands (optional)"
+ href="#!List/Brand">Brand</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Types of warehouses"
+ href="#!List/Warehouse Type">Warehouse Type</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/stock/page/stock_home/stock_home.js b/erpnext/stock/page/stock_home/stock_home.js
new file mode 100644
index 0000000..aa33722
--- /dev/null
+++ b/erpnext/stock/page/stock_home/stock_home.js
@@ -0,0 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+pscript['onload_stock-home'] = function(wrapper) {
+ erpnext.module_page.setup_page('Stock', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/stock/page/stock_home/stock_home.txt b/erpnext/stock/page/stock_home/stock_home.txt
new file mode 100644
index 0000000..f3e7cda
--- /dev/null
+++ b/erpnext/stock/page/stock_home/stock_home.txt
@@ -0,0 +1,28 @@
+# Page, stock-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-21 13:23:22',
+ 'docstatus': 0,
+ 'modified': '2012-02-21 13:23:22',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Stock',
+ 'name': '__common__',
+ 'page_name': u'stock-home',
+ 'standard': u'Yes',
+ 'title': u'Stock Home'
+ },
+
+ # Page, stock-home
+ {
+ 'doctype': 'Page',
+ 'name': u'stock-home'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.js b/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.js
index 83be08c..b19db63 100644
--- a/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.js
+++ b/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Item'+FILTER_SEP +'ID'].df.in_first_page = 1;
}
\ No newline at end of file
diff --git a/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.js b/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.js
index 3c0f8bf..d9cf4d4 100644
--- a/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.js
+++ b/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.add_filter({fieldname:'posting_date', label:'Posting Date', fieldtype:'Date', ignore : 1, parent:'Item'});
diff --git a/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.py b/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.py
index 75b3f3f..2645d50 100644
--- a/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.py
+++ b/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
mon_list = []
data = {'start_date':0, 'end_date':1, 'working_days': 2}
diff --git a/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.js b/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.js
index 194990a..8cc73dd 100644
--- a/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.js
+++ b/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
//this.hide_all_filters();
diff --git a/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.py b/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.py
index 42b0cc3..2557451 100644
--- a/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.py
+++ b/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
col = [['In Store Period (in days)', 'Data', '']]
for c in col:
colnames.append(str(c[0]))
diff --git a/erpnext/stock/search_criteria/stock_ledger/stock_ledger.js b/erpnext/stock/search_criteria/stock_ledger/stock_ledger.js
index 89e1dbc..a47806f 100644
--- a/erpnext/stock/search_criteria/stock_ledger/stock_ledger.js
+++ b/erpnext/stock/search_criteria/stock_ledger/stock_ledger.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.add_filter({fieldname:'item_name', label:'Item Name', fieldtype:'Data', options:'', parent:'Item'});
this.add_filter({fieldname:'description', label:'Description', fieldtype:'Small Text', options: '', parent:'Item'});
diff --git a/erpnext/stock/search_criteria/stock_level/stock_level.js b/erpnext/stock/search_criteria/stock_level/stock_level.js
index e84fe57..f456d0b 100644
--- a/erpnext/stock/search_criteria/stock_level/stock_level.js
+++ b/erpnext/stock/search_criteria/stock_level/stock_level.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.add_filter({fieldname:'item_name', label:'Item Name', fieldtype:'Data', options:'', parent:'Item', in_first_page : 1});
this.add_filter({fieldname:'description', label:'Description', fieldtype:'Small Text', options: '', parent:'Item', in_first_page : 1});
diff --git a/erpnext/stock/search_criteria/stock_level/stock_level.py b/erpnext/stock/search_criteria/stock_level/stock_level.py
index 4aa397c..7782805 100644
--- a/erpnext/stock/search_criteria/stock_level/stock_level.py
+++ b/erpnext/stock/search_criteria/stock_level/stock_level.py
@@ -1,2 +1,18 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
colwidths[col_idx['Reserved Quantity']]= "120px"
colwidths[col_idx['Ordered Quantity']] = "120px"
\ No newline at end of file
diff --git a/erpnext/stock/search_criteria/stock_report/stock_report.js b/erpnext/stock/search_criteria/stock_report/stock_report.js
index 9304bd4..5451eb1 100644
--- a/erpnext/stock/search_criteria/stock_report/stock_report.js
+++ b/erpnext/stock/search_criteria/stock_report/stock_report.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//233
report.customize_filters = function() {
this.mytabs.items['Select Columns'].hide()
diff --git a/erpnext/stock/search_criteria/stock_report/stock_report.py b/erpnext/stock/search_criteria/stock_report/stock_report.py
index 1868794..84866e9 100644
--- a/erpnext/stock/search_criteria/stock_report/stock_report.py
+++ b/erpnext/stock/search_criteria/stock_report/stock_report.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
if not filter_values.get('based_on'):
msgprint("Please Select Based On")
raise Exception
diff --git a/erpnext/stock/tests.py b/erpnext/stock/tests.py
index a8c0ffd..acd0edc 100644
--- a/erpnext/stock/tests.py
+++ b/erpnext/stock/tests.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import unittest
import sys
diff --git a/erpnext/support/doctype/customer_issue/customer_issue.js b/erpnext/support/doctype/customer_issue/customer_issue.js
index 8d62568..3890cb7 100644
--- a/erpnext/support/doctype/customer_issue/customer_issue.js
+++ b/erpnext/support/doctype/customer_issue/customer_issue.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc,cdt,cdn){
if(!doc.status) set_multiple(dt,dn,{status:'Open'});
if(doc.__islocal){
diff --git a/erpnext/support/doctype/customer_issue/customer_issue.py b/erpnext/support/doctype/customer_issue/customer_issue.py
index 12a8ebd..af839cf 100644
--- a/erpnext/support/doctype/customer_issue/customer_issue.py
+++ b/erpnext/support/doctype/customer_issue/customer_issue.py
@@ -1,4 +1,21 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
+
import webnotes
from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, generate_hash, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add
diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
index d284c4c..51853a6 100644
--- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
+++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc, dt, dn) {
if(!doc.status) set_multiple(dt,dn,{status:'Draft'});
diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py
index c47ec22..30083da 100644
--- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py
+++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
index 27b5a5f..df976d1 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc, dt, dn) {
if(!doc.status) set_multiple(dt,dn,{status:'Draft'});
if(doc.customer) cur_frm.cscript.customer(doc,cdt,cdn);
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.py b/erpnext/support/doctype/maintenance_visit/maintenance_visit.py
index e4efe1c..902b92a 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.py
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/support/doctype/support_ticket/__init__.py b/erpnext/support/doctype/support_ticket/__init__.py
index e6cf07e..c9d1958 100644
--- a/erpnext/support/doctype/support_ticket/__init__.py
+++ b/erpnext/support/doctype/support_ticket/__init__.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import cstr
diff --git a/erpnext/support/doctype/support_ticket/support_ticket.css b/erpnext/support/doctype/support_ticket/support_ticket.css
new file mode 100644
index 0000000..8d563a7
--- /dev/null
+++ b/erpnext/support/doctype/support_ticket/support_ticket.css
@@ -0,0 +1,8 @@
+.support-ticket-wrapper {
+ margin-top: 10px;
+}
+
+.support-ticket-title {
+ padding: 5px;
+ border-bottom: 1px solid black;
+}
diff --git a/erpnext/support/doctype/support_ticket/support_ticket.js b/erpnext/support/doctype/support_ticket/support_ticket.js
index 397ee8d..86264a6 100644
--- a/erpnext/support/doctype/support_ticket/support_ticket.js
+++ b/erpnext/support/doctype/support_ticket/support_ticket.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// threading structure
// -------- orginal message --------
// xoxoxoxo
@@ -143,13 +159,11 @@
this.from_email = this.from_email.replace('<', '<').replace('>', '>');
// main wrapper
- w = $a(parent, 'div', '',
- {margin:'7px 0px', padding:'0px', border:'1px solid #c8c8c8', backgroundColor:'#f9f9f9'}
- );
- $br(w, '7px');
+ w = $a(parent, 'div', 'support-ticket-wrapper well');
+ //$(w).addClass('support-ticket-wrapper');
// sender and timestamp
- $a($a(w, 'div', '', {marginBottom:'7px', padding: '7px', backgroundColor:'#d2d2f2'}),
+ $a($a(w, 'div', 'support-ticket-title'),
'span', 'link_type', {}, repl('By %(from_email)s on %(creation)s:', this),
function() {
// toggle message display on timestamp
@@ -164,7 +178,8 @@
// email text
this.message = $a(w, 'div', '',
// style
- {lineHeight:'1.7em', display:'none', padding: '7px'},
+ {lineHeight:'1.7em', display:'none', padding: '7px', width: '575px',
+ wordWrap: 'break-word', textWrap: 'normal', overflowX: 'auto'},
// newlines for text email
(this.content_type=='text/plain' ? this.mail
diff --git a/erpnext/support/doctype/support_ticket/support_ticket.py b/erpnext/support/doctype/support_ticket/support_ticket.py
index 68b1c55..384d26f 100644
--- a/erpnext/support/doctype/support_ticket/support_ticket.py
+++ b/erpnext/support/doctype/support_ticket/support_ticket.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.model.doc import make_autoname
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/support/page/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/support/page/__init__.py
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/support/page/support_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/support/page/support_home/__init__.py
diff --git a/erpnext/support/page/support_home/support_home.html b/erpnext/support/page/support_home/support_home.html
new file mode 100644
index 0000000..6c1f790
--- /dev/null
+++ b/erpnext/support/page/support_home/support_home.html
@@ -0,0 +1,41 @@
+<div class="layout-wrapper layout-wrapper-background">
+ <div class="layout-main-section">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Support</h1>
+ <hr>
+ <div style="width: 48%; float: left;">
+ <h4><a href="#!List/Support Ticket">Support Ticket</a></h4>
+ <p class="help">Support queries from customers via email or website</p>
+ <h4><a href="#!List/Customer Issue">Customer Issue</a></h4>
+ <p class="help">Customer Issue against a Serial No (warranty)</p>
+ <h4><a href="#!List/Maintenance Schedule">Maintenance Schedule</a></h4>
+ <p class="help">Plan for scheduled maintenance contracts</p>
+ <h4><a href="#!List/Maintenance Visit">Maintenance Visit</a></h4>
+ <p class="help">Visit report for maintenance visit</p>
+ </div>
+ <div style="width: 48%; float: right;">
+ <h4><a href="#!List/Serial No">Serial No</a></h4>
+ <p class="help">Single unit of an Item</p>
+ </div>
+ <div style="clear: both"></div>
+ <hr>
+ <h3>Reports</h3>
+ <div class="reports-list"></div>
+ </div>
+ <div class="layout-side-section">
+ <div class="psidebar">
+ <div class="section">
+ <div class="section-head">Tools</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "Pull support issue from support email account"
+ href="#!Form/Email Settings/Email Settings">Email Settings</a>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ </div>
+ <div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/support/page/support_home/support_home.js b/erpnext/support/page/support_home/support_home.js
new file mode 100644
index 0000000..b9fd85e
--- /dev/null
+++ b/erpnext/support/page/support_home/support_home.js
@@ -0,0 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+pscript['onload_support-home'] = function(wrapper) {
+ erpnext.module_page.setup_page('Support', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/support/page/support_home/support_home.txt b/erpnext/support/page/support_home/support_home.txt
new file mode 100644
index 0000000..a462abd
--- /dev/null
+++ b/erpnext/support/page/support_home/support_home.txt
@@ -0,0 +1,28 @@
+# Page, support-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-21 13:23:35',
+ 'docstatus': 0,
+ 'modified': '2012-02-21 13:23:35',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Support',
+ 'name': '__common__',
+ 'page_name': u'support-home',
+ 'standard': u'Yes',
+ 'title': u'Support Home'
+ },
+
+ # Page, support-home
+ {
+ 'doctype': 'Page',
+ 'name': u'support-home'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/support/search_criteria/amc_summary/amc_summary.js b/erpnext/support/search_criteria/amc_summary/amc_summary.js
index c3208b3..0ce3619 100644
--- a/erpnext/support/search_criteria/amc_summary/amc_summary.js
+++ b/erpnext/support/search_criteria/amc_summary/amc_summary.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
this.mytabs.items['Select Columns'].hide();
diff --git a/erpnext/support/search_criteria/amc_summary/amc_summary.py b/erpnext/support/search_criteria/amc_summary/amc_summary.py
index 49a5976..f0b7631 100644
--- a/erpnext/support/search_criteria/amc_summary/amc_summary.py
+++ b/erpnext/support/search_criteria/amc_summary/amc_summary.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# ADD NEW COLUMNS
row_list = [['Item Group','Data','150px',''],
['Out of AMC','Int','150px',''],
diff --git a/erpnext/support/search_criteria/customer_issues/customer_issues.js b/erpnext/support/search_criteria/customer_issues/customer_issues.js
index 4af2f7a..8eaf6f6 100644
--- a/erpnext/support/search_criteria/customer_issues/customer_issues.js
+++ b/erpnext/support/search_criteria/customer_issues/customer_issues.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Customer Issue'+FILTER_SEP +'Status'].df.in_first_page = 1;
this.filter_fields_dict['Customer Issue'+FILTER_SEP +'Allocated To'].df.in_first_page = 1;
diff --git a/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.js b/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.js
index 46d4b2b..1b3837a 100644
--- a/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.js
+++ b/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
diff --git a/erpnext/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.js b/erpnext/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.js
index 87651bb..c4800ea 100644
--- a/erpnext/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.js
+++ b/erpnext/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.filter_fields_dict['Maintenance Schedule Detail'+FILTER_SEP +'From Scheduled Date'].df.in_first_page = 1;
diff --git a/erpnext/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.js b/erpnext/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.js
index d1e78e0..ad5ce26 100644
--- a/erpnext/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.js
+++ b/erpnext/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//this.mytabs.items['Select Columns'].hide();
report.customize_filters = function() {
diff --git a/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.js b/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.js
index 07f6952..4ad5a76 100644
--- a/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.js
+++ b/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
report.customize_filters = function() {
this.hide_all_filters();
this.mytabs.items['Select Columns'].hide();
diff --git a/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.py b/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.py
index 783f91a..17f36c0 100644
--- a/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.py
+++ b/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
opt = filter_values.get('based_on')
opt_dict = {'Territory':'territory', 'Item Group':'item_group'}
diff --git a/erpnext/utilities/__init__.py b/erpnext/utilities/__init__.py
index e69de29..d57f0de 100644
--- a/erpnext/utilities/__init__.py
+++ b/erpnext/utilities/__init__.py
@@ -0,0 +1,29 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import webnotes
+
+@webnotes.whitelist()
+def get_report_list(arg=None):
+ """return list of reports for the given module module"""
+ webnotes.response['values'] = webnotes.conn.sql("""select
+ distinct criteria_name, doc_type, parent_doc_type
+ from `tabSearch Criteria`
+ where module='%(module)s'
+ and docstatus in (0, NULL)
+ and ifnull(disabled, 0) = 0
+ order by criteria_name
+ limit %(limit_start)s, %(limit_page_length)s""" % webnotes.form_dict, as_dict=True)
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/activity_dashboard_control/activity_dashboard_control.py b/erpnext/utilities/doctype/activity_dashboard_control/activity_dashboard_control.py
index fde7552..e3063e9 100644
--- a/erpnext/utilities/doctype/activity_dashboard_control/activity_dashboard_control.py
+++ b/erpnext/utilities/doctype/activity_dashboard_control/activity_dashboard_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/utilities/doctype/address/address.js b/erpnext/utilities/doctype/address/address.js
index aa1d871..fc274ef 100644
--- a/erpnext/utilities/doctype/address/address.js
+++ b/erpnext/utilities/doctype/address/address.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(doc.customer) cur_frm.add_fetch('customer', 'customer_name', 'customer_name');
if(doc.supplier) cur_frm.add_fetch('supplier', 'supplier_name', 'supplier_name');
diff --git a/erpnext/utilities/doctype/address/address.py b/erpnext/utilities/doctype/address/address.py
index 7602d1d..a2946f5 100644
--- a/erpnext/utilities/doctype/address/address.py
+++ b/erpnext/utilities/doctype/address/address.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/utilities/doctype/bulk_rename_tool/bulk_rename_tool.py b/erpnext/utilities/doctype/bulk_rename_tool/bulk_rename_tool.py
index bb9d9e6..f5310c0 100644
--- a/erpnext/utilities/doctype/bulk_rename_tool/bulk_rename_tool.py
+++ b/erpnext/utilities/doctype/bulk_rename_tool/bulk_rename_tool.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/utilities/doctype/contact/contact.js b/erpnext/utilities/doctype/contact/contact.js
index d33750d..2aa89c1 100644
--- a/erpnext/utilities/doctype/contact/contact.js
+++ b/erpnext/utilities/doctype/contact/contact.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
//--------- ONLOAD -------------
cur_frm.cscript.onload = function(doc, cdt, cdn) {
if(doc.customer) cur_frm.add_fetch('customer', 'customer_name', 'customer_name');
diff --git a/erpnext/utilities/doctype/contact/contact.py b/erpnext/utilities/doctype/contact/contact.py
index 8cc9ba1..a6c94da 100644
--- a/erpnext/utilities/doctype/contact/contact.py
+++ b/erpnext/utilities/doctype/contact/contact.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/utilities/doctype/doctype_label/__init__.py b/erpnext/utilities/doctype/doctype_label/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/utilities/doctype/doctype_label/__init__.py
+++ /dev/null
diff --git a/erpnext/utilities/doctype/doctype_label/doctype_label.txt b/erpnext/utilities/doctype/doctype_label/doctype_label.txt
deleted file mode 100644
index 12f0cf8..0000000
--- a/erpnext/utilities/doctype/doctype_label/doctype_label.txt
+++ /dev/null
@@ -1 +0,0 @@
-[{'section_style': 'Simple', 'is_transaction_doc': None, 'creation': '2010-06-10 10:41:58', 'search_fields': None, 'module': 'Application Internal', 'doctype': 'DocType', 'change_log': None, 'print_outline': '', 'owner': 'Administrator', 'in_dialog': None, 'in_create': None, 'read_only': None, 'allow_email': None, 'dt_template': None, 'hide_heading': None, 'issingle': None, 'allow_rename': None, 'smallicon': None, 'allow_attach': None, 'show_in_menu': None, 'max_attachments': None, 'version': 2, 'menu_index': None, 'docstatus': 0, 'allow_copy': None, 'istable': None, 'description': None, 'parent': None, 'server_code': None, 'allow_trash': None, 'allow_print': None, 'autoname': 'field:dt', 'client_script_core': None, 'client_string': None, 'use_template': None, 'modified_by': 'Administrator', 'document_type': None, 'name': 'DocType Label', 'idx': None, 'hide_toolbar': None, 'colour': 'White:FFF', 'client_script': None, 'modified': '2010-09-20 14:06:57', 'server_code_error': ' ', 'name_case': '', 'parenttype': None, 'read_only_onload': None, 'server_code_core': None, 'server_code_compiled': None, 'parent_node': None, 'parentfield': None}, {'cancel': None, 'amend': None, 'execute': None, 'modified_by': 'Administrator', 'name': 'PERM01036', 'parent': 'DocType Label', 'read': 1, 'create': 1, 'creation': '2010-06-10 10:41:58', 'modified': '2010-06-10 10:44:09', 'submit': None, 'doctype': 'DocPerm', 'write': 1, 'idx': 1, 'parenttype': 'DocType', 'role': 'Administrator', 'owner': 'Administrator', 'docstatus': 0, 'permlevel': 0, 'match': None, 'parentfield': 'permissions'}, {'no_copy': None, 'oldfieldtype': 'Select', 'creation': '2010-06-10 10:41:58', 'doctype': 'DocField', 'oldfieldname': 'dt', 'owner': 'Administrator', 'reqd': 1, 'in_filter': None, 'print_hide': None, 'modified_by': 'Administrator', 'label': 'Select DocType', 'width': None, 'trigger': None, 'depends_on': None, 'docstatus': 0, 'hidden': None, 'permlevel': 0, 'description': None, 'parent': 'DocType Label', 'search_index': None, 'allow_on_submit': None, 'icon': None, 'name': 'FL05322', 'idx': 1, 'default': None, 'colour': None, 'modified': '2010-06-10 10:44:09', 'parenttype': 'DocType', 'fieldname': 'dt', 'fieldtype': 'Select', 'options': 'link:DocType', 'report_hide': None, 'parentfield': 'fields'}, {'no_copy': None, 'oldfieldtype': 'Data', 'creation': '2010-06-10 10:41:58', 'doctype': 'DocField', 'oldfieldname': 'dt_label', 'owner': 'Administrator', 'reqd': 1, 'in_filter': None, 'print_hide': None, 'modified_by': 'Administrator', 'label': 'DocType Label', 'width': None, 'trigger': None, 'depends_on': None, 'docstatus': 0, 'hidden': None, 'permlevel': 0, 'description': None, 'parent': 'DocType Label', 'search_index': None, 'allow_on_submit': None, 'icon': None, 'name': 'FL05323', 'idx': 2, 'default': None, 'colour': None, 'modified': '2010-06-10 10:44:09', 'parenttype': 'DocType', 'fieldname': 'dt_label', 'fieldtype': 'Data', 'options': None, 'report_hide': None, 'parentfield': 'fields'}]
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/doctype_property_setter/__init__.py b/erpnext/utilities/doctype/doctype_property_setter/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/utilities/doctype/doctype_property_setter/__init__.py
+++ /dev/null
diff --git a/erpnext/utilities/doctype/doctype_property_setter/doctype_property_setter.py b/erpnext/utilities/doctype/doctype_property_setter/doctype_property_setter.py
deleted file mode 100644
index 28eccd4..0000000
--- a/erpnext/utilities/doctype/doctype_property_setter/doctype_property_setter.py
+++ /dev/null
@@ -1,15 +0,0 @@
-class DocType:
- def __init__(self,d,dl):
- self.doc, self.doclist = d, dl
-
- def update_dt(self):
- sql("update tabDocType set module=%s, autoname=%s, read_only_onload=%s, section_style=%s, description=%s where name=%s limit 1", (self.doc.module, self.doc.autoname, self.doc.show_print_format_first, self.doc.page_style, self.doc.description, self.doc.select_doctype))
-
- def get_details(self):
- ret = sql("select module, autoname, read_only_onload, section_style, description from tabDocType where name=%s", (self.doc.select_doctype))
- self.doc.module = ret[0][0] or ''
- self.doc.autoname = ret[0][1] or ''
- self.doc.show_print_format_first = ret[0][2] or 0
- self.doc.page_style = ret[0][3] or 'Simple'
- self.doc.description = ret[0][4] or ''
-
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/doctype_property_setter/doctype_property_setter.txt b/erpnext/utilities/doctype/doctype_property_setter/doctype_property_setter.txt
deleted file mode 100644
index f0d17d8..0000000
--- a/erpnext/utilities/doctype/doctype_property_setter/doctype_property_setter.txt
+++ /dev/null
@@ -1,138 +0,0 @@
-# DocType, DocType Property Setter
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-08-08 17:08:59',
- 'docstatus': 0,
- 'modified': '2010-09-20 14:06:57',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all DocType
- {
- 'colour': 'White:FFF',
- 'doctype': 'DocType',
- 'issingle': 1,
- 'module': 'Utilities',
- 'name': '__common__',
- 'section_style': 'Simple',
- 'server_code_error': ' ',
- 'version': 4
- },
-
- # These values are common for all DocField
- {
- 'doctype': 'DocField',
- 'name': '__common__',
- 'parent': 'DocType Property Setter',
- 'parentfield': 'fields',
- 'parenttype': 'DocType',
- 'permlevel': 0
- },
-
- # These values are common for all DocPerm
- {
- 'create': 1,
- 'doctype': 'DocPerm',
- 'idx': 1,
- 'name': '__common__',
- 'parent': 'DocType Property Setter',
- 'parentfield': 'permissions',
- 'parenttype': 'DocType',
- 'permlevel': 0,
- 'read': 1,
- 'role': 'System Manager',
- 'write': 1
- },
-
- # DocType, DocType Property Setter
- {
- 'doctype': 'DocType',
- 'name': 'DocType Property Setter'
- },
-
- # DocPerm
- {
- 'doctype': 'DocPerm'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'select_doctype',
- 'fieldtype': 'Select',
- 'idx': 1,
- 'label': 'Select DocType',
- 'options': 'link:DocType'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'idx': 2,
- 'label': 'Get Details',
- 'options': 'get_details',
- 'trigger': 'Server'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'module',
- 'fieldtype': 'Link',
- 'idx': 3,
- 'label': 'Module',
- 'options': 'Module Def'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'autoname',
- 'fieldtype': 'Data',
- 'idx': 4,
- 'label': 'Autoname'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'page_style',
- 'fieldtype': 'Select',
- 'idx': 5,
- 'label': 'Page Style',
- 'options': 'Simple\nTabbed\nTray'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'show_print_format_first',
- 'fieldtype': 'Check',
- 'idx': 6,
- 'label': 'Show Print Format First'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldname': 'description',
- 'fieldtype': 'Text Editor',
- 'idx': 7,
- 'label': 'Description',
- 'width': '300px'
- },
-
- # DocField
- {
- 'doctype': 'DocField',
- 'fieldtype': 'Button',
- 'idx': 8,
- 'label': 'Update',
- 'options': 'update_dt',
- 'trigger': 'Server'
- }
-]
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/file_browser_control/file_browser_control.py b/erpnext/utilities/doctype/file_browser_control/file_browser_control.py
index d5ad0cc..8e0e3c4 100644
--- a/erpnext/utilities/doctype/file_browser_control/file_browser_control.py
+++ b/erpnext/utilities/doctype/file_browser_control/file_browser_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/utilities/doctype/menu_control/menu_control.js b/erpnext/utilities/doctype/menu_control/menu_control.js
index 96c4b3c..ce0b10f 100644
--- a/erpnext/utilities/doctype/menu_control/menu_control.js
+++ b/erpnext/utilities/doctype/menu_control/menu_control.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d,dl
diff --git a/erpnext/utilities/doctype/menu_control/menu_control.py b/erpnext/utilities/doctype/menu_control/menu_control.py
index 0718006..a6ab09a 100644
--- a/erpnext/utilities/doctype/menu_control/menu_control.py
+++ b/erpnext/utilities/doctype/menu_control/menu_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/utilities/doctype/patch_util/patch_util.py b/erpnext/utilities/doctype/patch_util/patch_util.py
index 828c805..19a5232 100644
--- a/erpnext/utilities/doctype/patch_util/patch_util.py
+++ b/erpnext/utilities/doctype/patch_util/patch_util.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/utilities/doctype/profile_control/profile_control.py b/erpnext/utilities/doctype/profile_control/profile_control.py
index b8db231..8f44bd2 100644
--- a/erpnext/utilities/doctype/profile_control/profile_control.py
+++ b/erpnext/utilities/doctype/profile_control/profile_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/utilities/doctype/rename_tool/rename_tool.js b/erpnext/utilities/doctype/rename_tool/rename_tool.js
index bcd156e..fe024c6 100644
--- a/erpnext/utilities/doctype/rename_tool/rename_tool.js
+++ b/erpnext/utilities/doctype/rename_tool/rename_tool.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// over-ride the link query to return relevant link names
cur_frm.fields_dict.document_to_rename.get_query = function(doc, dt, dn) {
diff --git a/erpnext/utilities/doctype/rename_tool/rename_tool.py b/erpnext/utilities/doctype/rename_tool/rename_tool.py
index ea12433..6c4b058 100644
--- a/erpnext/utilities/doctype/rename_tool/rename_tool.py
+++ b/erpnext/utilities/doctype/rename_tool/rename_tool.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
class DocType:
def __init__(self, d, dl=[]):
self.doc, self.doclist = d, dl
diff --git a/erpnext/utilities/doctype/reposting_tool/reposting_tool.js b/erpnext/utilities/doctype/reposting_tool/reposting_tool.js
index 8a1d41f..006ef9a 100644
--- a/erpnext/utilities/doctype/reposting_tool/reposting_tool.js
+++ b/erpnext/utilities/doctype/reposting_tool/reposting_tool.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
var bin_list = [];
var msg = [];
var binidx = 0;
diff --git a/erpnext/utilities/doctype/reposting_tool/reposting_tool.py b/erpnext/utilities/doctype/reposting_tool/reposting_tool.py
index 489a3b6..82df4e3 100644
--- a/erpnext/utilities/doctype/reposting_tool/reposting_tool.py
+++ b/erpnext/utilities/doctype/reposting_tool/reposting_tool.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/utilities/doctype/sms_center/sms_center.js b/erpnext/utilities/doctype/sms_center/sms_center.js
index abc52cf..45a6073 100644
--- a/erpnext/utilities/doctype/sms_center/sms_center.js
+++ b/erpnext/utilities/doctype/sms_center/sms_center.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
cur_frm.cscript.refresh = function(doc, cdt, cdn) {
if(doc.send_to == 'Customer Group')
unhide_field('customer_group_name');
diff --git a/erpnext/utilities/doctype/sms_center/sms_center.py b/erpnext/utilities/doctype/sms_center/sms_center.py
index 552e26d..a65c4cb 100644
--- a/erpnext/utilities/doctype/sms_center/sms_center.py
+++ b/erpnext/utilities/doctype/sms_center/sms_center.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/utilities/doctype/sms_control/sms_control.js b/erpnext/utilities/doctype/sms_control/sms_control.js
index c6cc53e..42d961f 100644
--- a/erpnext/utilities/doctype/sms_control/sms_control.js
+++ b/erpnext/utilities/doctype/sms_control/sms_control.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
function SMSManager() {
var me = this;
this.get_contact_number = function(contact, key, value) {
diff --git a/erpnext/utilities/doctype/sms_control/sms_control.py b/erpnext/utilities/doctype/sms_control/sms_control.py
index c595158..9d11283 100644
--- a/erpnext/utilities/doctype/sms_control/sms_control.py
+++ b/erpnext/utilities/doctype/sms_control/sms_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/utilities/doctype/trash_control/trash_control.py b/erpnext/utilities/doctype/trash_control/trash_control.py
index 228160e..2c1064e 100644
--- a/erpnext/utilities/doctype/trash_control/trash_control.py
+++ b/erpnext/utilities/doctype/trash_control/trash_control.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
# Please edit this list and import only required elements
import webnotes
diff --git a/erpnext/utilities/page/file_browser/__init__.py b/erpnext/utilities/page/calendar/__init__.py
similarity index 100%
rename from erpnext/utilities/page/file_browser/__init__.py
rename to erpnext/utilities/page/calendar/__init__.py
diff --git a/erpnext/utilities/page/calendar/calendar.css b/erpnext/utilities/page/calendar/calendar.css
new file mode 100644
index 0000000..9adae7a
--- /dev/null
+++ b/erpnext/utilities/page/calendar/calendar.css
@@ -0,0 +1,169 @@
+/**** CALENDAR ****/
+
+div.cal_body {
+ margin: 16px;
+ background-color: #DDD;
+ position: relative;
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ padding: 16px;
+ -moz-box-shadow: 1px 1px 8px #555;
+ -webkit-box-shadow: 1px 1px 8px #555;
+ box-shadow: 1px 1px 8px #555;
+}
+
+div.cal_body h4 {
+ text-align: center;
+}
+
+div.cal_head {
+ margin: 16px;
+ margin-bottom: 0px;
+}
+div.cal_head div {
+ font-size: 18px;
+ color: #666;
+ padding-top: 8px;
+}
+
+div.cal_toolbar {
+ width: 80%;
+}
+
+div.cal_toolbar .btn {
+ text-align: center;
+ margin: 0px;
+ margin-left: -1px;
+}
+
+div.cal_view_body {
+}
+
+div.cal_view_body_plain {
+ margin: 16px;
+}
+
+div.cal_month_head {
+ margin: 8px 0px 8px 0px;
+ height: 30px;
+}
+
+div.cal_month_head .btn {
+ float: right;
+}
+
+span.cal_view_title {
+ display: inline-block;
+ font-size: 20px;
+}
+
+div.cal_month_body {
+}
+
+.cal_month_headtable {
+ /*table-layout:fixed;*/
+ width: 100%;
+}
+
+.cal_month_name {
+ width: 100%;
+ color: #888;
+ font-size: 14px;
+ font-weight: bold;
+ text-align: center;
+}
+
+.cal_month_headtable tr td{
+ font-size: 12px;
+ font-weight: bold;
+ text-align: center;
+ padding: 4px;
+}
+
+table.cal_month_table {
+ border-collapse: collapse;
+ /*table-layout:fixed;*/
+ width: 100%;
+}
+
+table.cal_month_table td {
+ width: 14.29%;
+ height: 20%;
+ /*overflow:hidden;*/
+ padding:0px;
+}
+
+div.cal_month_date {
+ width:100%;
+ font-size: 10px;
+ /*background-color: #EEF;*/
+}
+
+div.cal_month_date_holiday {
+ /*background-color: #FFF;*/
+}
+
+div.cal_month_unit {
+ width:100%;
+ min-height: 100px;
+ overflow:hidden;
+ cursor:pointer;
+ /*background-color:#FFF;*/
+}
+
+div.cal_vu_disabled {
+ background-color:#FFF;
+ cursor:default;
+}
+
+table.cal_day_table {
+ border-collapse: collapse;
+ width: 100%;
+}
+
+table.cal_day_table td {
+}
+
+div.cal_day_body {
+ width: 100%;
+ overflow-x: hidden;
+ border-top: 1px solid #AAA;
+}
+
+div.cal_day_unit{
+ width:100%;
+ cursor:pointer;
+}
+
+table.cal_week_table {
+ border-collapse: collapse;
+ width: 100%;
+}
+
+table.cal_week_table td {
+ width: 12.5%;
+}
+
+div.cal_week_body {
+ width: 100%;
+ overflow-x: hidden;
+ border-top: 1px solid #888;
+}
+
+div.cal_week_unit{
+ width: 100%;
+ cursor:pointer;
+}
+
+div.cal_event_Public {
+ color: GREEN;
+}
+
+div.cal_event_Private {
+ color: BLUE;
+}
+
+div.cal_event_hover {
+ text-decoration: underline;
+}
diff --git a/erpnext/utilities/page/calendar/calendar.html b/erpnext/utilities/page/calendar/calendar.html
new file mode 100644
index 0000000..456566d
--- /dev/null
+++ b/erpnext/utilities/page/calendar/calendar.html
@@ -0,0 +1,26 @@
+<div class="cal_body">
+ <a class="close" onclick="window.history.back();">×</a>
+ <div class="cal_toolbar btn-group">
+ <button class="btn btn-small" onclick="erpnext.calendar.add_event()">
+ <i class="icon-plus"></i> Add Event
+ </button>
+ <button class="btn btn-small" onclick="erpnext.calendar.refresh('Day')">
+ Day View
+ </button>
+ <button class="btn btn-small" onclick="erpnext.calendar.refresh('Week')">
+ Week View
+ </button>
+ <button class="btn btn-small" onclick="erpnext.calendar.refresh('Month')">
+ Month View
+ </button>
+ </div>
+ <div class="cal_month_head">
+ <span class="cal_view_title"></span>
+ <button class="btn btn-small" onclick="erpnext.calendar.cur_view.next()">
+ <i class="icon-arrow-right"></i>
+ </button>
+ <button class="btn btn-small" onclick="erpnext.calendar.cur_view.prev()">
+ <i class="icon-arrow-left"></i>
+ </button>
+ </div>
+</div>
\ No newline at end of file
diff --git a/erpnext/utilities/page/calendar/calendar.js b/erpnext/utilities/page/calendar/calendar.js
new file mode 100644
index 0000000..ac1ac88
--- /dev/null
+++ b/erpnext/utilities/page/calendar/calendar.js
@@ -0,0 +1,680 @@
+// Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
+//
+// MIT License (MIT)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the "Software"),
+// to deal in the Software without restriction, including without limitation
+// the rights to use, copy, modify, merge, publish, distribute, sublicense,
+// and/or sell copies of the Software, and to permit persons to whom the
+// Software is furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+pscript.onload_calendar = function(wrapper) {
+ if(!erpnext.calendar) {
+ erpnext.calendar = new Calendar();
+ erpnext.calendar.init(wrapper);
+ rename_observers.push(erpnext.calendar);
+ }
+}
+
+///// CALENDAR
+
+Calendar=function() {
+ this.views=[];
+ this.events = {};
+ this.events_by_name = {};
+ this.weekdays = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
+}
+
+Calendar.prototype.init=function (parent) {
+
+ this.wrapper = parent;
+ this.body = $('.cal_body').get(0);
+
+ //this.make_head_buttons();
+ //this.make_header();
+ this.view_title = $('.cal_view_title').get(0);
+
+ this.todays_date = new Date();
+ this.selected_date = this.todays_date;
+ this.selected_hour = 8;
+
+ // Create views
+ this.views['Month'] = new Calendar.MonthView(this);
+ this.views['Week'] = new Calendar.WeekView(this);
+ this.views['Day'] = new Calendar.DayView(this);
+
+ // Month view as initial
+ this.cur_view = this.views['Month'];
+ this.views['Month'].show();
+
+}
+
+Calendar.prototype.rename_notify = function(dt, old_name, new_name) {
+ // calendar
+ if(dt = 'Event'){
+ if(this.events_by_name[old_name]) {
+ delete this.events_by_name[old_name];
+ }
+ }
+}
+
+//------------------------------------------------------
+
+Calendar.prototype.show_event = function(ev, cal_ev) {
+ var me = this;
+ if(!this.event_dialog) {
+ var d = new Dialog(400, 400, 'Calendar Event');
+ d.make_body([
+ ['HTML','Heading']
+ ,['Text','Description']
+ ,['Check', 'Public Event']
+ ,['Check', 'Cancel Event']
+ ,['HTML', 'Event Link']
+ ,['Button', 'Save']
+ ])
+
+ // show the event when the dialog opens
+ d.onshow = function() {
+ // heading
+ var c = me.selected_date;
+ var tmp = time_to_ampm(this.ev.event_hour);
+ tmp = tmp[0]+':'+tmp[1]+' '+tmp[2];
+
+ this.widgets['Heading'].innerHTML =
+ '<div style="text-align: center; padding:4px; font-size: 14px">'
+ + erpnext.calendar.weekdays[c.getDay()] + ', ' + c.getDate() + ' ' + month_list_full[c.getMonth()] + ' ' + c.getFullYear()
+ + ' - <b>'+tmp+'</b></div>';
+
+ // set
+ this.widgets['Description'].value = cstr(this.ev.description);
+
+ this.widgets['Public Event'].checked = false;
+ this.widgets['Cancel Event'].checked = false;
+
+ if(this.ev.event_type=='Public')
+ this.widgets['Public Event'].checked = true;
+
+ this.widgets['Event Link'].innerHTML = '';
+
+ // link
+ var div = $a(this.widgets['Event Link'], 'div', 'link_type', {margin:'4px 0px'});
+ div.onclick = function() { me.event_dialog.hide(); loaddoc('Event', me.event_dialog.ev.name); }
+ div.innerHTML = 'View Event details, add or edit participants';
+
+ }
+
+ // event save
+ d.widgets['Save'].onclick = function() {
+ var d = me.event_dialog;
+
+ // save values
+ d.ev.description = d.widgets['Description'].value;
+ if(d.widgets['Cancel Event'].checked)
+ d.ev.event_type='Cancel';
+ else if(d.widgets['Public Event'].checked)
+ d.ev.event_type='Public';
+
+ me.event_dialog.hide();
+
+ // if new event
+ me.save_event(d.ev);
+ }
+ this.event_dialog = d;
+ }
+ this.event_dialog.ev = ev;
+ this.event_dialog.cal_ev = cal_ev ? cal_ev : null;
+ this.event_dialog.show();
+
+}
+
+Calendar.prototype.save_event = function(doc) {
+ var me = this;
+ save_doclist('Event', doc.name, 'Save', function(r) {
+ var doc = locals['Event'][r.docname];
+ var cal = erpnext.calendar;
+ cal.cur_view.refresh();
+
+ // if cancelled, hide
+ if(doc.event_type=='Cancel') {
+ $(cal.events_by_name[doc.name].body).toggle(false);
+ }
+ });
+}
+
+//------------------------------------------------------
+
+Calendar.prototype.add_event = function() {
+
+ var ev = LocalDB.create('Event');
+ ev = locals['Event'][ev];
+
+ ev.event_date = dateutil.obj_to_str(this.selected_date);
+ ev.event_hour = this.selected_hour+':00';
+ ev.event_type = 'Private';
+
+ this.show_event(ev);
+}
+//------------------------------------------------------
+
+Calendar.prototype.get_month_events = function(call_back) {
+ // ret fn
+ var me = this;
+ var f = function(r, rt) {
+ if(me.cur_view) me.cur_view.refresh();
+ if(call_back)call_back();
+ }
+
+ //load
+ var y=this.selected_date.getFullYear(); var m = this.selected_date.getMonth();
+ if(!this.events[y] || !this.events[y][m]) {
+ $c('webnotes.widgets.event.load_month_events', args = {
+ 'month': m + 1,
+ 'year' : y},
+ f);
+ }
+}
+//------------------------------------------------------
+
+Calendar.prototype.get_daily_event_list=function(day) {
+ var el = [];
+ var d = day.getDate(); var m = day.getMonth(); var y = day.getFullYear()
+ if(this.events[y] && this.events[y][m] &&
+ this.events[y][m][d]) {
+ var l = this.events[y][m][d]
+ for(var i in l) {
+ for(var j in l[i]) el[el.length] = l[i][j];
+ }
+ return el;
+ }
+ else return [];
+}
+//------------------------------------------------------
+
+Calendar.prototype.set_event = function(ev) {
+ // don't duplicate
+ if(this.events_by_name[ev.name]) {
+ return this.events_by_name[ev.name];
+ }
+
+ var dt = dateutil.str_to_obj(ev.event_date);
+ var m = dt.getMonth();
+ var d = dt.getDate();
+ var y = dt.getFullYear();
+
+ if(!this.events[y]) this.events[y] = [];
+ if(!this.events[y][m]) this.events[y][m] = [];
+ if(!this.events[y][m][d]) this.events[y][m][d] = [];
+ if(!this.events[y][m][d][cint(ev.event_hour)])
+ this.events[y][m][d][cint(ev.event_hour)] = [];
+
+ var cal_ev = new Calendar.CalEvent(ev, this);
+ this.events[y][m][d][cint(ev.event_hour)].push(cal_ev);
+ this.events_by_name[ev.name] = cal_ev;
+
+ return cal_ev;
+}
+
+//------------------------------------------------------
+
+Calendar.prototype.refresh = function(viewtype){//Sets the viewtype of the Calendar and Calls the View class based on the viewtype
+ if(viewtype)
+ this.viewtype = viewtype;
+ // switch view if reqd
+ if(this.cur_view.viewtype!=this.viewtype) {
+ this.cur_view.hide();
+ this.cur_view = this.views[this.viewtype];
+ this.cur_view.in_home = false; // for home page
+ this.cur_view.show();
+ }
+ else{
+ this.cur_view.refresh(this);
+ }
+}
+
+//------------------------------------------------------
+
+Calendar.CalEvent= function(doc, cal) {
+ this.body = document.createElement('div');
+ this.link = $a(this.body, 'a', '', {}, locals['Event'][doc.name].description || '');
+ this.doc = doc;
+ var me = this;
+
+ this.link.onclick = function() {
+ if(me.doc.name) {
+ cal.show_event(me.doc, me);
+ }
+ }
+}
+
+Calendar.CalEvent.prototype.show = function(vu) {
+
+ var t = this.doc.event_type;
+ this.my_class = 'cal_event_'+ t;
+
+ if(this.body.parentNode)
+ this.body.parentNode.removeChild(this.body);
+ vu.body.appendChild(this.body);
+
+ // refresh
+ this.link.innerHTML = this.doc.description || '';
+ this.body.className = this.my_class;
+}
+
+
+// ----------
+
+Calendar.View =function() { this.daystep = 0; this.monthstep = 0; }
+Calendar.View.prototype.init=function(cal) {
+ this.cal = cal;
+ this.body = $a(cal.body, 'div', 'cal_view_body');
+ this.body.style.display = 'none';
+ this.create_table();
+}
+
+
+Calendar.View.prototype.show=function() {
+ this.get_events(); this.refresh(); this.body.style.display = 'block';
+}
+
+Calendar.View.prototype.hide=function() { this.body.style.display = 'none';}
+
+Calendar.View.prototype.next = function() {
+ var s = this.cal.selected_date;
+ this.cal.selected_date = new Date(s.getFullYear(), s.getMonth() + this.monthstep, s.getDate() + this.daystep);
+ this.get_events(); this.refresh();
+}
+
+Calendar.View.prototype.prev = function() {
+ var s = this.cal.selected_date;
+ this.cal.selected_date = new Date(s.getFullYear(), s.getMonth() - this.monthstep, s.getDate() - this.daystep);
+ this.get_events(); this.refresh();
+}
+
+Calendar.View.prototype.get_events = function() {
+ this.cal.get_month_events();
+}
+Calendar.View.prototype.add_unit = function(vu) {
+ this.viewunits[this.viewunits.length] = vu;
+}
+Calendar.View.prototype.refresh_units = function() {
+ // load the events
+ if(locals['Event']) {
+ for(var name in locals['Event']) {
+ this.cal.set_event(locals['Event'][name]);
+ }
+ }
+
+
+ for(var r in this.table.rows) {
+ for(var c in this.table.rows[r].cells) {
+ if(this.table.rows[r].cells[c].viewunit) {
+ this.table.rows[r].cells[c].viewunit.refresh();
+ }
+ }
+ }
+}
+
+// ................. Month View..........................
+Calendar.MonthView = function(cal) { this.init(cal); this.monthstep = 1; this.rows = 5; this.cells = 7; }
+Calendar.MonthView.prototype=new Calendar.View();
+Calendar.MonthView.prototype.create_table = function() {
+
+ // create head
+ this.head_wrapper = $a(this.body, 'div', 'cal_month_head');
+
+ // create headers
+ this.headtable = $a(this.head_wrapper, 'table', 'cal_month_headtable');
+ var r = this.headtable.insertRow(0);
+ for(var j=0;j<7;j++) {
+ var cell = r.insertCell(j);
+ cell.innerHTML = erpnext.calendar.weekdays[j]; $w(cell, (100 / 7) + '%');
+ }
+
+ this.main = $a(this.body, 'div', 'cal_month_body');
+ this.table = $a(this.main, 'table', 'cal_month_table');
+ var me = this;
+
+ // create body
+ for(var i=0;i<5;i++) {
+ var r = this.table.insertRow(i);
+ for(var j=0;j<7;j++) {
+ var cell = r.insertCell(j);
+ cell.viewunit = new Calendar.MonthViewUnit(cell);
+ }
+ }
+}
+
+Calendar.MonthView.prototype.refresh = function() {
+ var c =this.cal.selected_date;
+ var me=this;
+ // fill other days
+
+ var cur_row = 0;
+
+ var cur_month = c.getMonth();
+ var cur_year = c.getFullYear();
+
+ var d = new Date(cur_year, cur_month, 1);
+ var day = 1 - d.getDay();
+
+
+ // set day headers
+ var d = new Date(cur_year, cur_month, day);
+
+ this.cal.view_title.innerHTML = month_list_full[cur_month] + ' ' + cur_year;
+
+ for(var i=0;i<6;i++) {
+ if((i<5) || cur_month==d.getMonth()) { // if this month
+ for(var j=0;j<7;j++) {
+ var cell = this.table.rows[cur_row].cells[j];
+
+ if((i<5) || cur_month==d.getMonth()) { // if this month
+ cell.viewunit.day = d;
+ cell.viewunit.hour = 8;
+ if(cur_month == d.getMonth()) {
+ cell.viewunit.is_disabled = false;
+
+ if(same_day(this.cal.todays_date, d))
+ cell.viewunit.is_today = true;
+ else
+ cell.viewunit.is_today = false;
+
+ } else {
+ cell.viewunit.is_disabled = true;
+ }
+ }
+ // new date
+ day++;
+ d = new Date(cur_year, cur_month, day);
+ }
+ }
+ cur_row++;
+ if(cur_row == 5) {cur_row = 0;} // back to top
+ }
+ this.refresh_units();
+
+}
+ // ................. Daily View..........................
+Calendar.DayView=function(cal){ this.init(cal); this.daystep = 1; }
+Calendar.DayView.prototype=new Calendar.View();
+Calendar.DayView.prototype.create_table = function() {
+
+ // create body
+ this.main = $a(this.body, 'div', 'cal_day_body');
+ this.table = $a(this.main, 'table', 'cal_day_table');
+ var me = this;
+
+ for(var i=0;i<24;i++) {
+ var r = this.table.insertRow(i);
+ for(var j=0;j<2;j++) {
+ var cell = r.insertCell(j);
+ if(j==0) {
+ var tmp = time_to_ampm((i)+':00');
+ cell.innerHTML = tmp[0]+':'+tmp[1]+' '+tmp[2];
+ $w(cell, '10%');
+ } else {
+ cell.viewunit = new Calendar.DayViewUnit(cell);
+ cell.viewunit.hour = i;
+ $w(cell, '90%');
+ if((i>=7)&&(i<=20)) {
+ cell.viewunit.is_daytime = true;
+ }
+ }
+ }
+ }
+ }
+
+Calendar.DayView.prototype.refresh = function() {
+ var c =this.cal.selected_date;
+
+ // fill other days
+ var me=this;
+
+ this.cal.view_title.innerHTML = erpnext.calendar.weekdays[c.getDay()] + ', '
+ + c.getDate() + ' ' + month_list_full[c.getMonth()] + ' ' + c.getFullYear();
+
+ // headers
+ var d = c;
+
+ for(var i=0;i<24;i++) {
+ var cell = this.table.rows[i].cells[1];
+ if(same_day(this.cal.todays_date, d)) cell.viewunit.is_today = true;
+ else cell.viewunit.is_today = false;
+ cell.viewunit.day = d;
+ }
+ this.refresh_units();
+}
+
+// ................. Weekly View..........................
+Calendar.WeekView=function(cal) { this.init(cal); this.daystep = 7; }
+Calendar.WeekView.prototype=new Calendar.View();
+Calendar.WeekView.prototype.create_table = function() {
+
+ // create head
+ this.head_wrapper = $a(this.body, 'div', 'cal_month_head');
+
+ // day headers
+ this.headtable = $a(this.head_wrapper, 'table', 'cal_month_headtable');
+ var r = this.headtable.insertRow(0);
+ for(var j=0;j<8;j++) {
+ var cell = r.insertCell(j);
+ $w(cell, (100 / 8) + '%');
+ }
+
+ // hour header
+
+ // create body
+ this.main = $a(this.body, 'div', 'cal_week_body');
+ this.table = $a(this.main, 'table', 'cal_week_table');
+ var me = this;
+
+ for(var i=0;i<24;i++) {
+ var r = this.table.insertRow(i);
+ for(var j=0;j<8;j++) {
+ var cell = r.insertCell(j);
+ if(j==0) {
+ var tmp = time_to_ampm(i+':00');
+ cell.innerHTML = tmp[0]+':'+tmp[1]+' '+tmp[2];
+
+ $w(cell, '10%');
+ } else {
+ cell.viewunit = new Calendar.WeekViewUnit(cell);
+ cell.viewunit.hour = i;
+ if((i>=7)&&(i<=20)) {
+ cell.viewunit.is_daytime = true;
+ }
+ }
+ }
+ }
+}
+
+Calendar.WeekView.prototype.refresh = function() {
+ var c =this.cal.selected_date;
+ // fill other days
+ var me=this;
+
+ this.cal.view_title.innerHTML = month_list_full[c.getMonth()] + ' ' + c.getFullYear();
+
+ // headers
+ var d = new Date(c.getFullYear(), c.getMonth(), c.getDate() - c.getDay());
+
+ for (var k=1;k<8;k++) {
+ this.headtable.rows[0].cells[k].innerHTML = erpnext.calendar.weekdays[d.getDay()] + ' ' + d.getDate();
+
+ for(var i=0;i<24;i++) {
+ var cell = this.table.rows[i].cells[k];
+ if(same_day(this.cal.todays_date, d))
+ cell.viewunit.is_today = true;
+ else cell.viewunit.is_today = false;
+
+ cell.viewunit.day = d;
+ //cell.viewunit.refresh();
+ }
+ d=new Date(d.getFullYear(),d.getMonth(),d.getDate() + 1);
+
+ }
+
+ this.refresh_units();
+}
+
+//------------------------------------------------------.
+
+Calendar.ViewUnit = function() {}
+Calendar.ViewUnit.prototype.init = function(parent) {
+ parent.style.border = "1px solid #CCC" ;
+ this.body = $a(parent, 'div', this.default_class);
+ this.parent = parent;
+
+ var me = this;
+ this.body.onclick = function() {
+ erpnext.calendar.selected_date = me.day;
+ erpnext.calendar.selected_hour = me.hour;
+
+ if(erpnext.calendar.cur_vu && erpnext.calendar.cur_vu!=me){
+ erpnext.calendar.cur_vu.deselect();
+ me.select();
+ erpnext.calendar.cur_vu = me;
+ }
+ }
+ this.body.ondblclick = function() {
+ erpnext.calendar.add_event();
+ }
+}
+
+Calendar.ViewUnit.prototype.set_header=function(v) {
+ this.header.innerHTML = v;
+}
+
+Calendar.ViewUnit.prototype.set_today = function() {
+ this.is_today = true;
+ this.set_display();
+}
+
+Calendar.ViewUnit.prototype.clear = function() {
+ if(this.header)this.header.innerHTML = '';
+
+ // clear body
+ while(this.body.childNodes.length)
+ this.body.removeChild(this.body.childNodes[0]);
+}
+
+Calendar.ViewUnit.prototype.set_display = function() {
+ var cn = '#FFF';
+
+ // colors
+ var col_tod_sel = '#EEE';
+ var col_tod = '#FFF';
+ var col_sel = '#EEF';
+
+ if(this.is_today) {
+ if(this.selected) cn = col_tod_sel;
+ else cn = col_tod;
+ } else
+ if(this.selected) cn = col_sel;
+
+ if(this.header) {
+ if(this.is_disabled) {
+ this.body.className = this.default_class + ' cal_vu_disabled';
+ this.header.style.color = '#BBB';
+ } else {
+ this.body.className = this.default_class;
+ this.header.style.color = '#000';
+ }
+
+ if(this.day&&this.day.getDay()==0)
+ this.header.style.backgroundColor = '#FEE';
+ else
+ this.header.style.backgroundColor = '';
+ }
+ this.parent.style.backgroundColor = cn;
+}
+
+Calendar.ViewUnit.prototype.is_selected = function() {
+ return (same_day(this.day, erpnext.calendar.selected_date)
+ && this.hour==erpnext.calendar.selected_hour)
+}
+
+Calendar.ViewUnit.prototype.get_event_list = function() {
+ var y = this.day.getFullYear();
+ var m = this.day.getMonth();
+ var d = this.day.getDate();
+ if(erpnext.calendar.events[y] && erpnext.calendar.events[y][m] &&
+ erpnext.calendar.events[y][m][d] &&
+ erpnext.calendar.events[y][m][d][this.hour]) {
+ return erpnext.calendar.events[y][m][d][this.hour];
+ } else
+ return [];
+}
+
+Calendar.ViewUnit.prototype.refresh = function() {
+ this.clear();
+
+ if(this.is_selected()) {
+ if(erpnext.calendar.cur_vu)erpnext.calendar.cur_vu.deselect();
+ this.selected = true;
+ erpnext.calendar.cur_vu = this;
+ }
+ this.set_display();
+ this.el = this.get_event_list();
+ if(this.onrefresh)this.onrefresh();
+
+ for(var i in this.el) {
+ this.el[i].show(this);
+ }
+
+ var me = this;
+}
+
+Calendar.ViewUnit.prototype.select=function() { this.selected = true; this.set_display(); }
+Calendar.ViewUnit.prototype.deselect=function() { this.selected = false; this.set_display(); }
+Calendar.ViewUnit.prototype.setevent=function() { }
+
+Calendar.MonthViewUnit=function(parent) {
+ this.header = $a(parent, 'div' , "cal_month_date");
+ this.default_class = "cal_month_unit";
+
+ this.init(parent);
+
+ this.onrefresh = function() {
+ this.header.innerHTML = this.day.getDate();
+ }
+}
+Calendar.MonthViewUnit.prototype = new Calendar.ViewUnit();
+Calendar.MonthViewUnit.prototype.is_selected = function() {
+ return same_day(this.day, erpnext.calendar.selected_date)
+}
+
+Calendar.MonthViewUnit.prototype.get_event_list = function() {
+ return erpnext.calendar.get_daily_event_list(this.day);
+}
+
+Calendar.DayViewUnit= function(parent) {
+ this.default_class = "cal_day_unit"; this.init(parent);
+}
+Calendar.DayViewUnit.prototype = new Calendar.ViewUnit();
+Calendar.DayViewUnit.prototype.onrefresh = function() {
+ if(this.el.length<3)
+ this.body.style.height = '30px';
+ else this.body.style.height = '';
+}
+
+Calendar.WeekViewUnit=function(parent) {
+ this.default_class = "cal_week_unit"; this.init(parent);
+}
+Calendar.WeekViewUnit.prototype = new Calendar.ViewUnit();
+Calendar.WeekViewUnit.prototype.onrefresh = function() {
+ if(this.el.length<3) this.body.style.height = '30px';
+ else this.body.style.height = '';
+}
diff --git a/erpnext/utilities/page/file_browser/__init__.py b/erpnext/utilities/page/calendar/calendar.py
similarity index 100%
copy from erpnext/utilities/page/file_browser/__init__.py
copy to erpnext/utilities/page/calendar/calendar.py
diff --git a/erpnext/utilities/page/calendar/calendar.txt b/erpnext/utilities/page/calendar/calendar.txt
new file mode 100644
index 0000000..668c909
--- /dev/null
+++ b/erpnext/utilities/page/calendar/calendar.txt
@@ -0,0 +1,28 @@
+# Page, calendar
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-24 11:24:12',
+ 'docstatus': 0,
+ 'modified': '2012-02-24 11:24:12',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Utilities',
+ 'name': '__common__',
+ 'page_name': u'calendar',
+ 'standard': u'Yes',
+ 'title': u'Calendar'
+ },
+
+ # Page, calendar
+ {
+ 'doctype': 'Page',
+ 'name': u'calendar'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/utilities/page/file_browser/file_browser.html b/erpnext/utilities/page/file_browser/file_browser.html
deleted file mode 100644
index d30409e..0000000
--- a/erpnext/utilities/page/file_browser/file_browser.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<div style="margin: 0px;">
-<div id="fb_header"> </div>
-<!--
-<table style="border: 1px solid #cccccc; width: 100%; background-color: #dfe1fd; vertical-align: middle; border-collapse: collapse;" border="0">
-<tbody>
-<tr>
-<td style="width: 70%; padding-left: 8px;">
-<h2>File Browser</h2>
-</td>
-<td style="width: 30%; text-align: right; padding-right: 8px; vertical-align: middle;"><span class="link_type" title="Close"> <img style="cursor:pointer" mce_style="cursor:pointer" onclick="nav_obj.show_last_open()" src="images/icons/close.gif" mce_src="images/icons/close.gif" alt="" /> </span></td>
-</tr>
-</tbody>
-</table>
--->
-<div style="width: 100%;">
-<table style="border: 1px solid #cccccc; width: 100%; border-collapse: collapse;" border="0">
-<tbody>
-<tr>
-<td style="border: 1px solid #cccccc; padding: 8px; width: 40%; border-collapse: collapse;">
-<table style="width: 100%;" border="0">
-<tbody>
-<tr>
-<td id="fb_gen_action" style="width: 100%; vertical-align: middle;"> </td>
-</tr>
-<tr>
-<td id="fb_tree_div" style="width: 100%; padding-top: 20px;"> </td>
-</tr>
-</tbody>
-</table>
-</td>
-<td style="border: 1px solid #cccccc; padding: 8px; width: 60%; border-collapse: collapse;">
-<table style="width: 100%;" border="0">
-<tbody>
-<tr>
-<td id="fb_file_action" style="width: 100%; vertical-align: middle;"> </td>
-</tr>
-<tr>
-<td id="fb_grp_action" style="width: 100%; vertical-align: middle;"> </td>
-</tr>
-<tr>
-<td id="fb_display_div" style="width: 100%; vertical-align: middle;"> </td>
-</tr>
-<tr>
-<td id="unselect">
-<h2 style="color:#AAA">You have not selected anything.</h2>
-</td>
-</tr>
-</tbody>
-</table>
-</td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
\ No newline at end of file
diff --git a/erpnext/utilities/page/file_browser/file_browser.js b/erpnext/utilities/page/file_browser/file_browser.js
deleted file mode 100644
index 279bbed..0000000
--- a/erpnext/utilities/page/file_browser/file_browser.js
+++ /dev/null
@@ -1,992 +0,0 @@
-pscript['onload_File Browser'] = function(){
-
- // header and toolbar
- var h = new PageHeader('fb_header','File Management','Upload and share your file across users');
- //$dh(h.toolbar); $y(h.toolbar,{width:'0px', height:'0px'})
-
- if(!pscript.fb_tree)
- pscript.create_browser_tree();
- pscript.get_root_file_grps();
-
- pscript.create_action_widget();
- pscript.create_display_div();
-
- pscript.create_n_file_grp_obj();
- pscript.create_n_file_obj();
- pscript.create_attach_obj();
-
- pscript.get_all_roles();
-
- $ds(pscript.gen_div);
- $dh(pscript.grp_div);
- $dh(pscript.file_div);
-
- $ds($i('unselect'));
-}
-
-// Get all roles
-pscript.get_all_roles = function(){
- if(!pscript.fg_all_roles){
- var callback = function(r,rt){
- pscript.fg_all_roles = r.message ? r.message : '';
- pscript.create_share_obj();
- pscript.fg_share.make(r.message);
- }
- $c_obj('File Browser Control','get_all_roles','',callback);
- }
-}
-
-
-// Creating File Browser tree.
-pscript.create_browser_tree = function() {
-
- $i('fb_tree_div').innerHTML = '';
- var tree = new Tree($i('fb_tree_div'), '100%');
- pscript.fb_tree = tree;
-
- pscript.fb_tree.std_onclick = function(node) { /*pass*/ } // on click
- pscript.fb_tree.std_onexp = function(node) { /*PASS*/ } // on expand
-
- $ds(pscript.gen_div);
- $dh(pscript.grp_div);
- $dh(pscript.file_div);
-
- $dh(pscript.f_file_display);
-}
-
-// Creating a Share Privilege object.
-pscript.create_share_obj = function(){
-
- var d = new Dialog(400,400,'Assign Privilege');
- var me = d;
- d.inputs = {};
-
- d.make_body([
- ['HTML','Privilege','<div id="fg_share_div" style="overflow-y:auto; height:300px"></div>'],
- ['Button','Update']
- ]);
-
-
- d.make = function(all_roles){
- optn_header = make_table('fg_share_div',1,2,'100%',['60%','40%'],{padding:'4px'});
-
- for(var c=0;c<2;c++){
- if(c==1)
- $td(optn_header,0,c).innerHTML = '<b>Privilege</b>';
- else
- $td(optn_header,0,c).innerHTML = '<b>Role</b>';
- }
-
- optn_tbl = make_table('fg_share_div',all_roles.length,2,'100%',['60%','40%'],{padding:'4px'});
-
- for(var i=0;i<all_roles.length;i++){
-
- var v=$a($td(optn_tbl, i,0),'div');
- v.innerHTML=all_roles[i];
-
- // make select
- var sel = $a($td(optn_tbl, i,1),'select');
- add_sel_options(sel,['None','Edit','View'],'None');
-
- sel.r_nm = all_roles[i];
- d.inputs[sel.r_nm] = sel;
-
- sel.onchange = function(){}
- }
- }
-
- // Assigning roles in Share Privilege object.
- d.assign = function(all_roles,edit_roles,view_roles){
-
- if(all_roles == undefined) all_roles = '';
- if(edit_roles == undefined) edit_roles = '';
- if(view_roles == undefined) view_roles = '';
-
- for(var i=0;i<all_roles.length;i++){
- var ele = all_roles[i];
- var sel = me.inputs[ele];
-
- if(in_list(edit_roles,ele))
- sel.value = 'Edit';
- else if(in_list(view_roles,ele))
- sel.value = 'View';
- else
- sel.value = 'None';
- }
- }
-
- //on update
- d.widgets['Update'].onclick = function(){
- var edit_roles = []; var view_roles = [];
-
- for(var i=0;i<pscript.fg_all_roles.length;i++){
- var ele = pscript.fg_all_roles[i]; var sel = me.inputs[ele];
-
- if(sel_val(sel) == 'Edit')
- edit_roles.push(ele)
- else if(sel_val(sel) == 'View')
- view_roles.push(ele)
- }
-
- var args = {}; args.name = pscript.f_cur_node_name; args.type = pscript.f_cur_node_type;
- args.edit_roles = edit_roles.join(','); args.view_roles = view_roles.join(',');
-
- $c_obj('File Browser Control','update_privileges',docstring(args),function(r,rt){me.hide();});
- }
-
- d.onshow = function(){}
- d.onhide = function(){}
- pscript.fg_share = d;
-}
-
-// Action Widget
-pscript.create_action_widget = function(){
-
- // General Actions.
- // new action widget
- pscript.gen_div = $i('fb_gen_action');
-
- //refresh tree
- f_refresh = $a(pscript.gen_div,'span','',{marginRight:'15px'});
- f_refresh.innerHTML = '<img src="images/icons/page_refresh.gif" style="margin-right:5px; vertical-align:middle"/><span class="link_type" style="vertical-align:middle">Refresh</span>';
- f_refresh.onclick = function(){
- pscript.fb_refresh();
- $dh(pscript.f_file_display);
- }
-
- // new group
- f_new_grp = $a(pscript.gen_div,'span','',{marginRight:'15px'});
- f_new_grp.innerHTML = '<img src="images/icons/folder.gif" style="margin-right: 5px; vertical-align:middle"><span class="link_type" style="vertical-align:middle">New</span>';
- f_new_grp.onclick = function(){ pscript.fb_show_grp(''); $ds(pscript.f_file_display); $dh($i('unselect')); }
-
- // Group actions.
- pscript.grp_div = $i('fb_grp_action');
-
- // share group
- f_share_grp = $a(pscript.grp_div,'span','',{marginRight:'15px'});
- f_share_grp.innerHTML = '<img src="images/icons/user.png" style="margin-right: 5px; vertical-align:middle"><span class="link_type" style="vertical-align:middle">Share</span>';
- f_share_grp.onclick = function(){ pscript.fb_share(); }
-
- //Delete group.
- f_del_grp = $a(pscript.grp_div,'span','',{marginRight:'15px'});
- f_del_grp.innerHTML = '<img src="images/icons/cancel.gif" style="margin-right: 5px; vertical-align:middle"><span class="link_type" style="vertical-align:middle">Delete</span>';
- f_del_grp.onclick = function(){ pscript.fb_delete(); }
-
- // Add file to group.
- f_new_file = $a(pscript.grp_div,'span','',{marginRight:'15px'});
- f_new_file.innerHTML = '<img src="images/icons/page_add.gif" style="margin-right: 5px; vertical-align:middle"><span class="link_type" style="vertical-align:middle">Upload</span>';
- f_new_file.onclick = function(){ pscript.fb_create_new_file(); }
- // $dh(f_new_file);
-
- // file actions
- pscript.file_div = $i('fb_file_action');
-
-
- //share file
- f_share_file = $a(pscript.file_div,'span','',{marginRight:'15px'});
- f_share_file.innerHTML = '<img src="images/icons/user.png" style="margin-right: 5px; vertical-align:middle"><span class="link_type" style="vertical-align:middle">Share</span>';
- f_share_file.onclick = function(){ pscript.fb_share(); };
-
- // delete file
- f_del_file = $a(pscript.file_div,'span','',{marginRight:'15px'});
- f_del_file.innerHTML = '<img src="images/icons/cancel.gif" style="margin-right: 5px; vertical-align:middle"><span class="link_type" style="vertical-align:middle">Delete</span>';
- f_del_file.onclick = function(){ pscript.fb_delete(); };
-
-
- //edit file
- f_edit_file = $a(pscript.file_div,'span','',{marginRight:'15px'});
- f_edit_file.innerHTML = '<img src="images/icons/table_edit.png" style="margin-right: 5px; vertical-align:middle"><span class="link_type" style="vertical-align:middle">Edit</span>';
- f_edit_file.onclick = function(){ pscript.fb_edit_file(); };
-}
-
-
-// Refresh tree
-pscript.fb_refresh = function(){
- pscript.create_browser_tree();
- pscript.get_root_file_grps();
-
- $ds(pscript.gen_div);
- $dh(pscript.grp_div);
- $dh(pscript.file_div);
-
- if(!pscript.f_cur_node_name){ $dh($i('unselect')); } else{ $ds($i('unselect')); }
-}
-
-// Show selected / create a new file group.
-pscript.fb_show_grp = function(grp){
- var parent = pscript.f_file_display;
-
- if(!grp || grp == undefined){
- parent.f_file_title.innerHTML = 'New File Group';
- pscript.n_file_grp.show('');
- }
- else{
- var callback = function(r,rt){
-
- var grp_det = r.message ? r.message : '';
-
- parent.f_file_title.innerHTML = grp_det['Group Name'];
- if(has_common(grp_det['Can Edit'].split(','),user_roles) || user==grp_det['Owner']){ $ds(pscript.grp_div); }
- else{ $dh(pscript.grp_div); }
-
- pscript.n_file_grp.show(grp_det);
- }
- $c_obj('File Browser Control','get_fg_details',grp,callback);
- }
- $ds(parent); $ds(parent.f_file_content);
-}
-
-//share privileges.
-pscript.fb_share = function(){
- var callback = function(r,rt){
- pscript.fg_edit_roles = r.message[0][0] ? r.message[0][0].split(',') : '';
- pscript.fg_view_roles = r.message[0][1] ? r.message[0][1].split(',') : '';
-
- pscript.fg_share.assign(pscript.fg_all_roles,pscript.fg_edit_roles,pscript.fg_view_roles);
- pscript.fg_share.show();
- }
- var args = {};
- args.dt = pscript.f_cur_node_type;
- args.dn = pscript.f_cur_node_name;
- $c_obj('File Browser Control','get_privileges',docstring(args),callback);
-}
-
-// delete group
-pscript.fb_delete = function(){
- pscript.delete_node('File Browser Control',pscript.f_cur_node_type,pscript.f_cur_node_name,'');
- $dh(pscript.f_file_display);
-}
-
-// Create a new file.
-pscript.fb_create_new_file = function(){
- var parent = pscript.f_file_display;
-
- pscript.f_cur_parent = pscript.f_cur_node;
-
- parent.f_file_title.innerHTML = 'New File';
- pscript.n_file.show(0,'frm_node');
-}
-
-// If file other than image then download file.
-pscript.fb_show_txt_file = function(){
- $i('file_link').href = repl('cgi-bin/getfile.cgi?ac=%(acc)s&name=%(f_nm)s',{acc:session.account_name, f_nm:pscript.f_cur_node_file});
- $i('file_link').target = "_blank";
-}
-
-// Area to display content.
-pscript.create_display_div = function(){
-
- var d = $a($i('fb_display_div'),'div');
-
- d.f_file_title = $a(d,'div','',{fontSize:'14px',fontWeight:'bold'});
- $y($a(d,'div'),{margin:'5px 0px 5px 0px',borderBottom:'1px solid #333'});
-
- d.f_file_content = $a(d,'div','',{marginTop:'20px'});
- pscript.f_file_display = d;
- $dh(d);
-}
-
-// function to create a new File Group object.
-pscript.create_n_file_grp_obj = function(){
- var n_file_grp = new pscript.n_file_grp_Obj();
- pscript.n_file_grp = n_file_grp;
-}
-
-// Create a new File object.
-pscript.create_n_file_obj = function(){
- var n_file = new pscript.n_file_Obj();
- pscript.n_file = n_file;
-}
-
-// Create a new Attachement object.
-pscript.create_attach_obj = function(){
- var attach_obj = new pscript.attach_Obj();
- pscript.attach_obj = attach_obj;
-}
-
-// File Group object.
-pscript.n_file_grp_Obj = function() {
-
- this.inputs = {}; var me = this; this.fg_field_lst = [];
-
- this.make_section = function(label, tp, css) {
-
- var div = $a(this.wrapper,'div','',{marginBottom:'8px'});
- var t = make_table(div,1,2,'90%',['35%','65%']);
-
- if(tp=='button'){
- var element = $a($td(t,0,1), 'button', 'button');
- element.innerHTML = label;
- }
- else if(tp == 'link'){
- var element = make_field({fieldtype:'link', 'label':label, 'options':'File Group'}, '', $td(t,0,1), this, 0, 1);
- $y($td(t,0,1),{width:'100%'})
- element.in_filter = 1; element.refresh();
-
- $td(t,0,0).innerHTML = label;
- element.display_div = $a($td(t,0,1),'div', '', {width:'80%'});
- me.fg_field_lst.push(label);
- }
- else {
- var element = $a($td(t,0,1),tp, '', {width:'80%'});
- $td(t,0,0).innerHTML = label;
-
- element.display_div = $a($td(t,0,1),'div', '', {width:'80%'});
- $dh(element.display_div);
- me.fg_field_lst.push(label);
- }
-
- if(css){
- $y($td(t,0,0),css);
- }
-
- element.wrapper = div;
-
- if(label) me.inputs[label] = element;
- return element;
- }
-
- this.make = function() {
-
- this.wrapper = document.createElement('div');
-
- this.make_section('Group Name','input',{color:'red'});
- this.make_section('Parent Group','link');
- this.make_section('Description','textarea');
- $y(this.inputs['Description'],{height:'140px'});
-
- this.make_section('Save','button');
-
- // cancel
- this.inputs['Cancel'] = $a(this.inputs['Save'].parentNode, 'button', 'button');
- this.inputs['Cancel'].innerHTML = 'Cancel';
- $y(this.inputs['Cancel'], {marginLeft:'8px'});
- }
-
- this.show = function(grp_det){
-
- if(! me.wrapper) me.make();
-
- var field_lst = me.fg_field_lst;
-
- if(!grp_det || grp_det == undefined){
- pscript.fg_edit_roles = ''; pscript.fg_view_roles = ''; me.inputs['Save'].disabled = false;
-
- for(i in field_lst){
- var fld_nm = field_lst[i] ? field_lst[i] : '';
- var fld = me.inputs[fld_nm] ? me.inputs[fld_nm] : '';
- fld.display_div.innerHTML = '';
-
- if(fld_nm == 'Parent Group'){ fld.txt.value = ''; $ds(fld.input_area); }
- else{ fld.value = ''; $ds(fld); }
-
- $dh(fld.display_div);
- }
- me.inputs['Save'].onclick = function(){ me.save(''); }
- }
- else{
- pscript.fg_edit_roles = grp_det['Can Edit'] ? grp_det['Can Edit'].split(',') : '';
- pscript.fg_view_roles = grp_det['Can View'] ? grp_det['Can View'].split(',') : '';
- for(i in field_lst){
- var fld_nm = field_lst[i] ? field_lst[i] : '';
- var fld = me.inputs[fld_nm] ? me.inputs[fld_nm] : '';
- fld.display_div.innerHTML = grp_det[fld_nm] ? grp_det[fld_nm] : '';
-
- if(fld_nm == 'Parent Group') fld.txt.value = grp_det[fld_nm] ? grp_det[fld_nm] : '';
- else fld.value = grp_det[fld_nm] ? grp_det[fld_nm] : '';
-
- if(has_common(pscript.fg_edit_roles,user_roles) || user == grp_det['Owner']){
- if(fld_nm == 'Parent Group') $ds(fld.input_area); else $ds(fld);
- $dh(fld.display_div); me.inputs['Save'].disabled = false;
- }
- else{
- if(fld_nm == 'Parent Group') $dh(fld.input_area); else $dh(fld);
- $ds(fld.display_div); me.inputs['Save'].disabled = true;
- }
- }
- me.inputs['Save'].onclick = function(){ me.save(grp_det['Name']); }
- }
- me.show_as();
- me.inputs['Cancel'].onclick = function() { me.cancel(); me.hide();}
- }
-
- this.save = function(name) {
- var grp_nm = me.inputs['Group Name'].value; grp_nm = strip(grp_nm," ");
- var parent_grp = me.inputs['Parent Group'].get_value(); parent_grp = strip(parent_grp," ");
- var desc = me.inputs['Description'].value; desc = strip(desc," ");
-
- if(grp_nm == '') msgprint('Please enter group name');
- else{ var args = {}; args.grp_nm = grp_nm; args.parent_grp = parent_grp; args.desc = desc; }
-
- if(!name || name == undefined){
- args.name = '';
- var callback = function(r,rt){
- pscript.f_cur_node_name = r.message ? r.message : '';
- pscript.fb_show_grp(pscript.f_cur_node_name);
- pscript.fb_refresh();
- //if(!pscript.f_cur_parent){ pscript.fb_refresh(); pscript.f_cur_node_name = }
- //else{ pscript.load_child_nodes(); }
- }
- $c_obj('File Browser Control','create_new_grp',docstring(args),callback);
- }
- else{
- args.name = name;
- var callback = function(r,rt){
- var grp = r.message ? r.message : '';
- pscript.fb_show_grp(grp);
- pscript.fb_refresh();
- }
- $c_obj('File Browser Control','update_grp',docstring(args),callback);
- }
-
- }
-
- this.cancel = function(){
- $dh(pscript.f_file_display);this.hide();
- }
-
- this.show_as = function() {
- if(me.wrapper.parentNode) me.wrapper.parentNode.removeChild(me.wrapper);
-
- var parent = pscript.f_file_display;
- pscript.remove_child_nodes(parent.f_file_content);
-
- parent.f_file_content.appendChild(me.wrapper);
- $ds(pscript.f_file_display); $ds(me.wrapper);
- }
-
- this.hide = function() {
- $dh(me.wrapper); me.display = 0;
- }
-}
-
-// File Object.
-pscript.n_file_Obj = function() {
-
- this.inputs = {};
- var me = this;
-
- this.make_section = function(label, tp, css) {
-
- var div = $a(this.wrapper,'div','',{marginBottom:'8px'});
- var t = make_table(div,1,2,'90%',['38%','62%']);
-
- if(tp=='button'){
- var element = $a($td(t,0,1), 'button', 'button');
- element.innerHTML = label;
- }
- else if(tp=='Note'){
- var element = $a($td(t,0,1),'span','',{color:'red'});
- element.innerHTML = 'Fields in red are mandatory.'
- }
- else if(tp=='link'){
- var element = make_field({fieldtype:'link', 'label':label, 'options':'File Group'}, '', $td(t,0,1), this, 0, 1);
- $y($td(t,0,1),{width:'100%'})
- element.in_filter = 1; element.refresh();
-
- $td(t,0,0).innerHTML = label;
- element.display_div = $a($td(t,0,1),'div', '', {width:'80%'});
- element.txt.onchange = function(){ pscript.set_file_det_value(pscript.attach_obj,pscript.n_file); }
- }
- else {
- var element = $a($td(t,0,1),tp, '', {width:'95%'});
- $td(t,0,0).innerHTML = label;
- element.onchange = function(){ pscript.set_file_det_value(pscript.attach_obj,pscript.n_file); }
- }
-
- //---css to label---
- if(css){
- $y($td(t,0,0),css);
- }
-
- element.wrapper = div;
-
- if(label) me.inputs[label] = element;
- return element;
- }
-
- this.make = function() {
-
- this.wrapper = document.createElement('div');
-
- // note
- this.make_section('','Note');
-
- // upload area
- this.ul_area = $a(this.wrapper,'div','',{marginBottom:'8px'});
- $dh(this.ul_area);
-
- // file group and description
- this.make_section('File Group','link',{color:'red'});
- this.make_section('Description','textarea');
- $y(this.inputs['Description'],{height:'140px'});
-
- //save
- this.make_section('Save','button');$dh(this.inputs['Save']);
-
- // cancel
- this.inputs['Cancel'] = $a(this.inputs['Save'].parentNode, 'button', 'button');
- this.inputs['Cancel'].innerHTML = 'Cancel'; $dh(this.inputs['Cancel']);
- $y(this.inputs['Cancel'], {marginLeft:'8px'});
- }
-
- this.show = function(edit,frm){
- if(! me.wrapper) me.make();
-
- if(edit){
- var callback1 = function(r,rt){
- file_det = r.message;
-
- me.inputs['Description'].value = file_det['description'] ? file_det['description'] : '';
- me.inputs['File Group'].txt.value = file_det['file_group'] ? file_det['file_group'] : '';
-
- pscript.f_cur_node_file = file_det['file_list'] ? file_det['file_list'].split(NEWLINE)[0].split(',')[1] : '';
-
- me.inputs['Save'].file_id = file_det['name'] ? file_det['name'] : '';
- me.inputs['Save'].onclick = function(){ me.save(this.file_id);}
- pscript.attach_obj.show(me, me.ul_area, 1, file_det);
- }
- $ds(me.ul_area); $di(me.inputs['Save']); $di(me.inputs['Cancel']);
- $c_obj('File Browser Control','get_file_details',pscript.f_cur_node_name,callback1);
- }
- else{
- $ds(me.ul_area); $dh(me.inputs['Save']); $dh(me.inputs['Cancel']);
-
- me.inputs['Description'].value = '';
- if(frm == 'frm_node') me.inputs['File Group'].txt.value = pscript.f_cur_node_label;
- var parent = pscript.f_file_display;
- parent.f_file_title.innerHTML = 'New File';
-
- $ds(parent);
- me.inputs['Save'].onclick = function(){ me.save('');}
- pscript.attach_obj.show(me,me.ul_area,0,'');
- }
- me.inputs['Cancel'].onclick = function() { me.cancel(); me.hide(); }
- }
-
- this.save = function(name) {
-
- var desc = me.inputs['Description'].value; desc = strip(desc," ");
- file_grp = me.inputs['File Group'].txt.value; file_grp = strip(file_grp," ");
-
- if(file_grp == '') msgprint('Please select file group');
-
- var args = {}; args.desc = desc; args.file_grp = file_grp;
-
- if(name){
- args.name = name;
- var callback = function(){
- //pscript.fb_edit_file();
-
- //refreshing parent
- pscript.load_child_nodes();
- }
- $c_obj('File Browser Control','update_file',docstring(args),callback);
- }
- else{
- args.name = ''
- var callback = function(r,rt){
- var f = eval('var a='+r.message+';a');
-
- //refreshing node
- pscript.load_child_nodes();
-
- //pscript.f_cur_node_name = f.name; pscript.f_cur_node_label = f.label;
- //pscript.fb_edit_file();
- }
- $c_obj('File Browser Control','create_new_file',docstring(args),callback);
- }
- }
-
- this.cancel = function(){
- $dh(pscript.f_file_display); this.hide();
- }
-
- this.show_as = function(edit) {
- if(me.wrapper.parentNode) me.wrapper.parentNode.removeChild(me.wrapper);
-
- var parent = pscript.f_file_display;
- pscript.remove_child_nodes(parent.f_file_content);
-
- parent.f_file_content.appendChild(me.wrapper);
- $ds(pscript.f_file_display); $ds(parent.f_file_content);
- $ds(me.wrapper);
- }
-
- this.hide = function() {
- $dh(me.wrapper);
- me.display = 0;
- }
-}
-
-// File Attachement object.
-pscript.attach_Obj = function(){
-
- var me = this;
-
- this.show = function(obj,parent,edit,dict){
- var me = this;
- if(!me.wrapper) { me.make(); }
-
- me.show_as(obj,parent,edit,dict);
- obj.show_as(edit);
- }
-
- this.make = function(){
- var me = this;
- this.wrapper = document.createElement('div');
-
- var div = $a(this.wrapper,'div',{marginBottom:'8px', border:'1px solid #AAA'});
-
- var t1 = make_table(div,1,2,'90%',['38%','62%']);
-
- lbl_area = $a($td(t1,0,0),'div');
- lbl_area.innerHTML = '<img src="images/icons/paperclip.gif"><span style="margin-left4px; color:red;">File:</span><br>';
-
- main_area = $a($td(t1,0,1),'div');
-
- this.upload_div = $a(main_area,'div');
- this.download_div = $a(main_area,'div');
-
- me.make_ul_area();
- me.make_dl_area();
- }
-
- //image upload area
- this.make_ul_area = function(){
- var me = this;
-
- this.upload_div.innerHTML = '';
-
- var div = $a(this.upload_div,'div');
- div.innerHTML = '<iframe id="fb_iframe" name="fb_iframe" src="blank1.html" style="width:0px; height:0px; border:0px"></iframe>';
-
- var div = $a(this.upload_div,'div');
- div.innerHTML = '<form method="POST" enctype="multipart/form-data" action="'+outUrl+'" target="fb_iframe"></form>';
-
- var ul_form = div.childNodes[0];
-
- this.upload_div.ul_form = ul_form;
-
- var f_list = [];
-
- // file data
- var inp_fdata = $a_input($a(ul_form,'span'),'file',{name:'filedata'});
-
- var inp_btn = $a_input($a(ul_form,'span'),'hidden',{name:'cmd'}); inp_btn.value = 'upload_many';
- var inp = $a_input($a(ul_form,'span'),'hidden',{name:'form_name'}); inp.value = 'File Browser';
- var inp = $a_input($a(ul_form,'span'),'submit'); inp.value = 'Upload';
-
- this.inp_file = $a_input($a(ul_form,'span'),'hidden',{name:'file_id'});
- this.file_det = $a_input($a(ul_form,'span'),'hidden',{name:'file_det'});
-
- inp_btn.onclick = function(){
- pscript.set_file_det_value(pscript.attach_obj,pscript.n_file);
- }
- }
-
- //download link
- this.make_dl_area = function(){
- var me = this;
- var download_tbl = make_table(this.download_div,1,2,'100%',['70%','30%']);
-
- var download_link = $a($td(download_tbl,0,0),'a','link_type');
-
- this.download_div.download_link = download_link;
-
- var remove_link = $a($td(download_tbl,0,1),'span','link_type',{textAlign:'right',marginLeft:'20px'});
- remove_link.innerHTML = 'Remove';
-
- this.download_div.remove_link = remove_link;
- }
-
- this.show_as = function(obj,parent,edit,dict){
- var me = this;
-
- // add to parent
- if(me.wrapper.parentNode) me.wrapper.parentNode.removeChild(me.wrapper);
- parent.appendChild(me.wrapper);
- $ds(me.wrapper);
-
- if(edit){
- pscript.set_file_det_value(pscript.attach_obj,pscript.n_file);
- me.inp_file.value = dict.name ? dict.name : '';
-
- if(dict.file_list){ $dh(me.upload_div); $ds(me.download_div); }
- else{ $ds(me.upload_div); $dh(me.download_div); }
-
- // download
- me.download_div.download_link.innerHTML = dict.file_list ? dict.file_list.split(',')[0] : '';
- me.download_div.download_link.onclick = function(){
- this.href = repl('cgi-bin/getfile.cgi?ac=%(acc)s&name=%(f_nm)s',{acc:session.account_name, f_nm:pscript.f_cur_node_file});
- this.target = "_blank";
- }
-
- // remove
- me.download_div.remove_link.onclick = function(){
- $c_obj('File Browser Control','remove_file',docstring(dict),function(r,rt){
- pscript.n_file.show(0,'frm_remove');
- });
- $ds(me.upload_div); $dh(me.download_div);
- }
- }
- else{
- $ds(me.upload_div); $dh(me.download_div);
- me.inp_file.value = '';
- pscript.set_file_det_value(pscript.attach_obj,pscript.n_file);
- }
- }
-}
-
-// Get all root file groups(where Parent Group is null).
-pscript.get_root_file_grps = function(){
-
- if (pscript.fb_tree){
- pscript.fb_tree.body.innerHTML = '';
- }
-
- var callback1 = function(r,rt){
- var cl = r.message ? r.message : ''; var n = pscript.fb_tree.allnodes[cl]; var has_children = true;
-
- for(var i=0; i<cl.length;i++){
- if(!cl[i][2] || cl[i][2] == undefined) cl[i][2] = ''; if(!cl[i][3] || cl[i][3] == undefined) cl[i][3] = '';
- if(has_common(cl[i][2].split(','),user_roles) || has_common(cl[i][3].split(','),user_roles) || user == cl[i][4]){
- var r = pscript.fb_tree.addNode(null, cl[i][0],'', pscript.show_hide_link , has_children ? pscript.fb_get_children : null, null, cl[i][1]);
- r.rec = cl[i]; r.rec.name = cl[i][0]; r.rec.label = cl[i][1]; r.rec.parent_grp = ''; r.rec.file_list = ''; r.rec.type = 'File Group';
- }
- }
- }
- $c_obj('File Browser Control','get_root_file_grps','',callback1);
-}
-
-// Onclick of a tree node will show / hide corresponding actions from action widget.
-pscript.show_hide_link = function(node){
-
- $dh($i('unselect'));
- $dh(pscript.f_file_display);
-
- pscript.f_cur_node = node;
-
- if(node.parent){
- pscript.f_cur_parent = node.parent;
- }
- else{ pscript.f_cur_parent = ''; }
-
- pscript.f_cur_node_name = node.rec.name;
-
- if(node.rec.label){ pscript.f_cur_node_label = node.rec.label; }
- else{ pscript.f_cur_node_label = ''; }
-
- if(node.rec.type){ pscript.f_cur_node_type = node.rec.type; }
- else{ pscript.f_cur_node_type = ''; }
-
- if(node.rec.file_list){ pscript.f_cur_node_file = node.rec.file_list.split(NEWLINE)[0].split(',')[1]; }
- else{ pscript.f_cur_node_file = ''; }
-
- img_extns = ['jpg','jpeg','gif','png','biff','cgm','dpof','exif','img','mng','pcx','pic','pict','raw','tga','wmf']
- extn = node.rec.file_list ? node.rec.file_list.split(NEWLINE)[0].split(',')[0].split('.')[1] : '';
-
- var dsp_div = pscript.f_file_display;
- dsp_div.f_file_title.innerHTML = pscript.f_cur_node_label;
-
- if(node.rec.type == 'File Group'){
- $dh(pscript.file_div);
- $ds(pscript.grp_div);
- pscript.fb_show_grp(pscript.f_cur_node_name);
- }
- else if(node.rec.type == 'File'){
- $dh(pscript.grp_div);
- $ds(pscript.file_div);
- if(pscript.f_cur_node_file){
- if(inList(img_extns,extn)){
- pscript.fb_show_img();
- }
- else{
- // IE FIX
- pscript.remove_child_nodes(dsp_div.f_file_content);
-
- var div = document.createElement('div');
- div.innerHTML = '<a class="link_type" onclick="pscript.fb_show_txt_file()" id="file_link">Click to Open/ Download file.</span>';
- dsp_div.f_file_content.appendChild(div);
- $ds(dsp_div);
- }
- }
- else{
- dsp_div.f_file_content.innerHTML = 'No attachement found.';
- $ds(pscript.f_file_display);
-
- $ds(pscript.file_div);
- $dh(pscript.grp_div);
- }
- pscript.show_edit_file_link(node.rec.name);
- }
- else{
- $dh(pscript.grp_div);
- $dh(pscript.file_div);
- }
-}
-
-// Onexpand of a tree node get all childrens(Files / File Groups).
-pscript.fb_get_children = function(node){
- if(node.expanded_once) return;
- $ds(node.loading_div);
-
- var callback = function(r,rt){
- var p = pscript.fb_tree.allnodes[r.message.parent_grp];
- $dh(node.loading_div);
-
- var fl = r.message.fl ? r.message.fl : '';
- if(fl){
- for(var i=0; i<fl.length; i++){
- if(fl[i][3] == undefined) fl[i][3] = '';
- if(fl[i][4] == undefined) fl[i][4] = '';
-
- if(has_common(fl[i][3].split(','),user_roles) || has_common(fl[i][4].split(','),user_roles) || (user == fl[i][5])){
- var imgsrc = 'images/icons/page.gif'; var has_children = false;
- if(fl[i][1]) var label = fl[i][1]; else var label = fl[i][0];
-
- var n = pscript.fb_tree.addNode(p,fl[i][0],imgsrc,pscript.show_hide_link,has_children ? pscript.fb_get_children:null,null,label);
- n.rec = fl[i]; n.rec.name = fl[i][0]; n.rec.parent_grp = r.message.parent_grp;
- n.rec.label = fl[i][1]; n.rec.file_list = fl[i][2]; n.rec.type = 'File';
- }
- }
- }
-
- var fl_grp = r.message.fl_grp ? r.message.fl_grp : '';
- if(fl_grp){
- for(var i=0;i<fl_grp.length;i++){
- if(fl_grp[i][2] == undefined) fl_grp[i][2] = '';
- if(fl_grp[i][3] == undefined) fl_grp[i][3] = '';
-
- if(has_common(fl_grp[i][2].split(','),user_roles) || has_common(fl_grp[i][3].split(','),user_roles) || (user == fl_grp[i][4])){
- var imgsrc = 'images/icons/folder.gif'; var has_children = true;
- var label = fl_grp[i][1] ? fl_grp[i][1] : fl_grp[i][0];
-
- var n = pscript.fb_tree.addNode(p,fl_grp[i][0],imgsrc,pscript.show_hide_link,has_children ? pscript.fb_get_children:null,null,label);
- n.rec = fl_grp[i]; n.rec.name = fl_grp[i][0]; n.rec.parent_grp = r.message.parent_grp;
- n.rec.label = fl_grp[i][1]; n.rec.file_list = ''; n.rec.type='File Group';
- }
- }
- }
- }
- $c_obj('File Browser Control','get_children',node.rec.name,callback);
-}
-
-// If image file then display image.
-pscript.fb_show_img = function(){
-
- var parent = pscript.f_file_display;
-
- parent.f_file_title.innerHTML = pscript.f_cur_node_label;
- pscript.remove_child_nodes(parent.f_file_content);
-
- var a = $a(parent.f_file_content,'a');
-
- var img = $a(a,'img','',{textAlign:'center',cursor:'pointer'});
- img.src = repl('cgi-bin/getfile.cgi?ac=%(acc)s&name=%(f_nm)s&thumbnail=300',{acc:session.account_name, f_nm:pscript.f_cur_node_file});
- $ds(pscript.f_file_display);
-
- a.onclick = function(){
- this.href = repl('cgi-bin/getfile.cgi?ac=%(acc)s&name=%(f_nm)s',{acc:session.account_name, f_nm:pscript.f_cur_node_file});
- this.target = "_blank";
- }
-}
-
-// Enable/ disable Edit File action.
-pscript.show_edit_file_link = function(){
-
- var callback = function(r,rt){
- pscript.f_edit_roles = r.message[0][0] ? r.message[0][0].split(',') : '';
- pscript.f_view_roles = r.message[0][1] ? r.message[0][1].split(',') : '';
-
- if(has_common(pscript.f_edit_roles,user_roles) || user == r.message[0][2]){
- $ds(pscript.file_div);
- }
- else{ $dh(pscript.file_div); }
- }
-
- var args = {};
- args.dt = pscript.f_cur_node_type;
- args.dn = pscript.f_cur_node_name;
- $c_obj('File Browser Control','get_privileges',docstring(args),callback);
-}
-
-// Set file detail in attachement object.
-pscript.set_file_det_value = function(att,file){
- if(file.inputs['Description'].value) file_desc = file.inputs['Description'].value; else file_desc = 'NIL';
- if(file.inputs['File Group'].txt.value) file_grp = file.inputs['File Group'].txt.value; else file_grp = 'NIL';
- att.file_det.value = file_desc + '~~' + file_grp;
-}
-
-// Edit selected file.
-pscript.fb_edit_file = function(){
- var parent = pscript.f_file_display;
- parent.f_file_title.innerHTML = pscript.f_cur_node_label;
- pscript.n_file.show(1,'frm_node');
-}
-
-//delete dialog structure
-
-pscript.delete_node = function(sdt,dt,dn,callback){
- if(!pscript.delete_dialog){
- var delete_dialog = new Dialog(400,200);
-
- delete_dialog.make_body([
- ['HTML','Message',''],
- ['HTML','Response',''],
- ['HTML','Delete Record','<div id="delete_record" style="height:25px"></div>']
- ]);
-
- delete_dialog.y_btn = $a($i('delete_record'),'button','button');
- delete_dialog.y_btn.innerHTML = 'Ok';
- delete_dialog.y_btn.onclick = function(){
- delete_dialog.widgets['Response'].innerHTML = 'Deleting...';
- var args = {};
- args.dt = delete_dialog.dt; args.dn = delete_dialog.dn;
-
- var callback1 = function(r,rt){
- delete_dialog.onhide = delete_dialog.callback;
- delete_dialog.hide();
-
- //refreshing node
- pscript.load_child_nodes();
- }
- $c_obj(sdt,'delete',docstring(args),callback1);
- }
-
- delete_dialog.n_btn = $a($i('delete_record'),'button','button');
- delete_dialog.n_btn.innerHTML = 'Cancel';
-
- delete_dialog.n_btn.onclick = function(){
- delete_dialog.widgets['Response'].innerHTML = '';
- delete_dialog.onhide = '';
- delete_dialog.hide();
- }
-
- delete_dialog.widgets['Message'].innerHTML = 'Note: All data will be deleted permanantly. Do you want to continue?';
- pscript.delete_dialog = delete_dialog;
- }
- //if(!delete_dialog.display) delete_dialog.show();
- pscript.delete_dialog.show();
- pscript.delete_dialog.widgets['Response'].innerHTML = '';
- pscript.delete_dialog.sdt = sdt; pscript.delete_dialog.dt=dt; pscript.delete_dialog.dn=dn; pscript.delete_dialog.callback = callback;
-}
-
-pscript.remove_child_nodes = function(parent){
- var len = parent.childNodes.length;
- if(len){
- for(l=0; l<len; l++){
- var c = parent.childNodes[0];
- parent.removeChild(c);
- }
- }
-}
-
-pscript.load_child_nodes = function(){
- if(pscript.f_cur_parent){
- pscript.f_cur_parent.clear_child_nodes();
- pscript.f_cur_parent.expand();
- pscript.f_cur_parent.select();
- }
- else{ pscript.fb_refresh(); }
-}
\ No newline at end of file
diff --git a/erpnext/utilities/page/file_browser/file_browser.txt b/erpnext/utilities/page/file_browser/file_browser.txt
deleted file mode 100644
index b4496f9..0000000
--- a/erpnext/utilities/page/file_browser/file_browser.txt
+++ /dev/null
@@ -1,121 +0,0 @@
-# Page, File Browser
-[
-
- # These values are common in all dictionaries
- {
- 'creation': '2010-10-12 15:19:31',
- 'docstatus': 0,
- 'modified': '2010-12-27 11:09:52',
- 'modified_by': 'Administrator',
- 'owner': 'Administrator'
- },
-
- # These values are common for all Page
- {
- 'doctype': 'Page',
- 'module': 'Utilities',
- 'name': '__common__',
- 'page_name': 'File Browser',
- 'show_in_menu': 1,
- 'standard': 'Yes'
- },
-
- # These values are common for all Page Role
- {
- 'doctype': 'Page Role',
- 'name': '__common__',
- 'parent': 'File Browser',
- 'parentfield': 'roles',
- 'parenttype': 'Page'
- },
-
- # Page, File Browser
- {
- 'doctype': 'Page',
- 'name': 'File Browser'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role',
- 'idx': 1,
- 'role': 'Administrator'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role',
- 'idx': 2,
- 'role': 'Sales User'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role',
- 'idx': 3,
- 'role': 'Sales Manager'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role',
- 'idx': 4,
- 'role': 'System Manager'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role',
- 'idx': 5,
- 'role': 'Purchase User'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role',
- 'idx': 6,
- 'role': 'Purchase Manager'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role',
- 'idx': 7,
- 'role': 'Accounts User'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role',
- 'idx': 8,
- 'role': 'Accounts Manager'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role',
- 'idx': 9,
- 'role': 'Production User'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role',
- 'idx': 10,
- 'role': 'Production Manager'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role',
- 'idx': 11,
- 'role': 'Material User'
- },
-
- # Page Role
- {
- 'doctype': 'Page Role',
- 'idx': 12,
- 'role': 'Customer'
- }
-]
\ No newline at end of file
diff --git a/erpnext/utilities/page/messages/messages.css b/erpnext/utilities/page/messages/messages.css
new file mode 100644
index 0000000..81260ab
--- /dev/null
+++ b/erpnext/utilities/page/messages/messages.css
@@ -0,0 +1,35 @@
+#message-post-text {
+ height: 3em;
+}
+
+#message-list {
+ margin: 0px 40px;
+}
+
+.message {
+ border-radius: 5px;
+ max-width: 60%;
+ min-width: 40%;
+ padding: 7px;
+ margin-bottom: 7px;
+}
+
+.message .help {
+ margin-bottom: 0px;
+ padding-bottom: 0px;
+ color: #888;
+ font-size: 11px;
+}
+
+.message-other {
+ background-color: #EBFF9C;
+ border: 1px solid #C3CF78;
+ float: right;
+ text-align: right;
+}
+
+.message-self {
+ background-color: #eee;
+ border: 1px solid #ccc;
+ float: left;
+}
\ No newline at end of file
diff --git a/erpnext/utilities/page/messages/messages.html b/erpnext/utilities/page/messages/messages.html
index ded3393..b645d3f 100644
--- a/erpnext/utilities/page/messages/messages.html
+++ b/erpnext/utilities/page/messages/messages.html
@@ -1,2 +1,28 @@
-<div id="message_header" style="margin-bottom: 8px"></div>
-<div id="inbox_tabs"></div>
\ No newline at end of file
+<div class="layout-wrapper layout-wrapper-background">
+ <div class="layout-main-section">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Messages</h1>
+ <div class="well">
+ <textarea id="message-post-text"></textarea>
+ <button disabled="disabled" id="message-post" class="btn btn-small"><i class="icon-play"></i> Post</button>
+ </div>
+ <div id="message-list">
+ </div>
+ </div>
+ <div class="layout-side-section">
+ <div class="psidebar">
+ <div class="section">
+ <div class="section-head">
+ Messages By
+ </div>
+ <div class="section-body">
+ <div class="section-item">
+ <a href="#!messages"><b>All messages</b></a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div style="clear: both;">
+ </div>
+</div>
\ No newline at end of file
diff --git a/erpnext/utilities/page/messages/messages.js b/erpnext/utilities/page/messages/messages.js
index 43b4bd7..6937796 100644
--- a/erpnext/utilities/page/messages/messages.js
+++ b/erpnext/utilities/page/messages/messages.js
@@ -1,931 +1,157 @@
-pscript.onload_Messages = function() {
- var p = new PageHeader($i('message_header'),'Messages');
- pscript.msg_struct = new Message();
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+wn.provide('erpnext.messages');
+
+wn.pages.messages.onload = function(wrapper) {
+ erpnext.messages.show_active_users();
+ erpnext.messages.make_list();
+ update_messages('reset'); //Resets notification icons
+
+ // post message
+ $('#message-post').click(function() {
+ var txt = $('#message-post-text').val();
+ if(txt) {
+ wn.call({
+ module:'utilities',
+ page:'messages',
+ method:'post',
+ args: {
+ txt: txt,
+ contact: erpnext.messages.contact
+ },
+ callback:function(r,rt) {
+ $('#message-post-text').val('')
+ erpnext.messages.list.run();
+ },
+ btn: this
+ });
+ }
+ });
+
+ // enable, disable button
+ $('#message-post-text').keyup(function() {
+ if($(this).val()) {
+ $('#message-post').attr('disabled', false);
+ } else {
+ $('#message-post').attr('disabled', true);
+ }
+ })
}
-pscript.onshow_Messages = function() {
- pscript.msg_struct.show_inbox();
+wn.pages.messages.onshow = function(wrapper) {
+ erpnext.messages.show();
+ setTimeout(erpnext.messages.refresh, 5000);
+ $('#message-post-text').focus();
}
-function Message(){
- if(!this.mytabs) this.make_body();
+erpnext.messages = {
+ show: function() {
+ var contact = erpnext.messages.get_contact();
+
+ // can't send message to self
+ $(wn.pages.messages).find('.well').toggle(contact==user ? false : true);
+
+ $(wn.pages.messages).find('h1:first').html('Messages: '
+ + (user==contact ? 'From everyone' : wn.user_info(contact).fullname));
+
+ erpnext.messages.contact = contact;
+ erpnext.messages.list.opts.args.contact = contact;
+ erpnext.messages.list.run();
+
+ },
+ // check for updates every 5 seconds if page is active
+ refresh: function() {
+ setTimeout(erpnext.messages.refresh, 10000);
+ if(page_body.cur_page_label != 'messages') return;
+ erpnext.messages.show();
+ },
+ get_contact: function() {
+ var route = location.hash;
+ if(route.indexOf('/')!=-1) {
+ var name = decodeURIComponent(route.split('/')[1]);
+ if(name.indexOf('__at__')!=-1) {
+ name = name.replace('__at__', '@');
+ }
+ return name;
+ }
+ return user;
+ },
+ make_list: function() {
+ erpnext.messages.list = new wn.widgets.Listing({
+ parent: $('#message-list').get(0),
+ method: 'utilities.page.messages.messages.get_list',
+ args: {
+ contact: null
+ },
+ render_row: function(wrapper, data) {
+ data.creation = dateutil.comment_when(data.creation);
+ data.comment_by_fullname = wn.user_info(data.owner).fullname;
+
+ data.reply_html = '';
+ if(data.owner==user) {
+ data.cls = 'message-self';
+ data.comment_by_fullname = 'You';
+ data.delete_html = repl('<a class="close" \
+ onclick="erpnext.messages.delete(this)"\
+ data-name="%(name)s">×</a>', data);
+ } else {
+ data.cls = 'message-other';
+ data.delete_html = '';
+ if(erpnext.messages.contact==user) {
+ data.reply_html = repl('<a href="#!messages/%(owner)s">\
+ <i class="icon-share-alt"></i> Reply</a>', data)
+ }
+ }
+
+ wrapper.innerHTML = repl('<div class="message %(cls)s">%(delete_html)s\
+ <b>%(comment)s</b>\
+ <div class="help">by %(comment_by_fullname)s, %(creation)s</div>\
+ %(reply_html)s</div>\
+ <div style="clear: both;"></div>', data);
+ }
+ });
+ },
+ delete: function(ele) {
+ $(ele).parent().css('opacity', 0.6);
+ wn.call({
+ method:'utilities.page.messages.messages.delete',
+ args: {name : $(ele).attr('data-name')},
+ callback: function() {
+ $(ele).parent().toggle(false);
+ }
+ });
+ },
+ show_active_users: function() {
+ wn.call({
+ module:'utilities',
+ page:'messages',
+ method:'get_active_users',
+ callback: function(r,rt) {
+ var $body = $(wn.pages.messages).find('.section-body');
+ for(var i in r.message) {
+ var p = r.message[i];
+ p.fullname = wn.user_info(p.name).fullname;
+ p.name = p.name.replace('@', '__at__');
+ $body.append(repl('<div class="section-item">\
+ <a href="#!messages/%(name)s">%(fullname)s</a></div>', p))
+ }
+ }
+ });
+ }
}
-Message.prototype.make_body = function() {
- var me = this;
- this.mytabs = new TabbedPage($i('inbox_tabs'));
- $y(this.mytabs.body_area, {padding:'16px'})
- me.make_inbox();
- me.make_compose();
- me.make_sent();
-
- this.mytabs.tabs['Inbox'].show();
-}
-
-Message.prototype.make_inbox = function() {
- var me = this;
-
- //inbox tab
- me.mytabs.add_tab('Inbox', function() {
- me.inbox_lst.generate_unread_lst();
- me.inbox_lst.msg_li.run();
- me.cur_inbox_list = me.inbox_lst.msg_li; // for refresh
- });
-
- if(!this.inbox_lst) this.inbox_lst = new MessageList(me.mytabs.tabs['Inbox'].tab_body, 'inbox msg');
- this.inbox_lst.msg_li.get_query = function() {
- //me.checked_msg_lst = [];
- me.all_msg = {};
- this.query = repl("select distinct t1.name, t1.last_updated_on, t1.last_updated_by, t1.subject, t3.first_name, t3.file_list, t1.message_date, t1.owner, t1.message, t1.previous_updated_by from `tabMail` t1, `tabMail Participant Details` t2, `tabProfile` t3 where t1.is_main_thread='Yes' and t2.participant_name='%(user)s' and (t2.delete_status is NULL or t2.delete_status = 'No') and t1.name = t2.parent and ((t1.last_updated_by = t3.name and t1.last_updated_by!='%(user)s') or (t1.previous_updated_by = t3.name and t1.previous_updated_by!='%(user)s')) order by t1.modified desc", {'user':user});
-
- this.query_max = repl("select distinct count(t1.name) from `tabMail` t1, `tabMail Participant Details` t2, `tabProfile` t3 where t1.is_main_thread='Yes' and t2.participant_name='%(user)s' and (t2.delete_status is NULL or t2.delete_status = 'No') and t1.name = t2.parent and ((t1.last_updated_by = t3.name and t1.last_updated_by!='%(user)s') or (t1.previous_updated_by = t3.name and t1.previous_updated_by!='%(user)s')) order by t1.modified desc", {'user':user});
- }
-
- this.inbox_lst.generate_unread_lst();
- this.inbox_lst.msg_li.run();
- this.inbox_lst.msg_li.onrun = function(){ me.inbox_lst.show_if_no_msg(me.inbox_lst.msg_li); }
-}
-
-Message.prototype.make_compose = function() {
- var me = this;
-
- me.mytabs.add_tab('Compose', function() {
- if(!pscript.compose_msg_obj){
- pscript.compose_msg_obj = new MessageThread(me.mytabs.tabs['Compose'].tab_body, me.mytabs.tabs['Inbox'], me.inbox_lst.lst_wrapper, 'My Inbox');
- //pscript.compose_msg_obj.show_msg(0, me.mytabs.tabs['Compose'].tab_body, me.mytabs.tabs['Inbox'], me.inbox_lst.lst_wrapper, 'My Inbox', me.mytabs.tabs['Sent'], me.sent_lst.lst_wrapper);
- }
- pscript.compose_msg_obj.show_msg(0, me.mytabs.tabs['Compose'].tab_body, me.mytabs.tabs['Inbox'], me.inbox_lst.lst_wrapper, 'My Inbox', me.mytabs.tabs['Sent'], me.sent_lst.lst_wrapper);
-
- this.cur_inbox_list = null;
- });
-}
-
-Message.prototype.make_sent = function() {
- var me = this;
-
- // sent msg tab
- me.mytabs.add_tab('Sent', function() {
- me.sent_lst.msg_li.run();
- me.cur_inbox_list = me.sent_lst.msg_li; // for refresh
- });
-
- if(!this.sent_lst) this.sent_lst = new MessageList(me.mytabs.tabs['Sent'].tab_body, 'sent msg');
- this.sent_lst.msg_li.get_query = function() {
- //me.checked_msg_lst = [];
- me.all_msg = {};
-
- this.query = repl("select distinct t1.name, t1.last_updated_on, t1.last_updated_by, t1.subject, t3.first_name, t3.file_list, t1.message_date, t1.owner, t1.message from `tabMail` t1, `tabProfile` t3, `tabMail Participant Details` t2 where t1.is_main_thread='Yes' and t1.last_updated_by='%(user)s' and t1.last_updated_by = t3.name and t2.participant_name = '%(user)s' and (t2.delete_status is NULL or t2.delete_status = 'No') and t2.parent = t1.name order by t1.modified desc", {'user':user});
- this.query_max = repl("select distinct count(t1.name) from `tabMail` t1, `tabProfile` t3, `tabMail Participant Details` t2 where t1.is_main_thread='Yes' and t1.last_updated_by='%(user)s' and t1.last_updated_by = t3.name and t2.participant_name = '%(user)s' and (t2.delete_status is NULL or t2.delete_status = 'No') and t2.parent = t1.name order by t1.modified desc", {'user':user});
- }
- this.sent_lst.msg_li.run();
- this.sent_lst.msg_li.onrun = function(){ me.sent_lst.show_if_no_msg(me.sent_lst.msg_li); }
-}
-
-Message.prototype.show_inbox = function(){
- var me = this;
- if(me.inbox_lst){
- me.inbox_lst.msg_li.run();
- }
- me.mytabs.tabs['Inbox'].show();
-}
-
-MessageList = function(parent_tab, req_frm) {
- this.checked_msg_lst = [];
- this.unread_msg_lst = [];
- this.all_msg = {};
- this.parent_tab = parent_tab;
- this.req_frm = req_frm;
- this.make();
-}
-
-MessageList.prototype.make = function(){
- var me = this;
-
- this.lst_wrapper = $a(me.parent_tab, 'div');
-
- //toolbar
- this.toolbar_area = $a(this.lst_wrapper, 'div', '', {paddingTop:'12px'});
- this.create_toolbar();
-
- //no inbox msg div
- this.no_lst_wrapper = $a(me.parent_tab, 'div', '', {padding:'8px',backgroundColor:'#FFE4AA'});
- $dh(this.no_lst_wrapper);
-
- //view inbox msg div
- this.view_msg_wrapper = $a(me.parent_tab, 'div');
-
- this.msg_li = new Listing("Recent Messages",1);
- this.msg_li.colwidths = ['90%'];
- this.msg_li.opts.no_border = 1;
- this.msg_li.opts.show_empty_tab = 0;
- this.msg_li.opts.no_border = 1;
-
- this.msg_li.show_cell = function(cell,ri,ci,d) {
- if(ri % 2)$y(cell,{backgroundColor:'#E1E3DE'});
- if(ci ==0){
- this.msg_lst = new MessagePreview(cell, me.req_frm, d[ri][0], d[ri][1], d[ri][2], d[ri][3], d[ri][4], d[ri][5], d[ri][6], d[ri][7], d[ri][8], d[ri][9], me.lst_wrapper, me.view_msg_wrapper, me.unread_msg_lst, me.all_msg);
- }
- }
- this.msg_li.make(this.lst_wrapper);
- $dh(this.msg_li.btn_area);
-}
-
-MessageList.prototype.create_toolbar = function(){
- var me = this;
-
- this.toolbar_tbl = make_table(me.toolbar_area, 1, 2, '100%', ['85%', '15%']);
-
- this.select_all_lnk = $a($td(this.toolbar_tbl, 0, 0), 'span', 'link_type');
- this.select_all_lnk.innerHTML = 'Select All';
- $dh(this.select_all_lnk);
-
- this.unselect_all_lnk = $a($td(this.toolbar_tbl, 0, 0), 'span', 'link_type');
- this.unselect_all_lnk.innerHTML = 'Unselect All';
- $dh(this.unselect_all_lnk);
-
- this.select_all_lnk.onclick = function(){
- $ds(me.unselect_all_lnk);
- $dh(me.select_all_lnk);
- for(m in me.all_msg){
- me.all_msg[m].checked = true;
- }
- }
-
- this.unselect_all_lnk.onclick = function(){
- $ds(me.select_all_lnk);
- $dh(me.unselect_all_lnk);
- for(m in me.all_msg){
- me.all_msg[m].checked = false;
- }
- }
-
- this.delete_selected_btn = $a($td(this.toolbar_tbl, 0, 1), 'button', 'button', {align:'right'});
- this.delete_selected_btn.innerHTML = 'Delete Selected';
- $dh(this.delete_selected_btn);
- this.delete_selected_btn.onclick = function(){
- me.checked_msg_lst = [];
- for(m in me.all_msg){
- if(me.all_msg[m].checked == true)
- me.checked_msg_lst.push(m);
- }
- me.delete_selected();
- }
-}
-
-MessageList.prototype.show_if_no_msg = function(lst_data){
- var me = this;
- $dh(me.view_msg_wrapper);
-
- if(!lst_data.has_data()){
- $ds(me.no_lst_wrapper);
- $dh(me.lst_wrapper);
- if(me.req_frm == 'inbox msg'){
- me.no_lst_wrapper.innerHTML = "You have no messages in your Inbox.";
- }
- else if(me.req_frm == 'sent msg'){
- me.no_lst_wrapper.innerHTML = "You have no messages in your Sent messages list.";
- }
- } else {
- $dh(me.no_lst_wrapper);
- $ds(me.lst_wrapper);
- $dh(me.no_lst_wrapper);
- $ds(me.lst_wrapper);
- $dh(this.unselect_all_lnk);
- $ds(this.select_all_lnk);
- $ds(this.delete_selected_btn);
- }
-}
-
-MessageList.prototype.generate_unread_lst = function(){
- var me = this;
-
- var msg_callback = function(r, rt){
- if(r.message.ur_lst){
- me.unread_msg_lst = r.message.ur_lst;
- }
- }
- $c('runserverobj', {doctype:'Message Control',method:'get_unread_msg_lst',arg:user}, msg_callback);
-}
-
-MessageList.prototype.delete_selected = function(){
- var me = this;
-
- if(me.checked_msg_lst.length >= 1) me.msg_li.msg_lst.delete_msg(me.checked_msg_lst);
- else msgprint("error:Please select the message to delete");
-}
-
-function MessagePreview(parent, req_frm, msg_id, last_updated_on, last_updated_by, subject, first_name, profile_pic, msg_date, msg_owner, message, previous_updated_by, lst_wrapper, view_msg_wrapper, unread_msg_lst, all_msg_dict) {
- this.create_structure(parent);
-
- if(req_frm) this.req_frm = req_frm;
- this.msg_id = msg_id;
- this.subject = subject;
- this.message = message;
- this.msg_date = msg_date;
- this.msg_owner = msg_owner;
- this.first_name = first_name;
- this.lst_wrapper = lst_wrapper;
- this.view_msg_wrapper = view_msg_wrapper;
- if(profile_pic) this.profile_pic = profile_pic;
- if(last_updated_on) this.last_updated_on = last_updated_on;
- if(last_updated_by) this.last_updated_by = last_updated_by;
- if(previous_updated_by) this.previous_updated_by = previous_updated_by;
- this.unread_msg_lst = unread_msg_lst;
- this.all_msg = all_msg_dict;
-
- this.show_msg_sender();
- this.show_msg_subject();
- this.show_delete_lnk();
-}
-
-MessagePreview.prototype.create_structure = function(parent){
- this.wrapper = $a(parent,'div');
- this.t = make_table(this.wrapper, 1, 4, '100%', ['5%','10%','80%','5%']);
-}
-
-MessagePreview.prototype.show_msg_sender = function(){
- var me = this;
-
- // checkbox
- var chk_box = $a($td(this.t, 0, 0),'div');
- if(isIE) {
- chk_box.innerHTML = '<input type="checkbox" style="border: 0px">'; // IE fix
- this.inp = chk_box.childNodes[0];
- } else {
- this.inp = $a(chk_box, 'input');
- this.inp.type = 'checkbox';
- }
-
- this.inp.onclick = function() {
- for(m in me.all_msg){
- if(m == me.msg_id)
- me.all_msg[m].checked = me.inp.checked;
- }
- }
-
- me.all_msg[me.msg_id] = this.inp;
-
- //sender or receiver
- // photo
- if(this.profile_pic) {
- var img = $a($td(this.t, 0, 1),'img');
- var img_src = this.profile_pic.split(NEWLINE)[0].split(',')[0]
- img.src = repl('cgi-bin/getfile.cgi?name=%(fn)s&thumbnail=32',{fn:img_src})
- }
- //name
- var div = $a($td(this.t, 0, 1),'div');
- div.innerHTML = this.first_name;
-}
-
-MessagePreview.prototype.show_msg_subject = function() {
- var me = this;
- // message
- var div1 = $a($td(this.t, 0, 2),'div', '', {paddingBottom:'4px'});
- var sp = $a(div1,'span','link_type', {fontSize:'12px'});
- sp.innerHTML = 'Sub : ' +me.subject;
-
- var div = $a($td(this.t, 0, 2),'div', 'comment',{paddingBottom:'8px'});
- div.innerHTML = 'created by: ' + me.msg_owner +' | created on: ' + dateutil.str_to_user(me.msg_date)+ ' | last updated on: ' + dateutil.str_to_user(me.last_updated_on);
-
- if (me.req_frm == 'inbox msg' && inList(me.unread_msg_lst, me.msg_id)) {
- $y(sp,{fontWeight:'bold',color:'Black'});
- $y(div,{fontWeight:'bold',color:'Black'});
- }
-
- sp.style.cursor = 'pointer';
- sp.msg_id = me.msg_id; sp.req_frm = me.req_frm;
-
- sp.onclick = function() {
- $dh(me.lst_wrapper);
- if(this.req_frm == 'inbox msg'){
- if(!pscript.inbox_msg_obj){
- pscript.inbox_msg_obj = new MessageThread(me.view_msg_wrapper, pscript.msg_struct.mytabs.tabs['Inbox'], me.lst_wrapper, 'My Inbox');
- }
- pscript.inbox_msg_obj.show_msg(this.msg_id, me.view_msg_wrapper, pscript.msg_struct.mytabs.tabs['Inbox'], me.lst_wrapper, 'My Inbox', pscript.msg_struct.mytabs.tabs['Sent'], me.lst_wrapper);
-
- //mark for already read
- if (this.req_frm == 'inbox msg' && inList(me.unread_msg_lst,this.msg_id)) {
- me.mark_as_read(this.msg_id);
- }
- }
- else if(this.req_frm == 'sent msg'){
- if(!pscript.sent_msg_obj){
- pscript.sent_msg_obj = new MessageThread(me.view_msg_wrapper, pscript.msg_struct.mytabs.tabs['Sent'], me.lst_wrapper, 'My Inbox');
- }
- pscript.sent_msg_obj.show_msg(this.msg_id, me.view_msg_wrapper, pscript.msg_struct.mytabs.tabs['Sent'], me.lst_wrapper, 'My Inbox', pscript.msg_struct.mytabs.tabs['Sent'], me.lst_wrapper);
- }
- }
-}
-
-MessagePreview.prototype.mark_as_read = function(msg_id){
- this.msg_id = msg_id;
- var me = this;
-
- args = {'user' : user, 'msg':this.msg_id,'read':'Yes'}
- $c_obj('Message Control','read_unread_message',docstring(args),function(r,rt){
- me.remove_element(me.unread_msg_lst, me.msg_id);
- });
-}
-
-MessagePreview.prototype.delete_msg = function(msg_nm_lst){
- this.msg_nm_lst = msg_nm_lst;
- var me = this;
- var delete_msg_dialog;
-
- set_delete_msg_dialog = function() {
- delete_msg_dialog = new Dialog(400, 200, 'Delete Message');
- delete_msg_dialog.make_body([
- ['HTML', 'Message', '<div class = "comment">Are you sure, you want to delete message(s) ?</div>'],
- ['HTML', 'Response', '<div class = "comment" id="delete_msg_dialog_response"></div>'],
- ['HTML', 'Delete Msg', '<div></div>']
- ]);
-
- var delete_msg_btn1 = $a($i(delete_msg_dialog.widgets['Delete Msg']), 'button', 'button');
- delete_msg_btn1.innerHTML = 'Yes';
- delete_msg_btn1.onclick = function(){ delete_msg_dialog.add(); }
-
- var delete_msg_btn2 = $a($i(delete_msg_dialog.widgets['Delete Msg']), 'button', 'button');
- delete_msg_btn2.innerHTML = 'No';
- $y(delete_msg_btn2,{marginLeft:'4px'});
- delete_msg_btn2.onclick = function(){ delete_msg_dialog.hide();}
-
- delete_msg_dialog.onshow = function() {
- $i('delete_msg_dialog_response').innerHTML = '';
- }
-
- delete_msg_dialog.add = function() {
- // sending...
- $i('delete_msg_dialog_response').innerHTML = 'Processing...';
- var m_arg = user+ '~~' + this.msg_nm_lst;
-
- var call_back = function(r,rt) {
- if(r.message == 'true'){
- $i('delete_msg_dialog_response').innerHTML = 'Message Deleted';
- delete_msg_dialog.hide();
-
- for(m=0; m<me.msg_nm_lst.length; m++){
- if(inList(me.unread_msg_lst, me.msg_nm_lst[m]))
- me.remove_element(me.unread_msg_lst, me.msg_nm_lst[m]);
- }
- pscript.msg_struct.inbox_lst.msg_li.run();
- pscript.msg_struct.sent_lst.msg_li.run();
- }
- }
- $c('runserverobj', {doctype:'Message Control',method:'delete_message',arg:m_arg}, call_back);
- }
- }
-
- if(!delete_msg_dialog){
- set_delete_msg_dialog();
- }
- delete_msg_dialog.msg_nm_lst = this.msg_nm_lst;
- delete_msg_dialog.show();
-}
-
-MessagePreview.prototype.remove_element = function(arrayName, arrayElement){
- for(var i=0; i<arrayName.length;i++ )
- {
- if(arrayName[i]==arrayElement)
- arrayName.splice(i,1);
- }
-}
-
-MessagePreview.prototype.show_delete_lnk = function() {
- var me = this;
- var div = $a($td(this.t, 0, 3), 'span', 'link_type');
- div.innerHTML = 'Delete';
- div.msg_id = me.msg_id;
-
- div.onclick = function() {
- me.delete_msg(me.msg_id);
- }
-}
-
-MessagePart = function(parent){
- var me = this;
-
- this.parent = parent;
- this.inputs = {};
-
- me.make_header();
- me.make_reply();
- me.make_post();
-}
-
-MessagePart.prototype.make = function(label, ele, comment){
- var me = this;
-
- var div = $a(this.parent,'div','',{marginBottom:'12px'});
- var t = make_table(div,2,1,'70%',['100%']);
-
- if( ele == 'button'){
- var element = $a($td(t,0,0), 'button');
- element.innerHTML = label;
- }
- else {
- var element = $a($td(t,1,0),ele);
-
- // large fonts for inputs
- if(in_list(['input','textarea'],ele.toLowerCase())) {
- $y(element,{fontSize:'14px', width:'100%'})
- }
- $td(t,0,0).innerHTML = label;
- }
-
- if(comment) {
- var div2 = $a(div,'div','',{fontSize:'11px', color:'#888', marginTop:'2px'});
- div2.innerHTML = comment;
- }
-
- element.wrapper = div;
- if(label) me.inputs[label] = element;
- return element;
-}
-
-MessagePart.prototype.make_header = function(){
- var me = this;
-
- this.back_link_div = $a(me.make('','div'),'span', 'link_type', {paddingTop:'12px'});
- this.back_link_div.innerHTML = 'Back to List';
-
- me.make('To','textarea','Enter Email Ids separated by commas (,)');
- $y(me.inputs['To'],{overflow :'auto', height : '50px'});
- me.make('Subject','input');
-}
-
-MessagePart.prototype.make_reply = function(){
- var me = this;
- this.inputs.Thread = $a(this.parent, 'div', '', {margin:'16px 0px'})
-}
-
-MessagePart.prototype.make_post = function(){
- var me = this;
-
- me.make('Message','textarea');
- $y(me.inputs['Message'],{height:'240px'});
-
- // send + cancel
- var d = $a(this.parent, 'div');
- me.inputs.Send = $btn(d, 'Send');
- me.inputs.Reply = $a(d, 'Reply')
-}
-
-MessagePart.prototype.add_header_values = function(to_list, subject){
- var me = this;
-
- //thread_participants
- me.inputs['To'].value = to_list.join(',');
- me.inputs['To'].disabled = true;
-
- // subject
- me.inputs['Subject'].value = subject;
- me.inputs['Subject'].disabled = true;
-}
-
-MessagePart.prototype.add_reply_thread = function(thread){
- var me = this;
- // prev messages
- var t = me.inputs['Thread'];
- t.innerHTML = ''; // clear previous threads
-
- var w = $a(t,'div','',{width:'70%'});
- var tab = make_table(w,thread.length,2,'100%',['20%','80%'], {padding:'8px 0px', borderBottom:'1px solid #AAA'});
-
- for(i=0;i<thread.length;i++) {
- // ---- photo ----
- if(thread[i][6]) {
- var img = $a($td(tab,i,0),'img');
- var img_src = thread[i][6].split(NEWLINE)[0].split(',')[0];
- img.src = repl('cgi-bin/getfile.cgi?name=%(fn)s&thumbnail=32',{fn:img_src});
- }
-
- // ---- sender name ----
- var d = $a($td(tab,i,0),'div','',{fontSize:'11px'});
- d.innerHTML = thread[i][5];
-
- //----- date ----
- var d = $a($td(tab,i,1),'div', 'comment', {marginLeft:'8px', color:'#888', fontSize:'11px'});
- d.innerHTML = dateutil.str_to_user(thread[i][3]);
-
- //------ message ------
- var d = $a($td(tab,i,1),'div', 'comment', {fontSize:'14px', marginLeft:'8px'});
- d.innerHTML = replace_newlines(thread[i][1]);
- $y($td(tab,i,1), {paddingBottom: '8px'});
- }
-}
-
-//++++++++++++++++++++++++ Message ++++++++++++++++++++++++
-
-MessageThread = function(parent, view_list_tab, view_list_div, req_frm) {
- var me = this;
- this.wrapper = $a(parent,'div');
- if(!this.msg_parts) this.make(view_list_tab, view_list_div, req_frm);
-}
-
-
-MessageThread.prototype.add_autosuggest = function() {
- var me = this;
-
- // ---- add auto suggest ----
- var opts = { script: '', json: true, maxresults: 10, timeout: 10000, delay:250, maxentries:500, cache:false};
-
- wn.require('lib/js/legacy/widgets/autosuggest.js');
-
- var as = new AutoSuggest(me.msg_parts.inputs['To'], opts);
- as.custom_select = function(txt, sel) {
- // ---- add to the last comma ----
-
- var r = '';
- var tl = txt.split(',');
- for(var i=0;i<tl.length-1;i++) r=r+tl[i]+',';
- r = r+(r?' ':'')+sel+',';
- if(r[r.length-1]==NEWLINE) { r=substr(0,r.length-1);}
- return r;
- }
-
- // ---- override server call ----
- as.doAjaxRequest = function(txt) {
- var pointer = as; var q = '';
-
- // ---- get last few letters typed ----
- var last_txt = txt.split(',');
- last_txt = last_txt[last_txt.length-1];
-
- // ---- show options ----
- var call_back = function(r,rt) {
- as.aSug = [];
- var jsondata = r.message;
- for (var i=0;i<jsondata.results.length;i++) {
- as.aSug.push({'id':jsondata.results[i].id, 'value':jsondata.results[i].value, 'info':jsondata.results[i].info});
- }
- as.idAs = "as_for_to_message";
-
- //old create list
- as.createList(as.aSug);
- }
-
- $c_obj('Message Control', 'get_to_list', (last_txt ? last_txt : '%'), call_back);
- return;
- }
-}
-
-MessageThread.prototype.make = function(view_list_tab, view_list_div, req_frm) {
- var me = this;
-
- me.view_list_tab = view_list_tab;
- me.view_list_div = view_list_div;
- me.req_frm = req_frm;
-
- this.msg_parts = new MessagePart(me.wrapper);
-
- this.msg_parts.back_link_div.onclick = function() {
- me.hide();
-
- if(me.in_compose) {
- if(me.req_frm == 'My Inbox') { me.view_list_tab.show(); $ds(me.view_list_div); }
- }
- }
-
- // autosuggest
- me.add_autosuggest();
-}
-
-MessageThread.prototype.set_inbox_editor = function(editor) {
- pscript.inbox_text_editor_set = 1;
-}
-
-MessageThread.prototype.view_existing_msg = function(args){
- var me = this;
-
- $c_obj('Message Control', 'get_thread_details', docstring(args),
- function(r, rt){
- var tl = r.message.tl;
- var to_list = r.message.to_list;
-
- //to and subject
- me.msg_parts.add_header_values(to_list, tl[0][0]);
-
- //reply thread
- me.msg_parts.add_reply_thread(tl);
-
- //post area
- if(me.inbox_editor && pscript.inbox_text_editor_set == 1){
- me.inbox_editor.editor.setContent('');
- }
- else{
- me.msg_parts.inputs['Message'].value = '';
- }
- me.show_as(true);
- }
- );
-}
-
-MessageThread.prototype.view_blank_form = function(){
- var me = this;
-
- $ds(me.msg_parts.inputs['To'].wrapper);
-
- me.msg_parts.inputs['To'].disabled = false;
- me.msg_parts.inputs['To'].value = '';
-
- me.msg_parts.inputs['Subject'].disabled = false;
- me.msg_parts.inputs['Subject'].value = '';
-
- me.msg_parts.inputs['Thread'].innerHTML = '';
-
- if(me.inbox_editor && pscript.inbox_text_editor_set == 1){
- me.inbox_editor.editor.setContent('');
- }
- else{
- me.msg_parts.inputs['Message'].value = '';
- }
- me.show_as(false);
-}
-
-// msg_id = mesage id,
-// parent = div/tab from where msg will be shown,
-// view_list_tab = name of tab in which list will be viewed,
-// view_list_div = name of div in which list will be viewed,
-// req_frm = my inbox / group / event,
-// show_on_send_tab = tab to be viewed on sending/replying to msg,
-// show_on_send_div = div to be viewed on sending/replying to msg,
-// receiver_lst = list of msg receiver
-
-MessageThread.prototype.show_msg = function(msg_id, parent, view_list_tab, view_list_div, req_frm, show_on_send_tab, show_on_send_div, receiver_lst) {
- var me = this;
-
- // set tinymce editor
- if(!me.inbox_editor) {
- pscript.inbox_text_editor_set = 0;
- var theme_adv_btn1 ="fontselect,fontsizeselect,formatselect,indicime,indicimehelp,emotions";
- var theme_adv_btn2 ="bold,italic,underline,|,undo,redo,|,code,forecolor,backcolor,link,unlink,hr,|,sub,sup,|,charmap";
- var theme_adv_btn3 = "";
-
- me.inbox_editor = new TextAreaEditor(me.msg_parts.inputs["Message"], null, me.set_inbox_editor, theme_adv_btn1, theme_adv_btn2, theme_adv_btn3, '300px');
- }
-
- me.req_frm = req_frm;
- me.receiver_lst = receiver_lst;
- me.parent = parent;
- me.view_list_tab = view_list_tab;
- me.view_list_div = view_list_div;
- me.show_on_send_tab = show_on_send_tab;
- me.show_on_send_div = show_on_send_div;
- me.msg_parts.inputs['Send'].btn_click = 0;
- me.msg_parts.inputs['Reply'].btn_click = 0;
-
- if(msg_id) {
- this.cur_message_id = msg_id;
- var args = {'user_name':user, 'cur_msg_id': this.cur_message_id};
- me.view_existing_msg(args);
- }
- else {
- this.cur_message_id = null;
- me.view_blank_form();
- }
- $ds(me.parent);
-
- // reply or send btn
- me.msg_parts.inputs['Send'].onclick = function(){
- if(!this.btn_click){
- this.btn_click = 1;
- me.send(me.req_frm, me.receiver_lst, me.show_on_send_tab, me.show_on_send_div);
- }
- }
- me.msg_parts.inputs['Reply'].onclick = me.msg_parts.inputs['Send'].onclick;
-}
-
-MessageThread.prototype.hide = function() {
- var me = this;
-
- $dh(me.wrapper);
- $ds(me.view_list_div);
- me.display = 0;
-}
-
-MessageThread.prototype.show_as = function(reply) {
- var me = this;
-
- if(!reply) {
- $dh(me.msg_parts.inputs['Thread'].wrapper);
- $dh(me.msg_parts.inputs['Reply']);
- $ds(me.msg_parts.inputs['Send']);
- me.in_compose = 1;
- }
- else {
- $ds(me.msg_parts.inputs['Thread'].wrapper);
- $ds(me.msg_parts.inputs['Reply']);
- $dh(me.msg_parts.inputs['Send']);
- $dh(me.view_list_div);
- me.in_compose = 1;
- }
- $ds(me.wrapper);
- me.display = 1;
-}
-
-MessageThread.prototype.send_msg = function(arg){
- var me = this;
- var args = arg;
-
- var send_call_back = function(r, rt){
- //var me = this;
- if(r.message == 'true'){
- me.msg_parts.inputs['To'].value = '';
- me.msg_parts.inputs['Subject'].value = '';
- me.msg_parts.inputs['Thread'].innerHTML = '';
-
- if(me.inbox_editor && pscript.inbox_text_editor_set == 1){
- me.inbox_editor.editor.setContent('');
- }
- else{
- me.msg_parts.inputs['Message'].value = '';
- }
-
- if(me.req_frm == 'My Inbox'){
- pscript.msg_struct.sent_lst.msg_li.run();
- me.show_on_send_tab.show();
- $ds(me.show_on_send_div);
- $dh(me.parent);
- }
- }
- }
-
- if(me.cur_message_id==null){
- $c_obj('Message Control','send_message',docstring(args), send_call_back);
- }
- else{
- $c_obj('Message Control','send_reply',docstring(args), send_call_back);
- }
-}
-
-MessageThread.prototype.send = function(req_frm, receiver_lst, show_on_send_tab, show_on_send_div) {
- var me = this;
- me.req_frm = req_frm;
- me.show_on_send_tab = show_on_send_tab;
- me.show_on_send_div = show_on_send_div;
- var args = {'user_name':user};
-
- if(me.inbox_editor && pscript.inbox_text_editor_set == 1){
- args.message = me.inbox_editor.editor.getContent();
- }
- else{
- args.message = me.msg_parts.inputs['Message'].value;
- }
-
- if(me.cur_message_id==null){
- args.subject = me.msg_parts.inputs['Subject'].value;
- args.to_list = me.msg_parts.inputs['To'].value;
- if(!args.to_list) {msgprint('error:Must enter "To:"'); }
- else if(!args.subject) {msgprint('error:Must enter "Subject"'); }
- else me.send_msg(args);
- }
- else{
- var subj = me.msg_parts.inputs['Subject'].value;
- if(!subj.substr(0,3).toLowerCase()=='re:')
- subj = 'Re: ' + subj;
- args.subject = subj;
- args.message_id = me.cur_message_id;
-
- me.send_msg(args);
- }
-}
-
-MessageThread.prototype.delete_msg = function(req_frm, parent, view_list_tab, view_list_div) {
- var me = this;
-
- var msg_lst = [];
- var delete_message_dialog;
- me.parent = parent;
-
- if(me.cur_message_id)
- msg_lst.push(me.cur_message_id);
-
- if(msg_lst.length >= 1){
- function set_delete_message_dialog() {
- delete_message_dialog = new Dialog(400, 400, 'Delete Message');
- delete_message_dialog.make_body([
- ['HTML', 'Message', '<div class = "comment">Are you sure, you want to delete this message ?</div>'],
- ['HTML', 'Response', '<div class = "comment" id="delete_message_dialog_response"></div>'],
- ['HTML', 'Delete Message', '<div id="delete_message_btn" style ="height:25px;"></div>']
- ]);
-
- var delete_message_btn1 = $a($i('delete_message_btn'), 'button', 'button');
- delete_message_btn1.innerHTML = 'Yes';
- delete_message_btn1.onclick = function(){ delete_message_dialog.add();}
-
- var delete_message_btn2 = $a($i('delete_message_btn'), 'button', 'button');
- delete_message_btn2.innerHTML = 'No';
- $y(delete_message_btn2,{marginLeft:'4px'});
-
- delete_message_btn2.onclick = function(){ delete_message_dialog.hide();}
-
- delete_message_dialog.onshow = function() {
- $i('delete_message_dialog_response').innerHTML = '';
- }
-
- delete_message_dialog.add = function() {
- if(this.req_frm == 'My Inbox'){
- var args = user + '~~' + this.msg_lst;
- $c_obj('Message Control', 'delete_message', args, function(r, rt){
- if(r.message == 'true'){
- me.hide();
- me.view_list_tab.show();
- $ds(me.view_list_div);
- delete_message_dialog.hide();
- }
- });
- }
- }
- }
-
- if(!delete_message_dialog)
- set_delete_message_dialog();
- delete_message_dialog.req_frm = req_frm;
- delete_message_dialog.msg_lst = msg_lst;
- delete_message_dialog.view_list_tab = view_list_tab;
- delete_message_dialog.view_list_div = view_list_div;
- delete_message_dialog.show();
- }
-}
-
-// ---------------- editor---------------------
-
-var editor_count = 0;
-
-function TextAreaEditor(txt, parent, callback, theme_advanced_btn1, theme_advanced_btn2, theme_advanced_btn3, editor_ht) {
-
- this.txt = txt;
- this.parent = parent;
- this.callback = callback;
- if(theme_advanced_btn1) this.theme_advanced_btn1 = theme_advanced_btn1;
- if(theme_advanced_btn2) this.theme_advanced_btn2 = theme_advanced_btn2;
- if(theme_advanced_btn3) this.theme_advanced_btn3 = theme_advanced_btn3;
- if(editor_ht) this.editor_ht = editor_ht;
-
- // load tinyMCE library
- this.load_tiny_mce_library();
-}
-
-TextAreaEditor.prototype.load_tiny_mce_library = function() {
-
- var me = this;
-
- if(!tinymce_loaded) {
- tinymce_loaded = 1;
- tinyMCE_GZ.init(
- {
- themes : "advanced",
- plugins : "style,table,inlinepopups,indicime,emotions",
- languages : "en",
- disk_cache : true
- }, function(){ me.setup_text_area() });
- }
- else {
- me.setup_text_area();
- }
-}
-
-TextAreaEditor.prototype.setup_text_area = function() {
-
- var me = this;
- if(!me.txt) {
- me.txt = $a(me.parent, 'textarea');
- }
-
- editor_count++;
- me.id = 'editor_text_' + editor_count;
- me.txt.setAttribute('id', me.id);
-
- tinyMCE.init({
- theme : "advanced",
- mode : "exact",
- elements: me.id,
- plugins:"table,style,inlinepopups,indicime,emotions",
- theme_advanced_toolbar_location : "top",
- theme_advanced_statusbar_location : "bottom",
- extended_valid_elements: "div[id|dir|class|align|style]",
-
- // w/h
- width: '100%',
- height: me.editor_ht?me.editor_ht:'50px',
-
- // buttons
- //theme_advanced_buttons1 :"bold,italic,underline,strikethrough,blockquote,forecolor,backcolor,bullist,numlist,|,undo,redo,|,image,code,indicime,indicimehelp,emotions",
- theme_advanced_buttons1 : me.theme_advanced_btn1?me.theme_advanced_btn1:"bold,italic,underline,forecolor,backcolor,|,undo,redo,|,link,unlink,indicime,indicimehelp,emotions",
- theme_advanced_buttons2 : me.theme_advanced_btn2?me.theme_advanced_btn2:"",
- theme_advanced_buttons3 : me.theme_advanced_btn3?me.theme_advanced_btn3:"",
-
- // callback function with editor instance.
- init_instance_callback : "editor_init_callback"
- });
-
- editor_init_callback = function(inst) {
- me.editor = tinyMCE.get(me.id);
- me.editor.focus();
-
- if(me.callback){
- me.callback(me.editor);
- }
- }
-}
\ No newline at end of file
diff --git a/erpnext/utilities/page/messages/messages.py b/erpnext/utilities/page/messages/messages.py
new file mode 100644
index 0000000..b282991
--- /dev/null
+++ b/erpnext/utilities/page/messages/messages.py
@@ -0,0 +1,72 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import webnotes
+
+@webnotes.whitelist()
+def get_list(arg=None):
+ """get list of messages"""
+ webnotes.form_dict['limit_start'] = int(webnotes.form_dict['limit_start'])
+ webnotes.form_dict['limit_page_length'] = int(webnotes.form_dict['limit_page_length'])
+ webnotes.form_dict['user'] = webnotes.session['user']
+
+ if webnotes.form_dict['contact'] == webnotes.session['user']:
+ # set all messages as read
+ webnotes.conn.sql("""UPDATE `tabComment Widget Record`
+ set docstatus = 1 where comment_doctype in ('My Company', 'Message')
+ and comment_docname = %s
+ """, webnotes.user.name)
+
+ # return messages
+ return webnotes.conn.sql("""select * from `tabComment Widget Record`
+ where (owner=%(contact)s or comment_docname=%(user)s)
+ and comment_doctype in ('My Company', 'Message')
+ order by creation desc
+ limit %(limit_start)s, %(limit_page_length)s""", webnotes.form_dict, as_dict=1)
+ else:
+ return webnotes.conn.sql("""select * from `tabComment Widget Record`
+ where (owner=%(contact)s and comment_docname=%(user)s)
+ or (owner=%(user)s and comment_docname=%(contact)s)
+ and comment_doctype in ('My Company', 'Message')
+ order by creation desc
+ limit %(limit_start)s, %(limit_page_length)s""", webnotes.form_dict, as_dict=1)
+
+
+@webnotes.whitelist()
+def get_active_users(arg=None):
+ return webnotes.conn.sql("""select name from tabProfile
+ where ifnull(enabled,0)=1 and
+ docstatus < 2 and
+ name not in ('Administrator', 'Guest')
+ order by first_name""", as_dict=1)
+
+@webnotes.whitelist()
+def post(arg=None):
+ """post message"""
+ import json
+ arg = json.loads(arg)
+ from webnotes.model.doc import Document
+ d = Document('Comment Widget Record')
+ d.comment = arg['txt']
+ d.comment_docname = arg['contact']
+ d.comment_doctype = 'Message'
+ d.save()
+
+@webnotes.whitelist()
+def delete(arg=None):
+ webnotes.conn.sql("""delete from `tabComment Widget Record` where name=%s""",
+ webnotes.form_dict['name']);
+
\ No newline at end of file
diff --git a/erpnext/utilities/page/messages/messages.txt b/erpnext/utilities/page/messages/messages.txt
index 8369afe..4ea71b2 100644
--- a/erpnext/utilities/page/messages/messages.txt
+++ b/erpnext/utilities/page/messages/messages.txt
@@ -1 +1,28 @@
-[{'creation': '2010-06-07 10:34:37', 'module': 'Tools', 'doctype': 'Page', 'owner': 'Administrator', 'style': None, 'modified_by': 'nabin@webnotestech.com', 'script': None, 'show_in_menu': 1, 'content': None, 'page_name': 'Messages', 'menu_index': None, 'docstatus': 0, 'parent': None, 'standard': 'Yes', 'icon': None, 'name': 'Messages', 'idx': None, 'static_content': None, 'modified': '2010-09-25 00:00:00', 'parenttype': None, 'parent_node': None, 'parentfield': None}, {'modified_by': 'nabin@webnotestech.com', 'name': 'PR000137', 'parent': 'Messages', 'creation': '2010-06-07 10:34:37', 'modified': '2010-09-01 14:56:20', 'doctype': 'Page Role', 'idx': 1, 'parenttype': 'Page', 'role': 'Administrator', 'owner': 'Administrator', 'docstatus': 0, 'parentfield': 'roles'}, {'modified_by': 'nabin@webnotestech.com', 'name': 'PR000138', 'parent': 'Messages', 'creation': '2010-06-07 13:35:43', 'modified': '2010-09-01 14:56:20', 'doctype': 'Page Role', 'idx': 2, 'parenttype': 'Page', 'role': 'All', 'owner': 'Administrator', 'docstatus': 0, 'parentfield': 'roles'}]
\ No newline at end of file
+# Page, messages
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-24 11:21:57',
+ 'docstatus': 0,
+ 'modified': '2012-02-24 11:21:57',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Utilities',
+ 'name': '__common__',
+ 'page_name': u'messages',
+ 'standard': u'Yes',
+ 'title': u'Messages'
+ },
+
+ # Page, messages
+ {
+ 'doctype': 'Page',
+ 'name': u'messages'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/utilities/page/messages/messages_static.html b/erpnext/utilities/page/messages/messages_static.html
deleted file mode 100644
index 094418b..0000000
--- a/erpnext/utilities/page/messages/messages_static.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<div>
-</div>
\ No newline at end of file
diff --git a/erpnext/utilities/page/file_browser/__init__.py b/erpnext/utilities/page/todo/__init__.py
similarity index 100%
copy from erpnext/utilities/page/file_browser/__init__.py
copy to erpnext/utilities/page/todo/__init__.py
diff --git a/erpnext/utilities/page/todo/todo.css b/erpnext/utilities/page/todo/todo.css
new file mode 100644
index 0000000..4ac49d6
--- /dev/null
+++ b/erpnext/utilities/page/todo/todo.css
@@ -0,0 +1,31 @@
+.todoitem {
+ padding-bottom: 11px;
+ border-bottom: 1px solid #DEB85F;
+ margin-bottom: 5px;
+ height: 14px;
+}
+
+.todoitem .label {
+ width: 50px;
+ display: inline-block;
+ text-align: center;
+ margin-right: 7px;
+}
+
+.todoitem .close {
+ margin-left: 14px;
+ font-size: 14px;
+ float: left;
+}
+
+.todoitem .ref_link {
+ float: left;
+ margin-left: 14px;
+ display: inline-block;
+ line-height: 18px;
+}
+
+.todoitem .description {
+ cursor: pointer;
+ float: left;
+}
\ No newline at end of file
diff --git a/erpnext/utilities/page/todo/todo.html b/erpnext/utilities/page/todo/todo.html
new file mode 100644
index 0000000..3400455
--- /dev/null
+++ b/erpnext/utilities/page/todo/todo.html
@@ -0,0 +1,10 @@
+<div class="layout-wrapper" style="min-height: 300px; background-color: #FFFDC9">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>To Do</h1>
+ <br>
+ <div id="todo-list">
+ </div>
+ <div style="margin-top: 21px">
+ <button id="add-todo" class="btn btn-small"><i class="icon-plus"></i> Add</button>
+ </div>
+</div>
\ No newline at end of file
diff --git a/erpnext/utilities/page/todo/todo.js b/erpnext/utilities/page/todo/todo.js
new file mode 100644
index 0000000..dfaa7cd
--- /dev/null
+++ b/erpnext/utilities/page/todo/todo.js
@@ -0,0 +1,156 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+wn.provide('erpnext.todo');
+
+erpnext.todo.refresh = function() {
+ wn.call({
+ method: 'utilities.page.todo.todo.get',
+ callback: function(r,rt) {
+ $('#todo-list').empty();
+ if(r.message) {
+ for(var i in r.message) {
+ new erpnext.todo.ToDoItem(r.message[i]);
+ }
+ } else {
+ $('#todo-list').html('<div class="help-box">Nothing to do :)</div>');
+ }
+ }
+ });
+
+ $('#add-todo').click(function() {
+ erpnext.todo.make_dialog({
+ date:get_today(), priority:'Medium', checked:0, description:''});
+ })
+}
+
+erpnext.todo.ToDoItem = Class.extend({
+ init: function(todo) {
+ label_map = {
+ 'High': 'label-important',
+ 'Medium': 'label-info',
+ 'Low':''
+ }
+ todo.labelclass = label_map[todo.priority];
+ todo.userdate = dateutil.str_to_user(todo.date);
+ if(todo.reference_name && todo.reference_type) {
+ todo.link = repl('<a href="#!Form/%(reference_type)s/%(reference_name)s">\
+ %(reference_name)s</a>', todo);
+ } else if(todo.reference_type) {
+ todo.link = repl('<a href="#!List/%(reference_type)s">\
+ %(reference_type)s</a>', todo);
+ } else {
+ todo.link = '';
+ }
+ $('#todo-list').append(repl('<div class="todoitem">\
+ <span class="description">\
+ <span class="label %(labelclass)s">%(priority)s</span>\
+ <span class="help" style="margin-right: 7px">%(userdate)s</span>\
+ %(description)s</span>\
+ <span class="ref_link">→\
+ %(link)s</span>\
+ <a href="#" class="close">×</a>\
+ </div>', todo));
+ $todo = $('div.todoitem:last');
+
+ if(todo.checked) {
+ $todo.find('.description').css('text-decoration', 'line-through');
+ }
+
+ if(!todo.reference_type)
+ $todo.find('.ref_link').toggle(false);
+
+ $todo.find('.description')
+ .data('todo', todo)
+ .click(function() {
+ erpnext.todo.make_dialog($(this).data('todo'));
+ return false;
+ });
+
+ $todo.find('.close')
+ .data('name', todo.name)
+ .click(function() {
+ $(this).parent().css('opacity', 0.5);
+ wn.call({
+ method:'utilities.page.todo.todo.delete',
+ args: {name: $(this).data('name')},
+ callback: function() {
+ erpnext.todo.refresh();
+ }
+ });
+ return false;
+ })
+ }
+});
+
+erpnext.todo.make_dialog = function(det) {
+ if(!erpnext.todo.dialog) {
+ var dialog = new wn.widgets.Dialog();
+ dialog.make({
+ width: 480,
+ title: 'To Do',
+ fields: [
+ {fieldtype:'Date', fieldname:'date', label:'Event Date', reqd:1},
+ {fieldtype:'Text', fieldname:'description', label:'Description', reqd:1},
+ {fieldtype:'Check', fieldname:'checked', label:'Completed'},
+ {fieldtype:'Select', fieldname:'priority', label:'Priority', reqd:1, 'options':['Medium','High','Low'].join('\n')},
+ {fieldtype:'Button', fieldname:'save', label:'Save'}
+ ]
+ });
+
+ dialog.fields_dict.save.input.onclick = function() {
+ erpnext.todo.save(this);
+ }
+ erpnext.todo.dialog = dialog;
+ }
+
+ if(det) {
+ erpnext.todo.dialog.set_values({
+ date: det.date,
+ priority: det.priority,
+ description: det.description,
+ checked: det.checked
+ });
+ erpnext.todo.dialog.det = det;
+ }
+ erpnext.todo.dialog.show();
+
+}
+
+erpnext.todo.save = function(btn) {
+ var d = erpnext.todo.dialog;
+ var det = d.get_values();
+
+ if(!det) {
+ return;
+ }
+
+ det.name = d.det.name || '';
+ wn.call({
+ method:'utilities.page.todo.todo.edit',
+ args: det,
+ btn: btn,
+ callback: function() {
+ erpnext.todo.dialog.hide();
+ erpnext.todo.refresh();
+ }
+ });
+}
+
+wn.pages.todo.onload = function() {
+ // load todos
+ erpnext.todo.refresh();
+}
diff --git a/erpnext/utilities/page/todo/todo.py b/erpnext/utilities/page/todo/todo.py
new file mode 100644
index 0000000..05d55fe
--- /dev/null
+++ b/erpnext/utilities/page/todo/todo.py
@@ -0,0 +1,62 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import webnotes
+from webnotes.model.doc import Document
+
+@webnotes.whitelist()
+def get(arg=None):
+ """get todo list"""
+ return webnotes.conn.sql("""select name, owner, description, date,
+ priority, checked, reference_type, reference_name, assigned_by
+ from `tabToDo Item` where owner=%s
+ order by field(priority, 'High', 'Medium', 'Low') asc, date asc""",
+ webnotes.session['user'], as_dict=1)
+
+@webnotes.whitelist()
+def edit(arg=None):
+ args = webnotes.form_dict
+
+ d = Document('ToDo Item', args.get('name') or None)
+ d.description = args['description']
+ d.date = args['date']
+ d.priority = args['priority']
+ d.checked = args.get('checked', 0)
+ d.owner = webnotes.session['user']
+ d.save(not args.get('name') and 1 or 0)
+
+ if args.get('name') and d.checked:
+ notify_assignment(d)
+
+ return d.name
+
+@webnotes.whitelist()
+def delete(arg=None):
+ name = webnotes.form_dict['name']
+ d = Document('ToDo Item', name)
+ if d and d.name:
+ notify_assignment(d)
+ webnotes.conn.sql("delete from `tabToDo Item` where name = %s", name)
+
+def notify_assignment(d):
+ doc_type = d.reference_type
+ doc_name = d.reference_name
+ assigned_by = d.assigned_by
+
+ if doc_type and doc_name and assigned_by:
+ from webnotes.widgets.form import assign_to
+ assign_to.notify_assignment(assigned_by, d.owner, doc_type, doc_name)
+
\ No newline at end of file
diff --git a/erpnext/utilities/page/todo/todo.txt b/erpnext/utilities/page/todo/todo.txt
new file mode 100644
index 0000000..7310906
--- /dev/null
+++ b/erpnext/utilities/page/todo/todo.txt
@@ -0,0 +1,28 @@
+# Page, todo
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-23 13:59:03',
+ 'docstatus': 0,
+ 'modified': '2012-02-23 13:59:03',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Utilities',
+ 'name': '__common__',
+ 'page_name': u'todo',
+ 'standard': u'Yes',
+ 'title': u'To Do'
+ },
+
+ # Page, todo
+ {
+ 'doctype': 'Page',
+ 'name': u'todo'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/utilities/page/trash/trash.js b/erpnext/utilities/page/trash/trash.js
index a1b44d4..b30626d 100644
--- a/erpnext/utilities/page/trash/trash.js
+++ b/erpnext/utilities/page/trash/trash.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript['onload_Trash'] = function() {
// header and toolbar
diff --git a/erpnext/utilities/page/file_browser/__init__.py b/erpnext/utilities/page/users/__init__.py
similarity index 100%
copy from erpnext/utilities/page/file_browser/__init__.py
copy to erpnext/utilities/page/users/__init__.py
diff --git a/erpnext/utilities/page/users/users.css b/erpnext/utilities/page/users/users.css
new file mode 100644
index 0000000..1a85d15
--- /dev/null
+++ b/erpnext/utilities/page/users/users.css
@@ -0,0 +1,35 @@
+.user-card {
+ border-radius: 5px;
+ width: 200px;
+ margin: 11px;
+ padding: 11px;
+ background-color: #FFEDBD;
+ box-shadow: 3px 3px 5px #888;
+ float: left;
+ overflow: hidden;
+}
+
+.user-card.disabled {
+ background-color: #eee;
+}
+
+.user-card img {
+ height: 60px;
+}
+
+.user-role {
+ padding: 5px;
+ width: 45%;
+ float: left;
+}
+
+table.user-perm {
+ border-collapse: collapse;
+}
+
+table.user-perm td, table.user-perm th {
+ padding: 5px;
+ text-align: center;
+ border-bottom: 1px solid #aaa;
+ min-width: 30px;
+}
\ No newline at end of file
diff --git a/erpnext/utilities/page/users/users.html b/erpnext/utilities/page/users/users.html
new file mode 100644
index 0000000..fe2f000
--- /dev/null
+++ b/erpnext/utilities/page/users/users.html
@@ -0,0 +1,13 @@
+<div class="layout-wrapper">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Users</h1>
+ <hr>
+ <div class="help" style="margin-bottom: 20px">Add, disable, delete users and change their roles, passwords and security settings</div>
+ <div style="margin: 11px">
+ <button class="btn btn-small add-user" onclick="wn.pages.users.add_user()"
+ ><i class="icon-plus"></i> Add User</button>
+ </div>
+ <div class="users-area">
+ </div>
+ <div style="clear: both"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/utilities/page/users/users.js b/erpnext/utilities/page/users/users.js
new file mode 100644
index 0000000..324a9d7
--- /dev/null
+++ b/erpnext/utilities/page/users/users.js
@@ -0,0 +1,378 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+$.extend(wn.pages.users, {
+ onload: function(wrapper) {
+ wn.pages.users.profiles = {};
+ wn.pages.users.refresh();
+ wn.pages.users.setup();
+ wn.pages.users.role_editor = new erpnext.RoleEditor();
+ },
+ setup: function() {
+ // set roles
+ $('.users-area').on('click', '.btn.user-roles', function() {
+ var uid = $(this).parent().parent().attr('data-name');
+ wn.pages.users.role_editor.show(uid);
+ });
+
+ // settings
+ $('.users-area').on('click', '.btn.user-settings', function() {
+ var uid = $(this).parent().parent().attr('data-name');
+ wn.pages.users.show_settings(uid);
+ });
+
+ // delete
+ $('.users-area').on('click', 'a.close', function() {
+ $card = $(this).parent();
+ var uid = $card.attr('data-name');
+ $card.css('opacity', 0.6);
+ wn.call({
+ method: 'utilities.page.users.users.delete',
+ args: {'uid': uid},
+ callback: function(r,rt) {
+ if(!r.exc)
+ $card.fadeOut()
+ }
+ });
+ })
+
+ },
+ refresh: function() {
+ // make the list
+ wn.call({
+ method:'utilities.page.users.users.get',
+ callback: function(r, rt) {
+ $('.users-area').empty();
+ for(var i in r.message) {
+ var p = r.message[i];
+ wn.pages.users.profiles[p.name] = p;
+ wn.pages.users.render(p);
+ }
+ }
+ });
+ },
+ render: function(data) {
+ if(data.file_list) {
+ data.imgsrc = 'files/' + data.file_list.split('\n')[0].split(',')[1];
+ } else {
+ data.imgsrc = 'lib/images/ui/no_img_' + (data.gender=='Female' ? 'f' : 'm') + '.gif';
+ }
+ data.fullname = wn.user_info(data.name).fullname;
+ data.delete_html = '';
+ if(!data.enabled)
+ data.delete_html = '<a class="close" title="delete">×</a>';
+
+ $('.users-area').append(repl('<div class="user-card" data-name="%(name)s">\
+ %(delete_html)s\
+ <img src="%(imgsrc)s">\
+ <div class="user-info">\
+ <b class="user-fullname">%(fullname)s</b><br>\
+ %(name)s<br>\
+ <button class="btn btn-small user-roles"><i class="icon-user"></i> Roles</button>\
+ <button class="btn btn-small user-settings"><i class="icon-cog"></i> Settings</button>\
+ </div>\
+ </div>', data));
+
+ if(!data.enabled) {
+ $('.users-area .user-card:last')
+ .addClass('disabled')
+ .find('.user-fullname').html('Disabled');
+ }
+ },
+ show_settings: function(uid) {
+ var me = wn.pages.users;
+ if(!me.settings_dialog)
+ me.make_settings_dialog();
+
+ var p = me.profiles[uid];
+ me.uid = uid;
+
+ me.settings_dialog.set_values({
+ restrict_ip: p.restrict_ip || '',
+ login_before: p.login_before || '',
+ login_after: p.login_after || '',
+ enabled: p.enabled || 0,
+ new_password: ''
+ });
+
+ me.settings_dialog.show();
+
+ },
+ make_settings_dialog: function() {
+ var me = wn.pages.users;
+ me.settings_dialog = new wn.widgets.Dialog({
+ title: 'Set User Security',
+ width: 500,
+ fields: [
+ {
+ label:'Enabled',
+ description: 'Uncheck to disable',
+ fieldtype: 'Check', fieldname: 'enabled'
+ },
+ {
+ label:'IP Address',
+ description: 'Restrict user login by IP address, partial ips (111.111.111), \
+ multiple addresses (separated by commas) allowed',
+ fieldname:'restrict_ip', fieldtype:'Data'
+ },
+ {
+ label:'Login After',
+ description: 'User can only login after this hour (0-24)',
+ fieldtype: 'Int', fieldname: 'login_after'
+ },
+ {
+ label:'Login Before',
+ description: 'User can only login before this hour (0-24)',
+ fieldtype: 'Int', fieldname: 'login_before'
+ },
+ {
+ label:'New Password',
+ description: 'Update the current user password',
+ fieldtype: 'Data', fieldname: 'new_password'
+ },
+ {
+ label:'Update', fieldtype:'Button', fieldname:'update'
+ }
+ ]
+ });
+
+ this.settings_dialog.fields_dict.update.input.onclick = function() {
+ var btn = this;
+ var args = me.settings_dialog.get_values();
+ args.user = me.uid;
+
+ if (args.new_password) {
+ me.get_password(btn, args);
+ } else {
+ me.update_security(btn, args);
+ }
+ };
+
+ },
+ update_security: function(btn, args) {
+ var me = wn.pages.users;
+ $(btn).set_working();
+ $c_page('utilities', 'users', 'update_security', JSON.stringify(args), function(r,rt) {
+ $(btn).done_working();
+ if(r.exc) {
+ msgprint(r.exc);
+ return;
+ }
+ me.settings_dialog.hide();
+ $.extend(me.profiles[me.uid], me.settings_dialog.get_values());
+ me.refresh();
+ });
+ },
+ get_password: function(btn, args) {
+ var me = wn.pages.users;
+ var pass_d = new wn.widgets.Dialog({
+ title: 'Your Password',
+ width: 300,
+ fields: [
+ {
+ label: 'Please Enter <b style="color: black">Your Password</b>',
+ description: "Your password is required to update the user's password",
+ fieldtype: 'Password', fieldname: 'sys_admin_pwd', reqd: 1
+ },
+ {
+ label: 'Continue', fieldtype: 'Button', fieldname: 'continue'
+ }
+ ]
+ });
+
+ pass_d.fields_dict.continue.input.onclick = function() {
+ btn.pwd_dialog.hide();
+ args.sys_admin_pwd = btn.pwd_dialog.get_values().sys_admin_pwd;
+ btn.set_working();
+ me.update_security(args);
+ btn.done_working();
+ }
+
+ pass_d.show();
+ btn.pwd_dialog = pass_d;
+ btn.done_working();
+ },
+ add_user: function() {
+ var me = wn.pages.users;
+ var d = new wn.widgets.Dialog({
+ title: 'Add User',
+ width: 400,
+ fields: [{
+ fieldtype: 'Data', fieldname: 'user', reqd: 1,
+ label: 'Email Id of the user to add'
+ }, {
+ fieldtype: 'Data', fieldname: 'first_name', reqd: 1, label: 'First Name'
+ }, {
+ fieldtype: 'Data', fieldname: 'last_name', label: 'Last Name'
+ }, {
+ fieldtype: 'Data', fieldname: 'password', reqd: 1, label: 'Password'
+ }, {
+ fieldtype: 'Button', label: 'Add', fieldname: 'add'
+ }]
+ });
+
+ d.make();
+ d.fields_dict.add.input.onclick = function() {
+ v = d.get_values();
+ if(v) {
+ d.fields_dict.add.input.set_working();
+ $c_page('utilities', 'users', 'add_user', v, function(r,rt) {
+ if(r.exc) { msgprint(r.exc); return; }
+ else {
+ wn.boot.user_info[v.user] = {fullname:v.first_name + ' ' + v.last_name};
+ d.hide();
+ me.refresh();
+ }
+ })
+ }
+ }
+ d.show();
+ }
+});
+
+erpnext.RoleEditor = Class.extend({
+ init: function() {
+ this.dialog = new wn.widgets.Dialog({
+ title: 'Set Roles'
+ });
+ var me = this;
+ $(this.dialog.body).html('<div class="help">Loading...</div>')
+ wn.call({
+ method:'utilities.page.users.users.get_roles',
+ callback: function(r) {
+ me.roles = r.message;
+ me.show_roles();
+ }
+ });
+ },
+ show_roles: function() {
+ var me = this;
+ $(this.dialog.body).empty();
+ for(var i in this.roles) {
+ $(this.dialog.body).append(repl('<div class="user-role" \
+ data-user-role="%(role)s">\
+ <input type="checkbox"> \
+ <a href="#"><i class="icon-question-sign"></i></a> %(role)s\
+ </div>', {role: this.roles[i]}));
+ }
+ $(this.dialog.body).append('<div style="clear: both">\
+ <button class="btn btn-small btn-primary">Save</button></div>');
+ $(this.dialog.body).find('button.btn-primary').click(function() {
+ me.save();
+ });
+ $(this.dialog.body).find('.user-role a').click(function() {
+ me.show_permissions($(this).parent().attr('data-user-role'))
+ return false;
+ })
+ },
+ show: function(uid) {
+ var me = this;
+ this.uid = uid;
+ this.dialog.show();
+ // set user roles
+ wn.call({
+ method:'utilities.page.users.users.get_user_roles',
+ args: {uid:uid},
+ callback: function(r, rt) {
+ $(me.dialog.body).find('input[type="checkbox"]').attr('checked', false);
+ for(var i in r.message) {
+ $(me.dialog.body)
+ .find('[data-user-role="'+r.message[i]
+ +'"] input[type="checkbox"]').attr('checked',true);
+ }
+ }
+ })
+ },
+ save: function() {
+ var set_roles = [];
+ var unset_roles = [];
+ $(this.dialog.body).find('[data-user-role]').each(function() {
+ var $check = $(this).find('input[type="checkbox"]');
+ if($check.attr('checked')) {
+ set_roles.push($(this).attr('data-user-role'));
+ } else {
+ unset_roles.push($(this).attr('data-user-role'));
+ }
+ })
+ wn.call({
+ method:'utilities.page.users.users.update_roles',
+ args: {
+ set_roles: JSON.stringify(set_roles),
+ unset_roles: JSON.stringify(unset_roles),
+ uid: this.uid
+ },
+ btn: $(this.dialog.body).find('.btn-primary').get(0),
+ callback: function() {
+
+ }
+ })
+ },
+ show_permissions: function(role) {
+ // show permissions for a role
+ var me = this;
+ if(!this.perm_dialog)
+ this.make_perm_dialog()
+ $(this.perm_dialog.body).empty();
+ wn.call({
+ method:'utilities.page.users.users.get_perm_info',
+ args: {role: role},
+ callback: function(r) {
+ var $body = $(me.perm_dialog.body);
+ $body.append('<table class="user-perm"><tbody><tr>\
+ <th style="text-align: left">Document Type</th>\
+ <th>Level</th>\
+ <th>Read</th>\
+ <th>Write</th>\
+ <th>Submit</th>\
+ <th>Cancel</th>\
+ <th>Amend</th></tr></tbody></table>');
+ for(var i in r.message) {
+ var perm = r.message[i];
+
+ // if permission -> icon
+ for(key in perm) {
+ if(key!='parent' && key!='permlevel') {
+ if(perm[key]) {
+ perm[key] = '<i class="icon-ok"></i>';
+ } else {
+ perm[key] = '';
+ }
+ }
+ }
+
+ $body.find('tbody').append(repl('<tr>\
+ <td style="text-align: left">%(parent)s</td>\
+ <td>%(permlevel)s</td>\
+ <td>%(read)s</td>\
+ <td>%(write)s</td>\
+ <td>%(submit)s</td>\
+ <td>%(cancel)s</td>\
+ <td>%(amend)s</td>\
+ </tr>', perm))
+ }
+
+ me.perm_dialog.show();
+ }
+ });
+
+ },
+ make_perm_dialog: function() {
+ this.perm_dialog = new wn.widgets.Dialog({
+ title:'Role Permissions',
+ width: 500
+ });
+ }
+})
diff --git a/erpnext/utilities/page/users/users.py b/erpnext/utilities/page/users/users.py
new file mode 100644
index 0000000..ca48213
--- /dev/null
+++ b/erpnext/utilities/page/users/users.py
@@ -0,0 +1,193 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import webnotes
+import json
+
+from webnotes.model.doc import Document
+from webnotes.utils import cint
+
+@webnotes.whitelist()
+def get(arg=None):
+ """return all users"""
+ return webnotes.conn.sql("""select name, file_list, enabled, gender,
+ restrict_ip, login_before, login_after from tabProfile
+ where docstatus<2 and name not in ('Administrator', 'Guest') order by
+ ifnull(enabled,0) desc, name""", as_dict=1)
+
+@webnotes.whitelist()
+def get_roles(arg=None):
+ """return all roles"""
+ return [r[0] for r in webnotes.conn.sql("""select name from tabRole
+ where name not in ('Administrator', 'Guest', 'All') order by name""")]
+
+@webnotes.whitelist()
+def get_user_roles(arg=None):
+ """get roles for a user"""
+ return [r[0] for r in webnotes.conn.sql("""select role from tabUserRole
+ where parent=%s""", webnotes.form_dict['uid'])]
+
+@webnotes.whitelist()
+def get_perm_info(arg=None):
+ """get permission info"""
+ return webnotes.conn.sql("""select parent, permlevel, `read`, `write`, submit,
+ cancel, amend from tabDocPerm where role=%s
+ and docstatus<2 order by parent, permlevel""",
+ webnotes.form_dict['role'], as_dict=1)
+
+@webnotes.whitelist()
+def update_roles(arg=None):
+ """update set and unset roles"""
+ # remove roles
+ unset = json.loads(webnotes.form_dict['unset_roles'])
+ webnotes.conn.sql("""delete from tabUserRole where parent='%s'
+ and role in ('%s')""" % (webnotes.form_dict['uid'], "','".join(unset)))
+
+ # check for 1 system manager
+ if not webnotes.conn.sql("""select parent from tabUserRole where role='System Manager'
+ and docstatus<2"""):
+ webnotes.msgprint("Sorry there must be atleast one 'System Manager'")
+ raise webnotes.ValidationError
+
+ # add roles
+ roles = get_user_roles()
+ toset = json.loads(webnotes.form_dict['set_roles'])
+ for role in toset:
+ if not role in roles:
+ d = Document('UserRole')
+ d.role = role
+ d.parent = webnotes.form_dict['uid']
+ d.save()
+
+ webnotes.msgprint('Roles Updated')
+
+@webnotes.whitelist()
+def update_security(args=''):
+ args = json.loads(args)
+ webnotes.conn.set_value('Profile', args['user'], 'restrict_ip', args.get('restrict_ip'))
+ webnotes.conn.set_value('Profile', args['user'], 'login_after', args.get('login_after'))
+ webnotes.conn.set_value('Profile', args['user'], 'login_before', args.get('login_before'))
+ webnotes.conn.set_value('Profile', args['user'], 'enabled', int(args.get('enabled',0)) or 0)
+
+ if 'new_password' in args:
+ if cint(webnotes.conn.get_value('Control Panel',None,'sync_with_gateway')):
+ import server_tools.gateway_utils
+ res = server_tools.gateway_utils.change_password('', args['new_password'],
+ args['user'], args['sys_admin_pwd'])
+ if 'Traceback' not in res['message']:
+ webnotes.msgprint(res['message'])
+ webnotes.conn.sql("update tabProfile set password=password(%s) where name=%s",
+ (args['new_password'], args['user']))
+ else:
+ webnotes.msgprint('Settings Updated')
+
+
+
+#
+# user addition
+#
+
+@webnotes.whitelist()
+def add_user(args):
+ args = json.loads(args)
+ # erpnext-saas
+ if cint(webnotes.conn.get_value('Control Panel', None, 'sync_with_gateway')):
+ from server_tools.gateway_utils import add_user_gateway
+ add_user_gateway(args['user'])
+
+ add_profile(args)
+
+@webnotes.whitelist()
+def add_profile(args):
+ from webnotes.utils import validate_email_add, now
+ email = args['user']
+
+ sql = webnotes.conn.sql
+
+ if not email:
+ email = webnotes.form_dict.get('user')
+ if not validate_email_add(email):
+ raise Exception
+ return 'Invalid Email Id'
+
+ if sql("select name from tabProfile where name = %s", email):
+ # exists, enable it
+ sql("update tabProfile set enabled = 1, docstatus=0 where name = %s", email)
+ webnotes.msgprint('Profile exists, enabled it with new password')
+ else:
+ # does not exist, create it!
+ pr = Document('Profile')
+ pr.name = email
+ pr.email = email
+ pr.first_name = args.get('first_name')
+ pr.last_name = args.get('last_name')
+ pr.enabled = 1
+ pr.user_type = 'System User'
+ pr.save(1)
+
+ if args.get('password'):
+ sql("""
+ UPDATE tabProfile
+ SET password = PASSWORD(%s), modified = %s
+ WHERE name = %s""", (args.get('password'), now, email))
+
+ send_welcome_mail(email, args)
+
+@webnotes.whitelist()
+def send_welcome_mail(email, args):
+ """send welcome mail to user with password and login url"""
+ pr = Document('Profile', email)
+ from webnotes.utils.email_lib import sendmail_md
+ args.update({
+ 'company': webnotes.conn.get_default('company'),
+ 'password': args.get('password'),
+ 'account_url': webnotes.conn.get_value('Website Settings',
+ 'Website Settings', 'subdomain') or ""
+ })
+ if not args.get('last_name'): args['last_name'] = ''
+ sendmail_md(pr.email, subject="Welcome to ERPNext", msg=welcome_txt % args, from_defs=1)
+
+#
+# delete user
+#
+@webnotes.whitelist()
+def delete(arg=None):
+ """delete user"""
+ webnotes.conn.sql("update tabProfile set enabled=0, docstatus=2 where name=%s",
+ webnotes.form_dict['uid'])
+ # erpnext-saas
+ if int(webnotes.conn.get_value('Control Panel', None, 'sync_with_gateway')):
+ from server_tools.gateway_utils import remove_user_gateway
+ remove_user_gateway(webnotes.form_dict['uid'])
+
+ webnotes.login_manager.logout(user=webnotes.form_dict['uid'])
+
+welcome_txt = """
+## %(company)s
+
+Dear %(first_name)s %(last_name)s
+
+Welcome!
+
+A new account has been created for you, here are your details:
+
+login-id: %(user)s
+password: %(password)s
+
+To login to your new ERPNext account, please go to:
+
+%(account_url)s
+"""
diff --git a/erpnext/utilities/page/users/users.txt b/erpnext/utilities/page/users/users.txt
new file mode 100644
index 0000000..165cc16
--- /dev/null
+++ b/erpnext/utilities/page/users/users.txt
@@ -0,0 +1,28 @@
+# Page, users
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-28 10:29:39',
+ 'docstatus': 0,
+ 'modified': '2012-02-28 10:29:39',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Utilities',
+ 'name': '__common__',
+ 'page_name': u'users',
+ 'standard': u'Yes',
+ 'title': u'Users'
+ },
+
+ # Page, users
+ {
+ 'doctype': 'Page',
+ 'name': u'users'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/utilities/page/wip_monitor/wip_monitor.js b/erpnext/utilities/page/wip_monitor/wip_monitor.js
index f5a2a62..9e7bdd0 100644
--- a/erpnext/utilities/page/wip_monitor/wip_monitor.js
+++ b/erpnext/utilities/page/wip_monitor/wip_monitor.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript['onload_WIP Monitor'] = function(){
wip = new WIP_Monitor();
diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py
index 7cb7479..b78bed1 100644
--- a/erpnext/utilities/transaction_base.py
+++ b/erpnext/utilities/transaction_base.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.utils import load_json, cint, cstr, flt, get_defaults
from webnotes.model.doc import Document, addchild, removechild, getchildren
diff --git a/erpnext/website/css/website.css b/erpnext/website/css/website.css
index 9fd7f12..693b8fb 100644
--- a/erpnext/website/css/website.css
+++ b/erpnext/website/css/website.css
@@ -1,8 +1,3 @@
-#body_div {
- width: 900px;
- margin: auto;
-}
-
.layout_wrapper {
padding: 20px;
}
@@ -30,15 +25,6 @@
margin-bottom: 9px;
}
-footer {
- width: 900px;
- margin: auto;
-}
-header .topbar .container {
- width: 900px;
- margin: auto;
-}
-
.web-content input[type="text"], .web-content input[type="password"], .web-content select {
min-width: 180px;
}
diff --git a/erpnext/website/doctype/about_us_settings/about_us_settings.py b/erpnext/website/doctype/about_us_settings/about_us_settings.py
index 770f1d2..d3cca17 100644
--- a/erpnext/website/doctype/about_us_settings/about_us_settings.py
+++ b/erpnext/website/doctype/about_us_settings/about_us_settings.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
"""
generate html
"""
diff --git a/erpnext/website/doctype/blog/blog.py b/erpnext/website/doctype/blog/blog.py
index 5e50327..1f1b98b 100644
--- a/erpnext/website/doctype/blog/blog.py
+++ b/erpnext/website/doctype/blog/blog.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
"""
record of files
@@ -23,10 +39,10 @@
from jinja2 import Template
import markdown2
import os
- from webnotes.utils import global_date_format, get_full_name
+ from webnotes.utils import global_date_format, get_fullname
self.doc.content_html = markdown2.markdown(self.doc.content or '')
- self.doc.full_name = get_full_name(self.doc.owner)
+ self.doc.full_name = get_fullname(self.doc.owner)
self.doc.updated = global_date_format(self.doc.modified)
with open(os.path.join(os.path.dirname(__file__), 'template.html'), 'r') as f:
diff --git a/erpnext/website/doctype/blog/blog_page.js b/erpnext/website/doctype/blog/blog_page.js
index d8c4076..76cbf81 100644
--- a/erpnext/website/doctype/blog/blog_page.js
+++ b/erpnext/website/doctype/blog/blog_page.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// js inside blog page
pscript['onload_{{ doc.name }}'] = function(wrapper) {
diff --git a/erpnext/website/doctype/contact_us_settings/contact_us_settings.py b/erpnext/website/doctype/contact_us_settings/contact_us_settings.py
index d2fc3c4..9914ade 100644
--- a/erpnext/website/doctype/contact_us_settings/contact_us_settings.py
+++ b/erpnext/website/doctype/contact_us_settings/contact_us_settings.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
"""
generate html
"""
diff --git a/erpnext/website/doctype/product/product.js b/erpnext/website/doctype/product/product.js
index c0b507e..ebdc90a 100644
--- a/erpnext/website/doctype/product/product.js
+++ b/erpnext/website/doctype/product/product.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
$.extend(cur_frm.cscript, {
onload: function() {
cur_frm.add_fetch('item', 'description', 'short_description');
diff --git a/erpnext/website/doctype/product/product.py b/erpnext/website/doctype/product/product.py
index 223a790..4abddc0 100644
--- a/erpnext/website/doctype/product/product.py
+++ b/erpnext/website/doctype/product/product.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
class DocType:
diff --git a/erpnext/website/doctype/product/product.txt b/erpnext/website/doctype/product/product.txt
index 0405e4c..1c2b472 100644
--- a/erpnext/website/doctype/product/product.txt
+++ b/erpnext/website/doctype/product/product.txt
@@ -249,4 +249,4 @@
'permlevel': 0,
'print_hide': 1
}
-]
\ No newline at end of file
+]
diff --git a/erpnext/website/doctype/product/product_page.js b/erpnext/website/doctype/product/product_page.js
index 35359cc..0f0c56b 100644
--- a/erpnext/website/doctype/product/product_page.js
+++ b/erpnext/website/doctype/product/product_page.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
wn.require('erpnext/website/js/product_category.js');
pscript["onload_{{ doc.page_name }}"] = function(wrapper) {
diff --git a/erpnext/website/doctype/products_settings/products_settings.py b/erpnext/website/doctype/products_settings/products_settings.py
index 118ba4f..23c247d 100644
--- a/erpnext/website/doctype/products_settings/products_settings.py
+++ b/erpnext/website/doctype/products_settings/products_settings.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
class DocType:
diff --git a/erpnext/website/doctype/style_settings/custom_template.css b/erpnext/website/doctype/style_settings/custom_template.css
index e6eeeb3..8eb3d63 100644
--- a/erpnext/website/doctype/style_settings/custom_template.css
+++ b/erpnext/website/doctype/style_settings/custom_template.css
@@ -1,6 +1,6 @@
body {
{% if doc.background_image %}
- background: url("files/{{ doc.background_image }}") repeat !important;
+ background: url("files/{{ doc.background_image }}") repeat;
{% elif doc.background_color %}
background-color: #{{ doc.background_color }};
{% endif %}
diff --git a/erpnext/website/doctype/style_settings/style_settings.js b/erpnext/website/doctype/style_settings/style_settings.js
index 95c4143..0d0bf9e 100644
--- a/erpnext/website/doctype/style_settings/style_settings.js
+++ b/erpnext/website/doctype/style_settings/style_settings.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
wn.require('lib/js/lib/jscolor/jscolor.js');
cur_frm.cscript.onload_post_render = function() {
diff --git a/erpnext/website/doctype/style_settings/style_settings.py b/erpnext/website/doctype/style_settings/style_settings.py
index 4aefbf6..83961e0 100644
--- a/erpnext/website/doctype/style_settings/style_settings.py
+++ b/erpnext/website/doctype/style_settings/style_settings.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
diff --git a/erpnext/website/doctype/web_page/web_page.py b/erpnext/website/doctype/web_page/web_page.py
index 6d64c7d..6b0f074 100644
--- a/erpnext/website/doctype/web_page/web_page.py
+++ b/erpnext/website/doctype/web_page/web_page.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
import website.utils
diff --git a/erpnext/website/doctype/website_settings/website_settings.js b/erpnext/website/doctype/website_settings/website_settings.js
index 9aaba62..cbed609 100644
--- a/erpnext/website/doctype/website_settings/website_settings.js
+++ b/erpnext/website/doctype/website_settings/website_settings.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// update parent select
$.extend(cur_frm.cscript, {
diff --git a/erpnext/website/doctype/website_settings/website_settings.py b/erpnext/website/doctype/website_settings/website_settings.py
index fb30f7b..53bf6c8 100644
--- a/erpnext/website/doctype/website_settings/website_settings.py
+++ b/erpnext/website/doctype/website_settings/website_settings.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl
diff --git a/erpnext/website/js/product_category.js b/erpnext/website/js/product_category.js
index 076578a..9e0c7f0 100644
--- a/erpnext/website/js/product_category.js
+++ b/erpnext/website/js/product_category.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
// make sidelisting of categories
erpnext.product_item_group = {}
diff --git a/erpnext/website/js/topbar.js b/erpnext/website/js/topbar.js
index 8b70d1e..90ad3e8 100644
--- a/erpnext/website/js/topbar.js
+++ b/erpnext/website/js/topbar.js
@@ -1,4 +1,20 @@
-wn.provide('erpnext.topbar');
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+wn.provide('erpnext.navbar');
/*
<li class="dropdown">\
@@ -8,22 +24,22 @@
</li>\
*/
-erpnext.topbar.TopBar = Class.extend({
+erpnext.navbar.navbar = Class.extend({
init: function() {
this.make();
$('.brand').html(wn.boot.website_settings.brand_html);
this.make_items();
- $('.topbar').dropdown();
+ $('.dropdown-toggle').dropdown();
},
make: function() {
- $('header').append('<div class="topbar">\
- <div class="topbar-inner">\
+ $('header').append('<div class="navbar navbar-fixed-top">\
+ <div class="navbar-inner">\
<div class="container">\
<a class="brand">[brand]</a>\
<ul class="nav">\
</ul>\
<img src="lib/images/ui/spinner.gif" id="spinner"/>\
- <ul class="nav secondary-nav">\
+ <ul class="nav pull-right">\
<li><a href="#!Login Page">Login</a></li>\
</ul>\
</div>\
@@ -52,7 +68,13 @@
$parent_li = $(repl('header li[data-label="%(parent_label)s"]', item));
if(!$parent_li.hasClass('dropdown')) {
$parent_li.addClass('dropdown');
- $parent_li.find('a:first').addClass('dropdown-toggle');
+ $parent_li.find('a:first').addClass('dropdown-toggle')
+ .attr('data-toggle', 'dropdown')
+ .attr('href', '')
+ .append('<b class="caret"></b>')
+ .click(function() {
+ return false;
+ });
$parent_li.append('<ul class="dropdown-menu"></ul>');
}
item.route = item.url || item.custom_page;
@@ -91,5 +113,5 @@
$(document).bind('startup', function() {
erpnext.footer = new erpnext.Footer();
- erpnext.topbar.topbar = new erpnext.topbar.TopBar();
+ erpnext.navbar.navbar = new erpnext.navbar.navbar();
})
diff --git a/erpnext/website/page/blog/blog.js b/erpnext/website/page/blog/blog.js
index 9e89acd..9ca7392 100644
--- a/erpnext/website/page/blog/blog.js
+++ b/erpnext/website/page/blog/blog.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript.onload_blog = function(wrapper) {
wrapper.blog_list = new wn.widgets.Listing({
diff --git a/erpnext/website/page/blog/blog.py b/erpnext/website/page/blog/blog.py
index 2773624..9790114 100644
--- a/erpnext/website/page/blog/blog.py
+++ b/erpnext/website/page/blog/blog.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
@webnotes.whitelist()
diff --git a/erpnext/website/page/contact/contact.js b/erpnext/website/page/contact/contact.js
index e05023b..c794325 100644
--- a/erpnext/website/page/contact/contact.js
+++ b/erpnext/website/page/contact/contact.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript.onload_contact = function(wrapper) {
$('#content-contact-us .btn.primary').click(function() {
var me = this;
diff --git a/erpnext/website/page/contact/contact.py b/erpnext/website/page/contact/contact.py
index a8a9133..1ee3ab9 100644
--- a/erpnext/website/page/contact/contact.py
+++ b/erpnext/website/page/contact/contact.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import json, webnotes
@webnotes.whitelist(allow_guest=True)
diff --git a/erpnext/website/page/products/products.js b/erpnext/website/page/products/products.js
index 4877eee..7af551e 100644
--- a/erpnext/website/page/products/products.js
+++ b/erpnext/website/page/products/products.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
erpnext.products = {}
wn.require('erpnext/website/js/product_category.js');
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.js b/erpnext/website/page/unsubscribe/unsubscribe.js
index 7cbed37..9e83020 100644
--- a/erpnext/website/page/unsubscribe/unsubscribe.js
+++ b/erpnext/website/page/unsubscribe/unsubscribe.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
pscript.onload_unsubscribe = function(wrapper) {
var email = window.location.hash.split('/').splice(-1);
$(wrapper).find('input[name="unsubscribe"]').val(email)
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.py b/erpnext/website/page/unsubscribe/unsubscribe.py
index c310c61..9985ded 100644
--- a/erpnext/website/page/unsubscribe/unsubscribe.py
+++ b/erpnext/website/page/unsubscribe/unsubscribe.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
@webnotes.whitelist()
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/website/page/website_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/website/page/website_home/__init__.py
diff --git a/erpnext/website/page/website_home/website_home.html b/erpnext/website/page/website_home/website_home.html
new file mode 100644
index 0000000..f7bb208
--- /dev/null
+++ b/erpnext/website/page/website_home/website_home.html
@@ -0,0 +1,52 @@
+<div class="layout-wrapper layout-wrapper-background">
+ <div class="layout-main-section">
+ <a class="close" onclick="window.history.back();">×</a>
+ <h1>Website</h1>
+ <hr>
+ <div style="width: 48%; float: left;">
+ <h4><a href="#!List/Web Page">Web Page</a></h4>
+ <p class="help">Static (content) web page</p>
+ <h4><a href="#!List/Product">Product</a></h4>
+ <p class="help">Product listed in catolog</p>
+ <h4><a href="#!List/Blog">Blog</a></h4>
+ <p class="help">Weblog (blog) entry</p>
+ </div>
+ <div style="width: 48%; float: right;">
+ <h4><a href="#!Form/Website Settings/Website Settings">Website Settings</a></h4>
+ <p class="help">Setup of top navigation bar, footer and logo</p>
+ </div>
+ <div style="width: 48%; float: right;">
+ <h4><a href="#!Form/Style Settings/Style Settings">Style Settings</a></h4>
+ <p class="help">Setup of fonts and background</p>
+ </div>
+ <div style="width: 48%; float: right;">
+ <h4><a href="#!Form/Products Settings/Products Settings">Products Settings</a></h4>
+ <p class="help">Setup product categories</p>
+ </div>
+ <div style="clear: both"></div>
+ <hr>
+ <h3>Reports</h3>
+ <div class="reports-list"></div>
+ </div>
+ <div class="layout-side-section">
+ <div class="psidebar">
+ <div class="section">
+ <div class="section-head">Tools</div>
+ <div class="section-body">
+ <div class="section-item">
+ <a class="section-link"
+ title = "About Us page"
+ href="#!Form/About Us Settings/About Us Settings">About Us Settings</a>
+ </div>
+ <div class="section-item">
+ <a class="section-link"
+ title = "Contact Us page"
+ href="#!Form/Contact Us Settings/Contact Us Settings">Contact Us Settings</a>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ </div>
+ <div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/website/page/website_home/website_home.js b/erpnext/website/page/website_home/website_home.js
new file mode 100644
index 0000000..ec6053f
--- /dev/null
+++ b/erpnext/website/page/website_home/website_home.js
@@ -0,0 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+pscript['onload_website-home'] = function(wrapper) {
+ erpnext.module_page.setup_page('Website', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/website/page/website_home/website_home.txt b/erpnext/website/page/website_home/website_home.txt
new file mode 100644
index 0000000..a9af308
--- /dev/null
+++ b/erpnext/website/page/website_home/website_home.txt
@@ -0,0 +1,28 @@
+# Page, website-home
+[
+
+ # These values are common in all dictionaries
+ {
+ 'creation': '2012-02-21 13:23:51',
+ 'docstatus': 0,
+ 'modified': '2012-02-21 13:23:51',
+ 'modified_by': u'Administrator',
+ 'owner': u'Administrator'
+ },
+
+ # These values are common for all Page
+ {
+ 'doctype': 'Page',
+ 'module': u'Website',
+ 'name': '__common__',
+ 'page_name': u'website-home',
+ 'standard': u'Yes',
+ 'title': u'Website Home'
+ },
+
+ # Page, website-home
+ {
+ 'doctype': 'Page',
+ 'name': u'website-home'
+ }
+]
\ No newline at end of file
diff --git a/erpnext/website/utils.py b/erpnext/website/utils.py
index 66be4d2..971b0bc 100644
--- a/erpnext/website/utils.py
+++ b/erpnext/website/utils.py
@@ -1,3 +1,19 @@
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import webnotes
from webnotes.model.doc import Document
diff --git a/images/sprite-desktop.png b/images/sprite-desktop.png
new file mode 100644
index 0000000..cb8fc6e
--- /dev/null
+++ b/images/sprite-desktop.png
Binary files differ
diff --git a/index.cgi b/index.cgi
index 686ce05..ed766eb 100755
--- a/index.cgi
+++ b/index.cgi
@@ -1,5 +1,21 @@
#!/usr/bin/python
-# main handler file
+
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import cgi, cgitb, os, sys
cgitb.enable()
@@ -22,10 +38,25 @@
# init request
try:
webnotes.http_request = webnotes.auth.HTTPRequest()
+ return True
except webnotes.AuthenticationError, e:
- pass
+ return True
except webnotes.UnknownDomainError, e:
print "Location: " + (webnotes.defs.redirect_404)
+ except webnotes.SessionStopped, e:
+ if 'cmd' in webnotes.form_dict:
+ webnotes.handler.print_json()
+ else:
+ print "Content-Type: text/html"
+ print
+ print """<html>
+ <body style="background-color: #EEE;">
+ <h3 style="width: 900px; background-color: #FFF; border: 2px solid #AAA; padding: 20px; font-family: Arial; margin: 20px auto">
+ Updating.
+ We will be back in a few moments...
+ </h3>
+ </body>
+ </html>"""
def respond():
import webnotes
@@ -39,5 +70,5 @@
print webnotes.cms.index.get()
if __name__=="__main__":
- init()
- respond()
+ if init():
+ respond()
diff --git a/js/all-app.js b/js/all-app.js
index d8916bc..24bd724 100644
--- a/js/all-app.js
+++ b/js/all-app.js
Binary files differ
diff --git a/js/all-web.js b/js/all-web.js
index ce8a344..08e84bf 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -35,6 +35,36 @@
})
/*
+ * lib/js/lib/bootstrap.min.js
+ */!function(a){a(function(){"use strict",a.support.transition=function(){var b=document.body||document.documentElement,c=b.style,d=c.transition!==undefined||c.WebkitTransition!==undefined||c.MozTransition!==undefined||c.MsTransition!==undefined||c.OTransition!==undefined;return d&&{end:function(){var b="TransitionEnd";return a.browser.webkit?b="webkitTransitionEnd":a.browser.mozilla?b="transitionend":a.browser.opera&&(b="oTransitionEnd"),b}()}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype={constructor:c,close:function(b){function f(){e.remove(),e.trigger("closed")}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),e.trigger("close"),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()}},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype={constructor:b,setState:function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},toggle:function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")}},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){a(b.target).button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.carousel.defaults,c),this.options.slide&&this.slide(this.options.slide)};b.prototype={cycle:function(){return this.interval=setInterval(a.proxy(this.next,this),this.options.interval),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(){return clearInterval(this.interval),this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;return this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h](),!a.support.transition&&this.$element.hasClass("slide")?(this.$element.trigger("slide"),d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")):(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.trigger("slide"),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})),f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=typeof c=="object"&&c;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():e.cycle()})},a.fn.carousel.defaults={interval:5e3},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find(".in"),e;d&&d.length&&(e=d.data("collapse"),d.collapse("hide"),e||d.data("collapse",null)),this.$element[b](0),this.transition("addClass","show","shown"),this.$element[b](this.$element[0][c])},hide:function(){var a=this.dimension();this.reset(this.$element[a]()),this.transition("removeClass","hide","hidden"),this.$element[a](0)},reset:function(a){var b=this.dimension();this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element.addClass("collapse")},transition:function(b,c,d){var e=this,f=function(){c=="show"&&e.reset(),e.$element.trigger(d)};this.$element.trigger(c)[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e=c.attr("data-target"),f,g;return e||(e=c.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,"")),f=a(e),f.length||(f=c.parent()),g=f.hasClass("open"),d(),!g&&f.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,a.proxy(f,this)):f.call(this)):b&&b()}function f(){this.$backdrop.remove(),this.$backdrop=null}function g(){var b=this;this.isShown&&this.options.keyboard?a(document).on("keyup.dismiss.modal",function(a){a.which==27&&b.hide()}):this.isShown||a(document).off("keyup.dismiss.modal")}"use strict";var b=function(b,c){this.options=a.extend({},a.fn.modal.defaults,c),this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this))};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this;if(this.isShown)return;a("body").addClass("modal-open"),this.isShown=!0,this.$element.trigger("show"),g.call(this),e.call(this,function(){var c=a.support.transition&&b.$element.hasClass("fade");!b.$element.parent().length&&b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in"),c?b.$element.one(a.support.transition.end,function(){b.$element.trigger("shown")}):b.$element.trigger("shown")})},hide:function(b){b&&b.preventDefault();if(!this.isShown)return;var e=this;this.isShown=!1,a("body").removeClass("modal-open"),g.call(this),this.$element.trigger("hide").removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?c.call(this):d.call(this)}},a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=typeof c=="object"&&c;e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0},a.fn.modal.Constructor=b,a(function(){a("body").on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({},e.data(),c.data());b.preventDefault(),e.modal(f)})})}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,this.options.trigger!="manual"&&(e=this.options.trigger=="hover"?"mouseenter":"focus",f=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(e,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.show?c.show():(c.hoverState="in",setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show))},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.hide?c.hide():(c.hoverState="out",setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide))},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip();a.find(".tooltip-inner").html(this.getTitle()),a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.remove()})}var b=this,c=this.tip();c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}},a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,delay:0,selector:!1,placement:"top",trigger:"hover",title:"",template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var b=this.tip(),c=this.getTitle(),d=this.getContent();b.find(".popover-title")[a.type(c)=="object"?"append":"html"](c),b.find(".popover-content > *")[a.type(d)=="object"?"append":"html"](d),b.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-content")||(typeof c.content=="function"?c.content.call(b[0]):c.content),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip}}),a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(a){function b(b,c){var d=a.proxy(this.process,this),e=a(b).is("body")?a(window):a(b),f;this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=e.on("scroll.scroll.data-api",d),this.selector=(this.options.target||(f=a(b).attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body").on("click.scroll.data-api",this.selector,d),this.refresh(),this.process()}"use strict",b.prototype={constructor:b,refresh:function(){this.targets=this.$body.find(this.selector).map(function(){var b=a(this).attr("href");return/^#\w/.test(b)&&a(b).length?b:null}),this.offsets=a.map(this.targets,function(b){return a(b).position().top})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.offsets,c=this.targets,d=this.activeTarget,e;for(e=b.length;e--;)d!=c[e]&&a>=b[e]&&(!b[e+1]||a<=b[e+1])&&this.activate(c[e])},activate:function(a){var b;this.activeTarget=a,this.$body.find(this.selector).parent(".active").removeClass("active"),b=this.$body.find(this.selector+'[href="'+a+'"]').parent("li").addClass("active"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active")}},a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a(function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active a").last()[0],b.trigger({type:"show",relatedTarget:e}),f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}},a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a(function(){a("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.$menu=a(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(a),this.hide()},show:function(){var b=a.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:b.top+b.height,left:b.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(b){var c=this,d,e;return this.query=this.$element.val(),this.query?(d=a.grep(this.source,function(a){if(c.matcher(a))return a}),d=this.sorter(d),d.length?this.render(d.slice(0,this.options.items)).show():this.shown?this.hide():this):this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){var b=[],c=[],d=[],e;while(e=a.shift())e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?c.push(e):d.push(e):b.push(e);return b.concat(c,d)},highlighter:function(a){return a.replace(new RegExp("("+this.query+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(b){var c=this.$menu.find(".active").removeClass("active"),d=c.next();d.length||(d=a(this.$menu.find("li")[0])),d.addClass("active")},prev:function(a){var b=this.$menu.find(".active").removeClass("active"),c=b.prev();c.length||(c=this.$menu.find("li").last()),c.addClass("active")},listen:function(){this.$element.on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),(a.browser.webkit||a.browser.msie)&&this.$element.on("keydown",a.proxy(this.keypress,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this))},keyup:function(a){a.stopPropagation(),a.preventDefault();switch(a.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:this.hide();break;default:this.lookup()}},keypress:function(a){a.stopPropagation();if(!this.shown)return;switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}},blur:function(a){var b=this;a.stopPropagation(),a.preventDefault(),setTimeout(function(){b.hide()},150)},click:function(a){a.stopPropagation(),a.preventDefault(),this.select()},mouseenter:function(b){this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")}},a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f=typeof c=="object"&&c;e||d.data("typeahead",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>'},a.fn.typeahead.Constructor=b,a(function(){a("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(b){var c=a(this);if(c.data("typeahead"))return;b.preventDefault(),c.typeahead(c.data())})})}(window.jQuery);
+/*
+ * lib/js/lib/sprintf.js
+ */
+var sprintf=(function(){function get_type(variable){return Object.prototype.toString.call(variable).slice(8,-1).toLowerCase();}
+function str_repeat(input,multiplier){for(var output=[];multiplier>0;output[--multiplier]=input){}
+return output.join('');}
+var str_format=function(){if(!str_format.cache.hasOwnProperty(arguments[0])){str_format.cache[arguments[0]]=str_format.parse(arguments[0]);}
+return str_format.format.call(null,str_format.cache[arguments[0]],arguments);};str_format.format=function(parse_tree,argv){var cursor=1,tree_length=parse_tree.length,node_type='',arg,output=[],i,k,match,pad,pad_character,pad_length;for(i=0;i<tree_length;i++){node_type=get_type(parse_tree[i]);if(node_type==='string'){output.push(parse_tree[i]);}
+else if(node_type==='array'){match=parse_tree[i];if(match[2]){arg=argv[cursor];for(k=0;k<match[2].length;k++){if(!arg.hasOwnProperty(match[2][k])){arg='';}else{arg=arg[match[2][k]];}}}
+else if(match[1]){arg=argv[match[1]];}
+else{arg=argv[cursor++];}
+if(/[^s]/.test(match[8])&&(get_type(arg)!='number')){throw(sprintf('[sprintf] expecting number but found %s',get_type(arg)));}
+switch(match[8]){case'b':arg=arg.toString(2);break;case'c':arg=String.fromCharCode(arg);break;case'd':arg=parseInt(arg,10);break;case'e':arg=match[7]?arg.toExponential(match[7]):arg.toExponential();break;case'f':arg=match[7]?parseFloat(arg).toFixed(match[7]):parseFloat(arg);break;case'o':arg=arg.toString(8);break;case's':arg=((arg=String(arg))&&match[7]?arg.substring(0,match[7]):arg);break;case'u':arg=Math.abs(arg);break;case'x':arg=arg.toString(16);break;case'X':arg=arg.toString(16).toUpperCase();break;}
+arg=(/[def]/.test(match[8])&&match[3]&&arg>=0?'+'+arg:arg);pad_character=match[4]?match[4]=='0'?'0':match[4].charAt(1):' ';pad_length=match[6]-String(arg).length;pad=match[6]?str_repeat(pad_character,pad_length):'';output.push(match[5]?arg+pad:pad+arg);}}
+return output.join('');};str_format.cache={};str_format.parse=function(fmt){var _fmt=fmt,match=[],parse_tree=[],arg_names=0;while(_fmt){if((match=/^[^\x25]+/.exec(_fmt))!==null){parse_tree.push(match[0]);}
+else if((match=/^\x25{2}/.exec(_fmt))!==null){parse_tree.push('%');}
+else if((match=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt))!==null){if(match[2]){arg_names|=1;var field_list=[],replacement_field=match[2],field_match=[];if((field_match=/^([a-z_][a-z_\d]*)/i.exec(replacement_field))!==null){field_list.push(field_match[1]);while((replacement_field=replacement_field.substring(field_match[0].length))!==''){if((field_match=/^\.([a-z_][a-z_\d]*)/i.exec(replacement_field))!==null){field_list.push(field_match[1]);}
+else if((field_match=/^\[(\d+)\]/.exec(replacement_field))!==null){field_list.push(field_match[1]);}
+else{throw('[sprintf] huh?');}}}
+else{throw('[sprintf] huh?');}
+match[2]=field_list;}
+else{arg_names|=2;}
+if(arg_names===3){throw('[sprintf] mixing positional and named placeholders is not (yet) supported');}
+parse_tree.push(match);}
+else{throw('[sprintf] huh?');}
+_fmt=_fmt.substring(match[0].length);}
+return parse_tree;};return str_format;})();var vsprintf=function(fmt,argv){argv.unshift(fmt);return sprintf.apply(null,argv);};
+/*
* lib/js/core.min.js
*/
/*
@@ -60,7 +90,7 @@
/*
* lib/js/wn/versions.js
*/
-wn.versions={check:function(){if(localStorage){if(window._version_number==-1||parseInt(localStorage._version_number)!=parseInt(window._version_number)){var localversion=localStorage._version_number;localStorage.clear();console.log("Cache cleared - version: "+localversion
+wn.versions={check:function(){if(window.localStorage){if(window._version_number==-1||parseInt(localStorage._version_number)!=parseInt(window._version_number)){var localversion=localStorage._version_number;localStorage.clear();console.log("Cache cleared - version: "+localversion
+' to '+_version_number)}
localStorage.setItem('_version_number',window._version_number);}}}
/*
@@ -98,6 +128,15 @@
state=window.location.hash;if(state!=src){window.location.hash=state;}
else{document.title=title;}}}
/*
+ * lib/js/wn/misc/user.js
+ */
+wn.user_info=function(uid){var def={'fullname':uid,'image':'lib/images/ui/no_img_m.gif'}
+if(!wn.boot.user_info)return def
+if(!wn.boot.user_info[uid])return def
+if(!wn.boot.user_info[uid].fullname)
+wn.boot.user_info[uid].fullname=uid;if(!wn.boot.user_info[uid].image)
+wn.boot.user_info[uid].image=def.image;return wn.boot.user_info[uid];}
+/*
* lib/js/lib/json2.js
*/
var JSON;if(!JSON){JSON={};}
@@ -134,8 +173,7 @@
* lib/js/legacy/globals.js
*/
wn.provide('wn.widgets.form');wn.provide('wn.widgets.report');wn.provide('wn.utils');wn.provide('wn.model');wn.provide('wn.profile');wn.provide('wn.session');wn.provide('_f');wn.provide('_p');wn.provide('_r');wn.provide('_c');wn.provide('_e');wn.provide('_startup_data')
-wn.settings.no_history=1;var NEWLINE='\n';var login_file='';var version='v170';var profile=null;var session={};var is_testing=false;var user=null;var user_defaults=null;var user_roles=null;var user_fullname=null;var user_email=null;var user_img={};var home_page=null;var hide_autosuggest=null;var page_body=null;var pscript={};var selector=null;var top_index=91;var _f={};var _p={};var _e={};var _r={};var FILTER_SEP='\1';var _c={};var widget_files={'_f.FrmContainer':'form.compressed.js','_c.CalendarPopup':'widgets/form/date_picker.js','_r.ReportContainer':'report.compressed.js','_p.PrintQuery':'widgets/print_query.js','Calendar':'widgets/calendar.js','Recommendation':'widgets/recommend.js','RatingWidget':'widgets/rating.js'}
-var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;var cur_autosug=null;
+wn.settings.no_history=1;var NEWLINE='\n';var login_file='';var version='v170';var profile=null;var session={};var is_testing=false;var user=null;var user_defaults=null;var user_roles=null;var user_fullname=null;var user_email=null;var user_img={};var home_page=null;var hide_autosuggest=null;var page_body=null;var pscript={};var selector=null;var top_index=91;var _f={};var _p={};var _e={};var _r={};var FILTER_SEP='\1';var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;var cur_autosug=null;
/*
* lib/js/legacy/utils/datatype.js
*/
@@ -163,6 +201,7 @@
function $p(ele,top,left){ele.style.position='absolute';ele.style.top=top+'px';ele.style.left=left+'px';}
function replace_newlines(t){return t?t.replace(/\n/g,'<br>'):'';}
function cstr(s){if(s==null)return'';return s+'';}
+function nth(number){number=cint(number);var s='th';if((number+'').substr(-1)=='1')s='st';if((number+'').substr(-1)=='2')s='nd';if((number+'').substr(-1)=='3')s='rd';return number+s;}
function flt(v,decimals){if(v==null||v=='')return 0;v=(v+'').replace(/,/g,'');v=parseFloat(v);if(isNaN(v))
v=0;if(decimals!=null)
return v.toFixed(decimals);return v;}
@@ -186,8 +225,7 @@
function has_common(list1,list2){if(!list1||!list2)return false;for(var i=0;i<list1.length;i++){if(in_list(list2,list1[i]))return true;}
return false;}
var inList=in_list;function add_lists(l1,l2){var l=[];for(var k in l1)l.push(l1[k]);for(var k in l2)l.push(l2[k]);return l;}
-function docstring(obj){var l=[];for(key in obj){var v=obj[key];if(v!=null){if(typeof(v)==typeof(1)){l[l.length]="'"+key+"':"+(v+'');}else{v=v+'';l[l.length]="'"+key+"':'"+v.replace(/'/g,"\\'").replace(/\n/g,"\\n")+"'";}}}
-return"{"+l.join(',')+'}';}
+function docstring(obj){return JSON.stringify(obj);}
function DocLink(p,doctype,name,onload){var a=$a(p,'span','link_type');a.innerHTML=a.dn=name;a.dt=doctype;a.onclick=function(){loaddoc(this.dt,this.dn,onload)};return a;}
var doc_link=DocLink;var known_numbers={0:'zero',1:'one',2:'two',3:'three',4:'four',5:'five',6:'six',7:'seven',8:'eight',9:'nine',10:'ten',11:'eleven',12:'twelve',13:'thirteen',14:'fourteen',15:'fifteen',16:'sixteen',17:'seventeen',18:'eighteen',19:'nineteen',20:'twenty',30:'thirty',40:'forty',50:'fifty',60:'sixty',70:'seventy',80:'eighty',90:'ninety'}
function in_words(n){var is_million=wn.control_panel.currency_format=='Millions'?1:0;n=cint(n)
@@ -232,7 +270,7 @@
else if(user_fmt=='dd/mm/yyyy'){var d=d.split('/');return d[2]+'-'+d[1]+'-'+d[0];}
else if(user_fmt=='yyyy-mm-dd'){return d;}
else if(user_fmt=='mm/dd/yyyy'){var d=d.split('/');return d[2]+'-'+d[0]+'-'+d[1];}
-else if(user_fmt=='mm-dd-yyyy'){var d=d.split('-');return d[2]+'-'+d[0]+'-'+d[1];}},global_date_format:function(d){if(d.substr)d=this.str_to_obj(d);return d.getDate()+' '+month_list_full[d.getMonth()]+' '+d.getFullYear();},get_today:function(){var today=new Date();var m=(today.getMonth()+1)+'';if(m.length==1)m='0'+m;var d=today.getDate()+'';if(d.length==1)d='0'+d;return today.getFullYear()+'-'+m+'-'+d;},get_cur_time:function(){var d=new Date();var hh=d.getHours()+''
+else if(user_fmt=='mm-dd-yyyy'){var d=d.split('-');return d[2]+'-'+d[0]+'-'+d[1];}},global_date_format:function(d){if(d.substr)d=this.str_to_obj(d);return nth(d.getDate())+' '+month_list_full[d.getMonth()]+' '+d.getFullYear();},get_today:function(){var today=new Date();var m=(today.getMonth()+1)+'';if(m.length==1)m='0'+m;var d=today.getDate()+'';if(d.length==1)d='0'+d;return today.getFullYear()+'-'+m+'-'+d;},get_cur_time:function(){var d=new Date();var hh=d.getHours()+''
var mm=cint(d.getMinutes()/5)*5+''
return(hh.length==1?'0'+hh:hh)+':'+(mm.length==1?'0'+mm:mm);}}
wn.datetime.only_date=function(val){if(val==null||val=='')return null;if(val.search(':')!=-1){var tmp=val.split(' ');var d=tmp[0].split('-');}else{var d=val.split('-');}
@@ -244,7 +282,8 @@
wn.datetime.time_to_hhmm=function(hh,mm,am){if(am=='AM'&&hh=='12'){hh='00';}else if(am=='PM'&&hh!='12'){hh=cint(hh)+12;}
return hh+':'+mm;}
function prettyDate(time){if(!time)return''
-var date=new Date((time||"").replace(/-/g,"/").replace(/[TZ]/g," ").replace(/\.[0-9]*/,"")),diff=(((new Date()).getTime()-date.getTime())/1000),day_diff=Math.floor(diff/86400);if(isNaN(day_diff)||day_diff<0)
+var date=time;if(typeof(time)=="string")
+date=new Date((time||"").replace(/-/g,"/").replace(/[TZ]/g," ").replace(/\.[0-9]*/,""));var diff=(((new Date()).getTime()-date.getTime())/1000),day_diff=Math.floor(diff/86400);if(isNaN(day_diff)||day_diff<0)
return'';return day_diff==0&&(diff<60&&"just now"||diff<120&&"1 minute ago"||diff<3600&&Math.floor(diff/60)+" minutes ago"||diff<7200&&"1 hour ago"||diff<86400&&Math.floor(diff/3600)+" hours ago")||day_diff==1&&"Yesterday"||day_diff<7&&day_diff+" days ago"||day_diff<31&&Math.ceil(day_diff/7)+" weeks ago"||day_diff<365&&Math.ceil(day_diff/30)+" months ago"||"more than "+Math.floor(day_diff/365)+" year(s) ago";}
if(typeof jQuery!="undefined")
jQuery.fn.prettyDate=function(){return this.each(function(){var date=prettyDate(this.title);if(date)
@@ -261,7 +300,7 @@
span.done_working=function(){this.disabled=0;$dh(this.loading_img);}
return span;}}
function $ln(parent,label,onclick,style){return wn.ele.link({parent:parent,label:label,onclick:onclick,style:style})}
-function $btn(parent,label,onclick,style,css_class,is_ajax){wn.require('lib/js/wn/ui/button.js');if(css_class==='green')css_class='primary';return new wn.ui.Button({parent:parent,label:label,onclick:onclick,style:style,is_ajax:is_ajax,css_class:css_class}).btn;}
+function $btn(parent,label,onclick,style,css_class,is_ajax){wn.require('lib/js/wn/ui/button.js');if(css_class==='green')css_class='btn-primary';return new wn.ui.Button({parent:parent,label:label,onclick:onclick,style:style,is_ajax:is_ajax,css_class:css_class}).btn;}
$item_normal=function(ele){$y(ele,{padding:'6px 8px',cursor:'pointer',marginRight:'8px',whiteSpace:'nowrap',overflow:'hidden',borderBottom:'1px solid #DDD'});$bg(ele,'#FFF');$fg(ele,'#000');}
$item_active=function(ele){$bg(ele,'#FE8');$fg(ele,'#000');}
$item_selected=function(ele){$bg(ele,'#777');$fg(ele,'#FFF');}
@@ -369,7 +408,7 @@
if(typeof doclist=='string')args.doctype=doclist;else args.docs=compress_doclist(doclist)
$c('runserverobj',args,call_back,null,no_spinner,freeze_msg,btn);}
function $c_page(module,page,method,arg,call_back,no_spinner,freeze_msg,btn){if(arg&&!arg.substr)arg=JSON.stringify(arg);$c(module+'.page.'+page+'.'+page+'.'+method,{'arg':arg},call_back,null,no_spinner,freeze_msg,btn);}
-wn.call=function(args){if(args.module&&args.page){$c_page(args.module,args.page,args.method,args.args,args.callback,args.no_spinner,false,args.btn);}else if(args.docs){$c_obj(args.doc,args.method,args.args,args.callback,args.no_spinner,false,args.btn);}else{$c(args.method,args.args,args.callback,false,args.no_spinner,false,args.btn);}}
+wn.call=function(args){if(!args.args)args.args={};if(args.module&&args.page){$c_page(args.module,args.page,args.method,args.args,args.callback,args.no_spinner,false,args.btn);}else if(args.docs){$c_obj(args.doc,args.method,args.args,args.callback,args.no_spinner,false,args.btn);}else{$c(args.method,args.args,args.callback,false,args.no_spinner,false,args.btn);}}
function $c_obj_csv(doclist,method,arg){var args={}
args.cmd='runserverobj';args.as_csv=1;args.method=method;args.arg=arg;if(doclist.substr)
args.doctype=doclist;else
@@ -394,7 +433,7 @@
m.innerHTML=replace_newlines(msg);if(m.offsetHeight>200){$y(m,{height:'200px',width:'400px',overflow:'auto'})}
msg_dialog.custom_onhide=callback;}
var growl_area;function show_alert(txt,id){if(!growl_area){growl_area=$a(popup_cont,'div','',{position:'fixed',bottom:'8px',right:'8px',width:'320px',zIndex:10});}
-var wrapper=$a(growl_area,'div','',{position:'relative'});var body=$a(wrapper,'div','notice');var c=$a(body,'div','wn-icon ic-round_delete',{cssFloat:'right'});$(c).click(function(){$dh(this.wrapper)});c.wrapper=wrapper;var t=$a(body,'div','',{color:'#FFF'});$(t).html(txt);if(id){$(t).attr('id',id);}
+var wrapper=$a(growl_area,'div','',{position:'relative'});var body=$a(wrapper,'div','notice');var c=$a(body,'i','icon-remove-sign',{cssFloat:'right',cursor:'pointer'});$(c).click(function(){$dh(this.wrapper)});c.wrapper=wrapper;var t=$a(body,'div','',{color:'#FFF'});$(t).html(txt);if(id){$(t).attr('id',id);}
$(wrapper).hide().fadeIn(1000);}
/*
* lib/js/legacy/utils/shortcut.js
@@ -437,13 +476,13 @@
Field.prototype.refresh_mandatory=function(){if(this.in_filter)return;if(this.df.reqd){if(this.label_area)this.label_area.style.color="#d22";this.set_style_mandatory(1);}else{if(this.label_area)this.label_area.style.color="#222";this.set_style_mandatory(0);}
this.refresh_label_icon()
this.set_reqd=this.df.reqd;}
-Field.prototype.refresh_display=function(){if(!this.set_status||this.set_status!=this.disp_status){if(this.disp_status=='Write'){if(this.make_input&&(!this.input)){this.make_input();if(this.onmake_input)this.onmake_input();}
+Field.prototype.refresh_display=function(){if(!this.current_status||this.current_status!=this.disp_status){if(this.disp_status=='Write'){if(this.make_input&&(!this.input)){this.make_input();if(this.onmake_input)this.onmake_input();}
if(this.show)this.show()
else{$ds(this.wrapper);}
if(this.input){$ds(this.input_area);$dh(this.disp_area);if(this.input.refresh)this.input.refresh();}else{$dh(this.input_area);$ds(this.disp_area);}}else if(this.disp_status=='Read'){if(this.show)this.show()
else{$ds(this.wrapper);}
$dh(this.input_area);$ds(this.disp_area);}else{if(this.hide)this.hide();else $dh(this.wrapper);}
-this.set_status=this.disp_status;}}
+this.current_status=this.disp_status;}}
Field.prototype.refresh=function(){this.disp_status=this.get_status();if(this.in_grid&&this.table_refresh&&this.disp_status=='Write')
{this.table_refresh();return;}
this.set_label();this.refresh_display();if(this.onrefresh)
@@ -504,7 +543,8 @@
var t=v.split('-');if(t.length!=3){return this.clear();}
else if(cint(t[1])>12||cint(t[1])<1){return this.clear();}
else if(cint(t[2])>31||cint(t[2])<1){return this.clear();}
-return v;};var _link_onchange_flag=null;function LinkField(){}LinkField.prototype=new Field();LinkField.prototype.make_input=function(){var me=this;if(me.df.no_buttons){this.txt=$a(this.input_area,'input');this.input=this.txt;}else{makeinput_popup(this,'ic-zoom','ic-sq_next','ic-sq_plus');me.setup_buttons();me.onrefresh=function(){if(me.can_create&&cur_frm.doc.docstatus==0)$ds(me.btn2);else $dh(me.btn2);}}
+return v;};var _link_onchange_flag=null;function LinkField(){}LinkField.prototype=new Field();LinkField.prototype.make_input=function(){var me=this;if(me.df.no_buttons){this.txt=$a(this.input_area,'input');this.input=this.txt;}else{makeinput_popup(this,'icon-search','icon-play','icon-plus');me.setup_buttons();me.onrefresh=function(){if(me.can_create&&cur_frm.doc.docstatus==0)
+$(me.btn2).css('display','inline-block');else $dh(me.btn2);}}
me.txt.field_object=this;me.set_onchange();me.input.set_input=function(val){if(val==undefined)val='';me.txt.value=val;}
me.get_value=function(){return me.txt.value;}
wn.require('lib/js/legacy/widgets/autosuggest.js');var opts={script:'',json:true,maxresults:10,link_field:me};this.as=new AutoSuggest(me.txt,opts);}
@@ -588,19 +628,22 @@
this.get_value=function(){return this.get_time();}
this.refresh();}
TimeField.prototype.set_disp=function(v){var t=time_to_ampm(v);var t=t[0]+':'+t[1]+' '+t[2];this.set_disp_html(t);}
-function makeinput_popup(me,iconsrc,iconsrc1,iconsrc2){me.input=$a(me.input_area,'div');if(!me.not_in_form)
+function makeinput_popup(me,iconsrc,iconsrc1,iconsrc2){var icon_style={cursor:'pointer',width:'16px',verticalAlign:'middle',marginBottom:'-3px'};me.input=$a(me.input_area,'div');if(!me.not_in_form)
$y(me.input,{width:'80%'});me.input.set_width=function(w){$y(me.input,{width:(w-2)+'px'});}
-var tab=$a(me.input,'table');me.tab=tab;$y(tab,{width:'100%',borderCollapse:'collapse',tableLayout:'fixed'});var c0=tab.insertRow(0).insertCell(0);var c1=tab.rows[0].insertCell(1);$y(c1,{width:'20px'});me.txt=$a($a($a(c0,'div','',{paddingRight:'8px'}),'div'),'input','',{width:'100%'});me.btn=$a(c1,'div','wn-icon '+iconsrc,{width:'16px'});if(iconsrc1)
+var tab=$a(me.input,'table');me.tab=tab;$y(tab,{width:'100%',borderCollapse:'collapse',tableLayout:'fixed'});var c0=tab.insertRow(0).insertCell(0);var c1=tab.rows[0].insertCell(1);$y(c1,{width:'20px'});me.txt=$a($a($a(c0,'div','',{paddingRight:'8px'}),'div'),'input','',{width:'100%'});me.btn=$a(c1,'i',iconsrc,icon_style)
+if(iconsrc1)
me.btn.setAttribute('title','Search');else
-me.btn.setAttribute('title','Select Date');if(iconsrc1){var c2=tab.rows[0].insertCell(2);$y(c2,{width:'20px'});me.btn1=$a(c2,'div','wn-icon '+iconsrc1,{width:'16px'});me.btn1.setAttribute('title','Open Link');}
-if(iconsrc2){var c3=tab.rows[0].insertCell(3);$y(c3,{width:'20px'});me.btn2=$a(c3,'div','wn-icon '+iconsrc2,{width:'16px'});me.btn2.setAttribute('title','Create New');$dh(me.btn2);}
+me.btn.setAttribute('title','Select Date');if(iconsrc1){var c2=tab.rows[0].insertCell(2);$y(c2,{width:'20px'});me.btn1=$a(c2,'i',iconsrc1,icon_style)
+me.btn1.setAttribute('title','Open Link');}
+if(iconsrc2){var c3=tab.rows[0].insertCell(3);$y(c3,{width:'20px'});me.btn2=$a(c3,'i',iconsrc2,icon_style)
+me.btn2.setAttribute('title','Create New');$dh(me.btn2);}
if(me.df.colour)
me.txt.style.background='#'+me.df.colour.split(':')[1];me.txt.name=me.df.fieldname;me.setdisabled=function(tf){me.txt.disabled=tf;}}
var tmpid=0;_f.ButtonField=function(){};_f.ButtonField.prototype=new Field();_f.ButtonField.prototype.with_label=0;_f.ButtonField.prototype.init=function(){this.prev_button=null;if(!this.frm)return;if(cur_frm&&cur_frm.fields[cur_frm.fields.length-1]&&cur_frm.fields[cur_frm.fields.length-1].df.fieldtype=='Button'){this.make_body=function(){this.prev_button=cur_frm.fields[cur_frm.fields.length-1];if(!this.prev_button.prev_button){this.prev_button.button_area=$a(this.prev_button.input_area,'span');}
this.wrapper=this.prev_button.wrapper;this.input_area=this.prev_button.input_area;this.disp_area=this.prev_button.disp_area;this.button_area=$a(this.prev_button.input_area,'span');}}}
_f.ButtonField.prototype.make_input=function(){var me=this;if(!this.prev_button){$y(this.input_area,{marginTop:'4px',marginBottom:'4px'});}
if(!this.button_area)
-this.button_area=$a(this.input_area,'span','',{marginRight:'4px'});this.input=$btn(this.button_area,me.df.label.substr(0,20)+((me.df.label.length>20)?'..':''),null,{maxWidth:'170px',fontWeight:'bold'},null,1)
+this.button_area=$a(this.input_area,'span','',{marginRight:'4px'});this.input=$btn(this.button_area,me.df.label,null,{fontWeight:'bold'},null,1)
this.input.onclick=function(){if(me.not_in_form)return;this.disabled='disabled';if(cur_frm.cscript[me.df.label]&&(!me.in_filter)){cur_frm.runclientscript(me.df.label,me.doctype,me.docname);this.disabled=false;}else{cur_frm.runscript(me.df.options,me);this.disabled=false;}}}
_f.ButtonField.prototype.hide=function(){$dh(this.button_area);};_f.ButtonField.prototype.show=function(){$ds(this.button_area);};_f.ButtonField.prototype.set=function(v){};_f.ButtonField.prototype.set_disp=function(val){}
function make_field(docfield,doctype,parent,frm,in_grid,hide_label){switch(docfield.fieldtype.toLowerCase()){case'data':var f=new DataField();break;case'password':var f=new DataField();break;case'int':var f=new IntField();break;case'float':var f=new FloatField();break;case'currency':var f=new CurrencyField();break;case'read only':var f=new ReadOnlyField();break;case'link':var f=new LinkField();break;case'date':var f=new DateField();break;case'time':var f=new TimeField();break;case'html':var f=new HTMLField();break;case'check':var f=new CheckField();break;case'text':var f=new TextField();break;case'small text':var f=new TextField();break;case'select':var f=new SelectField();break;case'button':var f=new _f.ButtonField();break;case'code':var f=new _f.CodeField();break;case'text editor':var f=new _f.CodeField();break;case'table':var f=new _f.TableField();break;case'section break':var f=new _f.SectionBreak();break;case'column break':var f=new _f.ColumnBreak();break;case'image':var f=new _f.ImageField();break;}
@@ -615,7 +658,7 @@
*/
wn.widgets.FieldGroup=function(){this.first_button=false;this.make_fields=function(body,fl){$y(this.body,{padding:'11px'});this.fields_dict={};for(var i=0;i<fl.length;i++){var df=fl[i];var div=$a(body,'div','',{margin:'6px 0px'})
f=make_field(df,null,div,null);f.not_in_form=1;this.fields_dict[df.fieldname]=f
-f.refresh();if(df.fieldtype=='Button'&&!this.first_button){$(f.input).addClass('primary');this.first_button=true;}}}
+f.refresh();if(df.fieldtype=='Button'&&!this.first_button){$(f.input).addClass('btn-primary');this.first_button=true;}}}
this.get_values=function(){var ret={};var errors=[];for(var key in this.fields_dict){var f=this.fields_dict[key];var v=f.get_value?f.get_value():null;if(f.df.reqd&&!v)
errors.push(f.df.label+' is mandatory');if(v)ret[f.df.fieldname]=v;}
if(errors.length){msgprint('<b>Please check the following Errors</b>\n'+errors.join('\n'));return null;}
@@ -655,28 +698,33 @@
else if(d[0]=='Select'){c1.innerHTML=d[1];this.widgets[d[1]]=$a(c2,'select','',{width:'160px'})
if(d[2])$a(c2,'div','field_description').innerHTML=d[2];if(d[3])add_sel_options(this.widgets[d[1]],d[3],d[3][0]);}
else if(d[0]=='Text'){c1.innerHTML=d[1];c2.style.overflow='auto';this.widgets[d[1]]=$a(c2,'textarea');if(d[2])$a(c2,'div','field_description').innerHTML=d[2];}
-else if(d[0]=='Button'){c2.style.height='32px';var b=$btn(c2,d[1],function(btn){if(btn._onclick)btn._onclick(me)},null,null,1);b.dialog=me;if(!this.first_button){$(b).addClass('primary');this.first_button=true;}
+else if(d[0]=='Button'){c2.style.height='32px';var b=$btn(c2,d[1],function(btn){if(btn._onclick)btn._onclick(me)},null,null,1);b.dialog=me;if(!this.first_button){$(b).addClass('btn-primary');this.first_button=true;}
if(d[2]){b._onclick=d[2];}
this.widgets[d[1]]=b;}}
/*
* lib/js/wn/ui/listing.js
*/
-wn.widgets.Listing=function(opts){this.opts=opts;this.page_length=20;this.btns={};this.start=0;var me=this;this.make=function(opts){this.wrapper=$a(this.opts.parent,'div');this.filters_area=$a(this.wrapper,'div','listing-filters');this.toolbar_area=$a(this.wrapper,'div','listing-toolbar');this.results_area=$a(this.wrapper,'div','listing-results');this.more_button_area=$a(this.wrapper,'div','listing-more');this.no_results_area=$a(this.wrapper,'div','help_box',{display:'none'},(this.opts.no_result_message?this.opts.no_result_message:'No results'));if(opts)this.opts=opts;this.page_length=this.opts.page_length?this.opts.page_length:this.page_length;this.make_toolbar();this.make_filters();this.make_more_button();}
+wn.widgets.Listing=function(opts){this.opts=opts;this.page_length=20;this.btns={};this.start=0;var me=this;this.make=function(opts){if(this.opts.parent.jquery)
+this.opts.parent=this.opts.parent.get(0);this.wrapper=$a(this.opts.parent,'div');this.filters_area=$a(this.wrapper,'div','listing-filters');this.toolbar_area=$a(this.wrapper,'div','listing-toolbar');this.results_area=$a(this.wrapper,'div','listing-results');this.more_button_area=$a(this.wrapper,'div','listing-more');this.no_results_area=$a(this.wrapper,'div','help_box',{display:'none'},(this.opts.no_result_message?this.opts.no_result_message:'No results'));if(opts)this.opts=opts;this.page_length=this.opts.page_length?this.opts.page_length:this.page_length;this.make_toolbar();this.make_filters();this.make_more_button();}
this.make_filters=function(){if(this.opts.filters){$ds(this.filters_area);this.filters=new wn.widgets.FieldGroup(this.filters_area,this.opts.fields);}}
-this.make_toolbar=function(){if(!this.opts.hide_refresh){this.ref_img=$a(this.toolbar_area,'span','link_type',{color:'#888'},'[refresh]');this.ref_img.onclick=function(){me.run();}
+this.make_toolbar=function(){if(!(this.opts.hide_refresh||this.opts.no_refresh)){if(this.opts.title){$a(this.toolbar_area,'h3','',{display:'inline-block',marginRight:'15px'},this.opts.title);}
+this.ref_img=$a(this.toolbar_area,'span','link_type',{color:'#888'},'[refresh]');this.ref_img.onclick=function(){me.run();}
this.loading_img=$a(this.toolbar_area,'img','lib/images/ui/button-load.gif',{display:'none',marginLeft:'3px',marginBottom:'-2px'});}
if(this.opts.new_doctype){this.new_btn=$btn(this.toolbar_area,'New '+get_doctype_label(this.opts.new_doctype),function(){newdoc(me.opts.new_doctype,me.opts.new_doc_onload,me.opts.new_doc_indialog,me.opts.new_doc_onsave);},{marginLeft:'7px'});}}
this.make_more_button=function(){this.more_btn=$btn(this.more_button_area,'More...',function(){me.more_btn.set_working();me.run(function(){me.more_btn.done_working();},1);},'',0,1);$y(this.more_btn.loading_img,{marginBottom:'0px'});}
this.clear=function(){this.results_area.innerHTML='';this.table=null;$ds(this.results_area);$dh(this.no_results_area);}
this.make_results=function(r,rt){if(this.start==0)this.clear();$dh(this.more_button_area);if(this.loading_img)$dh(this.loading_img)
-if(r.values&&r.values.length){this.values=r.values;var m=Math.min(r.values.length,this.page_length);for(var i=0;i<m;i++){var row=this.add_row();this.opts.render_row(row,r.values[i],this,i);}
-this.start+=m;if(r.values.length>this.page_length)$ds(this.more_button_area);}else{if(this.start==0){$dh(this.results_area);$ds(this.no_results_area);}}
-if(this.onrun)this.onrun();if(this.opts.onrun)this.opts.onrun();}
+if(r.message)r.values=r.message;if(r.values&&r.values.length){this.values=r.values;var m=Math.min(r.values.length,this.page_length);for(var i=0;i<m;i++){var row=this.add_row();this.opts.render_row(row,r.values[i],this,i);}
+this.start+=m;if(r.values.length>=this.page_length)$ds(this.more_button_area);}else{if(this.start==0){$dh(this.results_area);$ds(this.no_results_area);}}
+if(this.onrun)this.onrun();if(this.opts.onrun)this.opts.onrun();if(this.opts.callback)this.opts.callback(r);}
this.add_row=function(){return $a(this.results_area,'div','',(opts.cell_style?opts.cell_style:{padding:'3px 0px'}));}
this.run=function(callback,append){if(callback)
this.onrun=callback;if(!append)
-this.start=0;this.query=this.opts.get_query?this.opts.get_query():this.opts.query;this.add_limits();args={query_max:this.query_max||this.opts.query_max||''}
-args.simple_query=this.query;args.as_dict=1;if(this.loading_img)$di(this.loading_img);wn.call({method:'webnotes.widgets.query_builder.runquery',args:args,callback:function(r,rt){me.make_results(r,rt)},no_spinner:this.opts.no_loading,btn:this.opts.run_btn});}
+this.start=0;if(!this.opts.method){this.query=this.opts.get_query?this.opts.get_query():this.opts.query;this.add_limits();var args={query_max:this.query_max||this.opts.query_max||'',as_dict:1}
+args.simple_query=this.query;}else{var args={limit_start:this.start,limit_page_length:this.page_length}}
+if(this.opts.args)
+$.extend(args,this.opts.args)
+if(this.loading_img)$di(this.loading_img);wn.call({method:this.opts.method||'webnotes.widgets.query_builder.runquery',args:args,callback:function(r,rt){me.make_results(r,rt)},no_spinner:this.opts.no_loading,btn:this.opts.run_btn});}
this.refresh=this.run;this.add_limits=function(){this.query+=' LIMIT '+this.start+','+(this.page_length+1);}
if(opts)this.make();}
/*
@@ -711,7 +759,7 @@
var def_ph_style={wrapper:{marginBottom:'16px',backgroundColor:'#EEE'},main_heading:{},sub_heading:{marginBottom:'8px',color:'#555',display:'none'},separator:{borderTop:'3px solid #777'},toolbar_area:{padding:'3px 0px',display:'none',borderBottom:'1px solid #AAA'}}
function PageHeader(parent,main_text,sub_text){this.wrapper=$a(parent,'div','page_header');this.t1=make_table($a(this.wrapper,'div','',def_ph_style.wrapper.backgroundColor),1,2,'100%',[null,'100px'],{padding:'2px'});$y(this.t1,{borderCollapse:'collapse'})
this.lhs=$td(this.t1,0,0);this.main_head=$a(this.lhs,'h1','',def_ph_style.main_heading);this.sub_head=$a(this.lhs,'h4','',def_ph_style.sub_heading);this.separator=$a(this.wrapper,'div','',def_ph_style.separator);this.toolbar_area=$a(this.wrapper,'div','',def_ph_style.toolbar_area);this.padding_area=$a(this.wrapper,'div','',{padding:'3px'});$y($td(this.t1,0,1),{textAlign:'right',padding:'3px'});this.close_btn=$a($td(this.t1,0,1),'span','close',{},'×');this.close_btn.onclick=function(){nav_obj.show_last_open();};if(main_text)this.main_head.innerHTML=main_text;if(sub_text)this.sub_head.innerHTML=sub_text;this.buttons={};this.buttons2={};}
-PageHeader.prototype.add_button=function(label,fn,bold,icon,green){var tb=this.toolbar_area;if(this.buttons[label])return;var btn=$btn(tb,label,fn,{marginRight:'4px'},(green?'primary':''));if(bold)$y(btn,{fontWeight:'bold'});this.buttons[label]=btn;$ds(this.toolbar_area);return btn;}
+PageHeader.prototype.add_button=function(label,fn,bold,icon,green){var tb=this.toolbar_area;if(this.buttons[label])return;var btn=$btn(tb,label,fn,{marginRight:'4px'},(green?'btn-primary':''));if(bold)$y(btn,{fontWeight:'bold'});this.buttons[label]=btn;$ds(this.toolbar_area);return btn;}
PageHeader.prototype.clear_toolbar=function(){this.toolbar_area.innerHTML='';this.buttons={};}
PageHeader.prototype.make_buttonset=function(){$(this.toolbar_area).buttonset();}
/*
@@ -794,7 +842,8 @@
/*
* lib/js/legacy/webpage/error_console.js
*/
-var err_console;var err_list=[];function errprint(t){err_list[err_list.length]=('<pre style="font-family: Courier, Fixed; font-size: 11px; border-bottom: 1px solid #AAA; overflow: auto; width: 90%;">'+t+'</pre>');}
+var err_console;var err_list=[];function errprint(t){if(!err_list)err_list=[];err_list.push('<pre style="font-family: Courier, Fixed; font-size: 11px; \
+ border-bottom: 1px solid #AAA; overflow: auto; width: 90%;">'+t+'</pre>');}
function setup_err_console(){err_console=new Dialog(640,480,'Error Console')
err_console.make_body([['HTML','Error List'],['Button','Clear'],['HTML','Error Report']]);var span=$a(err_console.widgets['Error Report'],'span','link_type');span.innerHTML='Send Error Report';span.onclick=function(){msg=prompt('How / where did you get the error [optional]')
var call_back=function(r,rt){err_console.hide();msgprint("Error Report Sent")}
@@ -816,7 +865,7 @@
if(doctype=='DocType'&&frms[name]){msgprint("Cannot open DocType \""+name+"\" when its instance is open.");return;}
var show_form=function(f){if(!_f.frm_con){_f.frm_con=new _f.FrmContainer();}
if(!frms[doctype]){_f.add_frm(doctype,show_doc,name,from_archive);}else if(LocalDB.is_doc_loaded(doctype,name)){show_doc();}else{$c('webnotes.widgets.form.load.getdoc',{'name':name,'doctype':doctype,'user':user,'from_archive':(from_archive?1:0)},show_doc,null,null);}}
-var show_doc=function(r,rt){if(locals[doctype]&&locals[doctype][name]){page_body.set_status('Done');var frm=frms[doctype];frm.refresh(name);if(!frm.in_dialog)
+var show_doc=function(r,rt){if(locals[doctype]&&locals[doctype][name]){var frm=frms[doctype];frm.refresh(name);if(!frm.in_dialog)
nav_obj.open_notify('Form',doctype,name);if(onload)onload();}else{if(r.exc){msgprint('There were errors while loading '+doctype+' '+name);}
loadpage('_home');}}
show_form();}
@@ -830,11 +879,11 @@
show_doc(frms[doctype]);}
show_form();}
var newdoc=new_doc;var pscript={};var cur_page;function loadpage(page_name,call_back,no_history){if(!page_name)return;if(page_name=='_home')
-page_name=home_page;var fn=function(r,rt){page_body.set_status('Done');if(page_body.pages[page_name]){var p=page_body.pages[page_name]
+page_name=home_page;var fn=function(r,rt){if(wn.pages[page_name]){var p=wn.pages[page_name]
page_body.change_to(page_name);}else{var p=render_page(page_name);if(!p)return;}
cur_page=page_name;if(call_back)call_back();scroll(0,0);pscript.update_page_history(page_name,no_history)
try{if(pscript['refresh_'+page_name])pscript['refresh_'+page_name]();}catch(e){console.log(e);}}
-if(get_local('Page',page_name)||page_body.pages[page_name])
+if(get_local('Page',page_name)||wn.pages[page_name])
fn();else{args=get_url_dict();args.name=page_name;$c('webnotes.widgets.page.getpage',args,fn);}}
pscript.update_page_history=function(page_name,no_history){var arg=null;var t=null;if(window.location.hash){var t=nav_obj.get_page(window.location.hash)}else if(get_url_arg('page')){var t=nav_obj.get_page(get_url_arg('page'))}
if(t&&t[1]==page_name)arg=t[2];nav_obj.open_notify('Page',page_name,arg,no_history);}
@@ -853,14 +902,13 @@
/*
* lib/js/legacy/webpage/page.js
*/
-var pages=[];var stylesheets=[];function Page(page_name,content){var me=this;this.name=page_name;this.trigger=function(event){try{if(pscript[event+'_'+this.name])
-pscript[event+'_'+this.name](this.wrapper);}catch(e){console.log(e);}}
-this.onshow=function(){set_title(me.doc.title?me.doc.title:me.name);if(!me.onload_complete){me.trigger('onload');me.onload_complete=true;}
+var stylesheets=[];function Page(page_name,content){var me=this;this.name=page_name;this.trigger=function(event){try{if(pscript[event+'_'+this.name])
+pscript[event+'_'+this.name](me.wrapper);if(me.wrapper[event]){me.wrapper[event](me.wrapper);}}catch(e){console.log(e);}}
+this.page_show=function(){set_title(me.doc.title?me.doc.title:me.name);if(!me.onload_complete){me.trigger('onload');me.onload_complete=true;}
me.trigger('onshow');cur_frm=null;}
-this.wrapper=page_body.add_page(page_name,this.onshow);this.cont=this.wrapper
+this.wrapper=page_body.add_page(page_name,this.page_show);this.cont=this.wrapper
if(content)
-this.wrapper.innerHTML=content;if(page_name==home_page)
-pages['_home']=this;return this;}
+this.wrapper.innerHTML=content;return this;}
function render_page(page_name,menuitem){if(!page_name)return;if((!locals['Page'])||(!locals['Page'][page_name])){loadpage('_home');return;}
var pdoc=locals['Page'][page_name];if(pdoc.style)set_style(pdoc.style)
if(pdoc.stylesheet){set_style(locals.Stylesheet[pdoc.stylesheet].stylesheet);stylesheets.push(pdoc.stylesheet);}
@@ -872,7 +920,7 @@
* lib/js/legacy/wn/page_layout.js
*/
wn.PageLayout=function(args){$.extend(this,args)
-this.wrapper=$a(this.parent,'div');this.wtab=make_table(this.wrapper,1,2,'100%',[this.main_width,this.sidebar_width]);this.main=$a($td(this.wtab,0,0),'div','layout_wrapper');this.sidebar_area=$a($td(this.wtab,0,1),'div');this.head=$a(this.main,'div');this.toolbar_area=$a(this.main,'div');this.body=$a(this.main,'div');this.footer=$a(this.main,'div');if(this.heading){this.page_head=new PageHeader(this.head,this.heading);}}
+this.wrapper=$a(this.parent,'div','layout-wrapper layout-wrapper-background');this.main=$a(this.wrapper,'div','layout-main-section');this.sidebar_area=$a(this.wrapper,'div','layout-side-section');$a(this.wrapper,'div','',{clear:'both'});this.head=$a(this.main,'div');this.toolbar_area=$a(this.main,'div');this.body=$a(this.main,'div');this.footer=$a(this.main,'div');if(this.heading){this.page_head=new PageHeader(this.head,this.heading);}}
/*
* lib/js/legacy/wn/widgets/footer.js
*/
@@ -892,8 +940,7 @@
LocalDB.sync=function(list){if(list._kl)list=expand_doclist(list);for(var i=0;i<list.length;i++){var d=list[i];if(!d.name)
d.name=LocalDB.get_localname(d.doctype);LocalDB.add(d.doctype,d.name);locals[d.doctype][d.name]=d;if(d.doctype=='DocType'){fields_list[d.name]=[];}else if(d.doctype=='DocField'){if(!d.parent){alert('Error: No parent specified for field "'+d.label+'"');}
if(!fields_list[d.parent])fields_list[d.parent]=[];fields_list[d.parent][fields_list[d.parent].length]=d;if(!fields[d.parent])
-fields[d.parent]={};if(d.fieldname){fields[d.parent][d.fieldname]=d;}else if(d.label){fields[d.parent][d.label]=d;}}else if(d.doctype=='Event'){if((!d.localname)&&_c.calendar&&(!_c.calendar.has_event[d.name]))
-_c.calendar.set_event(d);}
+fields[d.parent]={};if(d.fieldname){fields[d.parent][d.fieldname]=d;}else if(d.label){fields[d.parent][d.label]=d;}}
if(d.localname)
notify_rename_observers(d.doctype,d.localname,d.name);}}
local_name_idx={};LocalDB.get_localname=function(doctype){if(!local_name_idx[doctype])local_name_idx[doctype]=1;var n='New '+get_doctype_label(doctype)+' '+local_name_idx[doctype];local_name_idx[doctype]++;return n;}
@@ -930,7 +977,7 @@
return locals[dt][newdoc];}
function make_doclist(dt,dn,deleted){var dl=[];dl[0]=locals[dt][dn];for(var ndt in locals){if(locals[ndt]){for(var ndn in locals[ndt]){var doc=locals[ndt][ndn];if(doc&&doc.parenttype==dt&&(doc.parent==dn||(deleted&&doc.__oldparent==dn))){dl[dl.length]=doc;}}}}
return dl;}
-var rename_observers=[];function notify_rename_observers(dt,old_name,new_name){try{var old=locals[dt][old_name];old.parent=null;old.__deleted=1;}catch(e){alert("[rename_from_local] No Document for: "+old_name);}
+var rename_observers=[];function notify_rename_observers(dt,old_name,new_name){try{delete locals[dt][old_name];}catch(e){alert("[rename_from_local] No Document for: "+old_name);}
for(var i=0;i<rename_observers.length;i++){if(rename_observers[i])
rename_observers[i].rename_notify(dt,old_name,new_name);}}
var Meta={};var local_dt={};Meta.make_local_dt=function(dt,dn){var dl=make_doclist('DocType',dt);if(!local_dt[dt])local_dt[dt]={};if(!local_dt[dt][dn])local_dt[dt][dn]={};for(var i=0;i<dl.length;i++){var d=dl[i];if(d.doctype=='DocField'){var key=d.fieldname?d.fieldname:d.label;local_dt[dt][dn][key]=copy_dict(d);}}}
@@ -961,8 +1008,7 @@
function save_doclist(dt,dn,save_action,onsave,onerr){var doc=locals[dt][dn];var doctype=locals['DocType'][dt];var tmplist=[];var doclist=make_doclist(dt,dn,1);var all_clear=true;if(save_action!='Cancel'){for(var n in doclist){var tmp=check_required(doclist[n].doctype,doclist[n].name,doclist[0].doctype);if(doclist[n].docstatus+''!='2'&&all_clear)
all_clear=tmp;}}
var f=frms[dt];if(f&&!all_clear){if(f)f.savingflag=false;return'Error';}
-var _save=function(){page_body.set_status('Saving...')
-$c('webnotes.widgets.form.save.savedocs',{'docs':compress_doclist(doclist),'docname':dn,'action':save_action,'user':user},function(r,rtxt){if(f){f.savingflag=false;}
+var _save=function(){$c('webnotes.widgets.form.save.savedocs',{'docs':compress_doclist(doclist),'docname':dn,'action':save_action,'user':user},function(r,rtxt){if(f){f.savingflag=false;}
if(r.saved){if(onsave)onsave(r);}else{if(onerr)onerr(r);}},function(){if(f){f.savingflag=false;}},0,(f?'Saving...':''));}
if(doc.__islocal&&(doctype&&doctype.autoname&&doctype.autoname.toLowerCase()=='prompt')){var newname=prompt('Enter the name of the new '+dt,'');if(newname){doc.__newname=strip(newname);_save();}else{msgprint('Not Saved');onerr();}}else{_save();}}
function check_required(dt,dn,parent_dt){var doc=locals[dt][dn];if(doc.docstatus>1)return true;var fl=fields_list[dt];if(!fl)return true;var all_clear=true;var errfld=[];for(var i=0;i<fl.length;i++){var key=fl[i].fieldname;var v=doc[key];if(fl[i].reqd&&is_null(v)&&fl[i].fieldname){errfld[errfld.length]=fl[i].label;if(cur_frm){var f=cur_frm.fields_dict[fl[i].fieldname];if(f){if(f.set_as_error)f.set_as_error(1);if(!cur_frm.error_in_section&&f.parent_section){cur_frm.set_section(f.parent_section.sec_id);cur_frm.error_in_section=1;}}}
@@ -972,37 +1018,30 @@
/*
* lib/js/legacy/webpage/body.js
*/
-function Body(){this.left_sidebar=null;this.right_sidebar=null;this.status_area=null;var me=this;page_body=this;this.no_of_columns=function(){var n=2;if(cint(me&&me.cp&&me.cp.right_sidebar_width))
-n=n+1;return n;}
-this.ready=function(){$dh('startup_div');$ds('body_div');}
-this.setup_page_areas=function(){var n=this.no_of_columns();this.body_table=make_table(this.body,1,n,'100%');$y(this.body_table,{tableLayout:'fixed'});var c=0;this.left_sidebar=$td(this.body_table,0,c);$y(this.left_sidebar,{width:cint(this.cp.left_sidebar_width)+'px'});c++;this.center=$a($td(this.body_table,0,c),'div');c++;if(cint(this.cp.right_sidebar_width)){this.right_sidebar=$td(this.body_table,0,c);$y(this.right_sidebar,{width:cint(this.cp.right_sidebar_width)+'px'})
-c++;}
-this.center.header=$a(this.center,'div');this.center.body=$a(this.center,'div');this.center.loading=$a(this.center,'div','',{margin:'200px 0px',fontSize:'14px',color:'#999',textAlign:'center'});this.center.loading.innerHTML='Loading...'}
-this.setup_sidebar_menu=function(){if(this.left_sidebar&&this.cp.show_sidebar_menu){sidebar_menu=new SidebarMenu();sidebar_menu.make_menu('');}}
+wn.provide('wn.pages');function Body(){this.left_sidebar=null;this.right_sidebar=null;this.status_area=null;var me=this;page_body=this;this.ready=function(){$dh('startup_div');$ds('body_div');}
+this.setup_page_areas=function(){this.center=this.body;this.center.header=$a(this.center,'div');this.center.body=$a(this.center,'div');this.center.loading=$a(this.center,'div','',{margin:'200px 0px',fontSize:'14px',color:'#999',textAlign:'center'});this.center.loading.innerHTML='Loading...'}
this.run_startup_code=function(){$(document).trigger('startup');try{if(this.cp.custom_startup_code)
eval(this.cp.custom_startup_code);}catch(e){errprint(e);}}
this.setup=function(){this.cp=wn.control_panel;this.wrapper=$a($i('body_div'),'div');this.body=$a(this.wrapper,'div');this.setup_page_areas();if(user=='Guest')user_defaults.hide_webnotes_toolbar=1;if(!cint(user_defaults.hide_webnotes_toolbar)||user=='Administrator'){this.wntoolbar=new wn.ui.toolbar.Toolbar();}
-if(this.cp.page_width)$y(this.wrapper,{width:cint(this.cp.page_width)+'px'});}
-this.pages={};this.cur_page=null;this.add_page=function(label,onshow,onhide){var c=$a(this.center.body,'div');if(onshow)
-c.onshow=onshow;if(onhide)
-c.onhide=onhide;this.pages[label]=c;$dh(c);return c;}
-this.change_to=function(label){$dh(this.center.loading);if(me.cur_page&&me.pages[label]!=me.cur_page){if(me.cur_page.onhide)
-me.cur_page.onhide();$dh(me.cur_page);}
-me.cur_page=me.pages[label];me.cur_page_label=label;$(me.cur_page).fadeIn();if(me.cur_page.onshow)
-me.cur_page.onshow(me.cur_page);}
-this.set_status=function(txt){if(this.status_area)
-this.status_area.innerHTML=txt;}
+if(this.cp.page_width)
+$y(this.wrapper,{width:cint(this.cp.page_width)+'px'});}
+this.cur_page=null;this.add_page=function(label,onshow,onhide){var c=$a(this.center.body,'div');if(onshow)
+c.page_show=onshow;if(onhide)
+c.page_hide=onhide;wn.pages[label]=c;$dh(c);return c;}
+this.change_to=function(label){$dh(this.center.loading);if(me.cur_page&&wn.pages[label]!=me.cur_page){if(me.cur_page.page_hide)
+me.cur_page.page_hide();$dh(me.cur_page);}
+me.cur_page=wn.pages[label];me.cur_page_label=label;$(me.cur_page).fadeIn();if(me.cur_page.page_show)
+me.cur_page.page_show(me.cur_page);}
this.set_session_changed=function(){if(this.session_message_set)return;var div=$a($i('body_div').parentNode,'div','',{textAlign:'center',fontSize:'14px',margin:'150px auto'});$dh('body_div');div.innerHTML='This session has been changed. Please <span class="link_type" onclick="window.location.reload()">refresh</span> to continue';this.session_message_set=1;}
this.setup();}
/*
* lib/js/legacy/app.js
*/
-var popup_cont;var session={};var start_sid=null;if(!wn)var wn={};function startup(){start_sid=get_cookie('sid');popup_cont=$a(document.getElementsByTagName('body')[0],'div');var setup_globals=function(r){wn.boot=r;profile=r.profile;user=r.profile.name;user_fullname=profile.first_name+(r.profile.last_name?(' '+r.profile.last_name):'');user_defaults=profile.defaults;user_roles=profile.roles;user_email=profile.email;profile.start_items=r.start_items;home_page=r.home_page;_p.letter_heads=r.letter_heads;sys_defaults=r.sysdefaults;session.rt=profile.can_read;if(r.ipinfo)session.ipinfo=r.ipinfo;session.dt_labels=r.dt_labels;session.rev_dt_labels={}
+var popup_cont;var session={};var start_sid=null;if(!wn)var wn={};function startup(){start_sid=get_cookie('sid');popup_cont=$a(document.getElementsByTagName('body')[0],'div');var setup_globals=function(r){wn.boot=r;profile=r.profile;user=r.profile.name;user_fullname=wn.user_info(user).fullname;user_defaults=profile.defaults;user_roles=profile.roles;user_email=profile.email;home_page=r.home_page;_p.letter_heads=r.letter_heads;sys_defaults=r.sysdefaults;session.rt=profile.can_read;if(r.ipinfo)session.ipinfo=r.ipinfo;session.dt_labels=r.dt_labels;session.rev_dt_labels={}
if(r.dt_labels){for(key in r.dt_labels)session.rev_dt_labels[r.dt_labels[key]]=key;}
wn.control_panel=r.control_panel;}
var setup_history=function(r){rename_observers.push(nav_obj);}
-var callback=function(r,rt){if(r.exc)console.log(r.exc);setup_globals(r);setup_history();var a=new Body();page_body.run_startup_code();page_body.setup_sidebar_menu();for(var i=0;i<startup_list.length;i++){startup_list[i]();}
-if(get_url_arg('embed')){newdoc(get_url_arg('embed'));return;}
+var callback=function(r,rt){if(r.exc)console.log(r.exc);setup_globals(r);setup_history();var a=new Body();page_body.run_startup_code();for(var i=0;i<startup_list.length;i++){startup_list[i]();}
var t=to_open();if(t){historyChange(t);}else if(home_page){loadpage(home_page);}
page_body.ready();}
if(wn.boot){LocalDB.sync(wn.boot.docs);callback(wn.boot,'');if(wn.boot.error_messages)
@@ -1025,8 +1064,7 @@
$(d).printElement();}
_p.preview=function(html){var w=window.open('');w.document.write(html)
w.document.close();}
-function setup_calendar(){var p=new Page('_calendar');p.wrapper.style.height='100%';p.wrapper.onshow=function(){wn.require('lib/js/legacy/widgets/calendar.js');if(!_c.calendar){_c.calendar=new Calendar();_c.calendar.init(p.cont);rename_observers.push(_c.calendar);}}}
-startup_list.push(setup_calendar);var resize_observers=[]
+var resize_observers=[]
function set_resize_observer(fn){if(resize_observers.indexOf(fn)==-1)resize_observers.push(fn);}
window.onresize=function(){return;var ht=get_window_height();for(var i=0;i<resize_observers.length;i++){resize_observers[i](ht);}}
get_window_height=function(){var ht=window.innerHeight?window.innerHeight:document.documentElement.offsetHeight?document.documentElement.offsetHeight:document.body.offsetHeight;return ht;}
@@ -1034,103 +1072,49 @@
* js/app.js
*/
wn.app={name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'© Web Notes Technologies Pvt Ltd',version:'2.'+window._version_number}
-wn.modules_path='erpnext';wn.settings.no_history=true;$(document).bind('ready',function(){startup();});$(document).bind('toolbar_setup',function(){$('.brand').html('<b>erp</b>next');})
-/*
- * lib/js/bootstrap/bootstrap-dropdown.js
- *//* ============================================================
- * bootstrap-dropdown.js v1.4.0
- * http://twitter.github.com/bootstrap/javascript.html#dropdown
- * ============================================================
- * Copyright 2011 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================ */
-
-!function( $ ){
-
- "use strict"
-
- /* DROPDOWN PLUGIN DEFINITION
- * ========================== */
-
- $.fn.dropdown = function ( selector ) {
- return this.each(function () {
- $(this).delegate(selector || d, 'click', function (e) {
- var li = $(this).parent('li')
- , isActive = li.hasClass('open')
-
- clearMenus()
- !isActive && li.toggleClass('open')
- return false
- })
- })
- }
-
- /* APPLY TO STANDARD DROPDOWN ELEMENTS
- * =================================== */
-
- var d = 'a.menu, .dropdown-toggle'
-
- function clearMenus() {
- $(d).parent('li').removeClass('open')
- }
-
- $(function () {
- $('html').bind("click", clearMenus)
- $('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' )
- })
-
-}( window.jQuery || window.ender );
-
+wn.modules_path='erpnext';wn.settings.no_history=true;$(document).bind('ready',function(){startup();});$(document).bind('toolbar_setup',function(){$('.brand').html('<b>erp</b>next\
+ <i class="icon-home icon-white navbar-icon-home" ></i>').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});})
/*
* erpnext/startup/startup.js
*/
-var current_module;var is_system_manager=0;var module_content_dict={};var user_full_nm={};wn.provide('erpnext.startup');erpnext.startup.set_globals=function(){pscript.is_erpnext_saas=cint(wn.control_panel.sync_with_gateway)
+var current_module;var is_system_manager=0;wn.provide('erpnext.startup');erpnext.modules={'Selling':'selling-home','Accounts':'accounts-home','Stock':'stock-home','Buying':'buying-home','Support':'support-home','Projects':'projects-home','Production':'production-home','Website':'website-home','HR':'hr-home','Setup':'Setup','Activity':'activity','To Do':'todo','Calendar':'calendar','Messages':'messages','Knowledge Base':'questions','Dashboard':'dashboard'}
+erpnext.startup.set_globals=function(){pscript.is_erpnext_saas=cint(wn.control_panel.sync_with_gateway)
if(inList(user_roles,'System Manager'))is_system_manager=1;}
-erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(user=='Guest'){$dh(page_body.left_sidebar);if(wn.boot.custom_css){set_style(wn.boot.custom_css);}
-if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}}else{pscript.startup_make_sidebar();erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();$('footer').html('<div class="erpnext-footer">\
- Powered by <a href="https://erpnext.com">ERPNext</a></div>');}
+erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(wn.boot.custom_css){set_style(wn.boot.custom_css);}
+if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);}
+if(user=='Guest'){if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}}else{wn.boot.profile.allow_modules=wn.boot.profile.allow_modules.concat(['To Do','Knowledge Base','Calendar','Activity','Messages'])
+erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();$('footer').html('<div class="web-footer erpnext-footer">\
+ <a href="#!attributions">ERPNext | Attributions and License</a></div>');if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup();}}
$('#startup_div').toggle(false);}
show_chart_browser=function(nm,chart_type){var call_back=function(){if(nm=='Sales Browser'){var sb_obj=new SalesBrowser();sb_obj.set_val(chart_type);}
else if(nm=='Accounts Browser')
pscript.make_chart(chart_type);}
loadpage(nm,call_back);}
-ModulePage=function(parent,module_name,module_label,help_page,callback){this.parent=parent;page_body.cur_page.module_page=this;this.wrapper=$a(parent,'div');this.module_name=module_name;this.transactions=[];this.page_head=new PageHeader(this.wrapper,module_label);if(help_page){var btn=this.page_head.add_button('Help',function(){loadpage(this.help_page)},1,'ui-icon-help')
-btn.help_page=help_page;}
-if(callback)this.callback=function(){callback();}}
-var update_messages=function(){if(inList(['Guest','Administrator'],user)){return;}
-$c_page('home','event_updates','get_unread_messages',null,function(r,rt){if(!r.exc){page_body.wntoolbar.set_new_comments(r.message);}});}
+var update_messages=function(reset){if(inList(['Guest'],user)){return;}
+if(!reset){$c_page('home','event_updates','get_unread_messages',null,function(r,rt){if(!r.exc){page_body.wntoolbar.set_new_comments(r.message);var circle=$('#msg_count')
+if(circle){if(r.message.length){circle.find('span:first').text(r.message.length);circle.toggle(true);}else{circle.toggle(false);}}}else{clearInterval(wn.updates.id);}});}else{page_body.wntoolbar.set_new_comments(0);$('#msg_count').toggle(false);}}
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
-wn.updates.id=setInterval(update_messages,180000);}
+wn.updates.id=setInterval(update_messages,60000);}
+erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat !important;}',{src:src}))}
$(document).bind('startup',function(){erpnext.startup.start();});
/*
* erpnext/website/js/topbar.js
*/
-wn.provide('erpnext.topbar');erpnext.topbar.TopBar=Class.extend({init:function(){this.make();$('.brand').html(wn.boot.website_settings.brand_html);this.make_items();$('.topbar').dropdown();},make:function(){$('header').append('<div class="topbar">\
- <div class="topbar-inner">\
+wn.provide('erpnext.navbar');erpnext.navbar.navbar=Class.extend({init:function(){this.make();$('.brand').html(wn.boot.website_settings.brand_html);this.make_items();$('.dropdown-toggle').dropdown();},make:function(){$('header').append('<div class="navbar navbar-fixed-top">\
+ <div class="navbar-inner">\
<div class="container">\
<a class="brand">[brand]</a>\
<ul class="nav">\
</ul>\
<img src="lib/images/ui/spinner.gif" id="spinner"/>\
- <ul class="nav secondary-nav">\
+ <ul class="nav pull-right">\
<li><a href="#!Login Page">Login</a></li>\
</ul>\
</div>\
</div>\
</div>');$('.brand').attr('href','#!'+(wn.boot.website_settings.home_page||'Login Page'))},make_items:function(){var items=wn.boot.website_menus;for(var i=0;i<items.length;i++){var item=items[i];if(!item.parent_label&&item.parentfield=='top_bar_items'){item.route=item.url||item.custom_page;$('header .nav:first').append(repl('<li data-label="%(label)s">\
<a href="#!%(route)s">%(label)s</a></li>',item))}}
-for(var i=0;i<items.length;i++){var item=items[i];if(item.parent_label&&item.parentfield=='top_bar_items'){$parent_li=$(repl('header li[data-label="%(parent_label)s"]',item));if(!$parent_li.hasClass('dropdown')){$parent_li.addClass('dropdown');$parent_li.find('a:first').addClass('dropdown-toggle');$parent_li.append('<ul class="dropdown-menu"></ul>');}
+for(var i=0;i<items.length;i++){var item=items[i];if(item.parent_label&&item.parentfield=='top_bar_items'){$parent_li=$(repl('header li[data-label="%(parent_label)s"]',item));if(!$parent_li.hasClass('dropdown')){$parent_li.addClass('dropdown');$parent_li.find('a:first').addClass('dropdown-toggle').attr('data-toggle','dropdown').attr('href','').append('<b class="caret"></b>').click(function(){return false;});$parent_li.append('<ul class="dropdown-menu"></ul>');}
item.route=item.url||item.custom_page;$parent_li.find('.dropdown-menu').append(repl('<li data-label="%(label)s">\
<a href="#!%(route)s">%(label)s</a></li>',item))}}}});erpnext.Footer=Class.extend({init:function(){$('footer').html(repl('<div class="web-footer">\
<div class="web-footer-menu"><ul></ul></div>\
@@ -1140,4 +1124,4 @@
<a href="https://erpnext.com">erpnext.com</a></div>\
</div>',wn.boot.website_settings));this.make_items();},make_items:function(){var items=wn.boot.website_menus
for(var i=0;i<items.length;i++){var item=items[i];if(!item.parent_label&&item.parentfield=='footer_items'){item.route=item.url||item.custom_page;$('.web-footer-menu ul').append(repl('<li><a href="#!%(route)s" \
- data-label="%(label)s">%(label)s</a></li>',item))}}}});$(document).bind('startup',function(){erpnext.footer=new erpnext.Footer();erpnext.topbar.topbar=new erpnext.topbar.TopBar();})
\ No newline at end of file
+ data-label="%(label)s">%(label)s</a></li>',item))}}}});$(document).bind('startup',function(){erpnext.footer=new erpnext.Footer();erpnext.navbar.navbar=new erpnext.navbar.navbar();})
\ No newline at end of file
diff --git a/js/app.js b/js/app.js
index ec4da9a..f2e24bb 100644
--- a/js/app.js
+++ b/js/app.js
@@ -1,3 +1,19 @@
+// ERPNext - web based ERP (http://erpnext.com)
+// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
wn.app = {
name: 'ERPNext',
license: 'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',
@@ -15,5 +31,11 @@
});
$(document).bind('toolbar_setup', function() {
- $('.brand').html('<b>erp</b>next');
-})
\ No newline at end of file
+ $('.brand').html('<b>erp</b>next\
+ <i class="icon-home icon-white navbar-icon-home" ></i>')
+ .hover(function() {
+ $(this).find('.icon-home').addClass('navbar-icon-home-hover');
+ }, function() {
+ $(this).find('.icon-home').removeClass('navbar-icon-home-hover');
+ });
+})
diff --git a/rss.xml b/rss.xml
index f69724b..2aa7ead 100755
--- a/rss.xml
+++ b/rss.xml
@@ -1,5 +1,22 @@
#!/usr/bin/python
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
import cgi, cgitb, os, sys
cgitb.enable()
diff --git a/sitemap.xml b/sitemap.xml
index 04e565b..d3e09fd 100755
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -1,5 +1,21 @@
#!/usr/bin/python
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import cgi, cgitb, os, sys
cgitb.enable()
diff --git a/temp.py b/temp.py
new file mode 100644
index 0000000..cdbd4b0
--- /dev/null
+++ b/temp.py
@@ -0,0 +1,55 @@
+license = """ERPNext - web based ERP (http://erpnext.com)
+Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>."""
+
+license2 = """Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
+
+MIT License (MIT)
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
+PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+"""
+
+
+if __name__=='__main__':
+ import os
+ clicense = '\n'.join([('# ' + l) for l in license2.split('\n')])
+
+ for wt in os.walk('lib/py/build/'):
+ for fname in wt[2]:
+ if fname.endswith('.py'):
+ path = os.path.join(wt[0], fname)
+ with open(path, 'r') as codefile:
+ codetxt = codefile.read()
+
+ if codetxt.strip():
+ with open(path, 'w') as codefile:
+ codefile.write(clicense + '\n\n' + codetxt)
+
+ print 'updated in ' + path
\ No newline at end of file
diff --git a/version.num b/version.num
index 99fd457..e791c50 100644
--- a/version.num
+++ b/version.num
@@ -1 +1 @@
-577
\ No newline at end of file
+787
diff --git a/wnf.py b/wnf.py
index 4f18187..d0a0d56 100755
--- a/wnf.py
+++ b/wnf.py
@@ -1,5 +1,21 @@
#!/usr/bin/env python
+# ERPNext - web based ERP (http://erpnext.com)
+# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
import os, sys
def replace_code(start, txt1, txt2, extn):
@@ -23,13 +39,18 @@
def setup_options():
from optparse import OptionParser
parser = OptionParser()
+
+ parser.add_option("-d", "--db",
+ dest="db_name",
+ help="Apply the patches on given db")
+
+ # build
parser.add_option("-b", "--build", default=False, action="store_true",
help="minify + concat js files")
parser.add_option("-c", "--clear", default=False, action="store_true",
help="increment version")
- parser.add_option("--replace", nargs=3, default=False,
- metavar = "search replace_by extension",
- help="file search-replace")
+
+ # git
parser.add_option("--status", default=False, action="store_true",
help="git status")
parser.add_option("--pull", nargs=2, default=False,
@@ -41,22 +62,42 @@
parser.add_option("-l", "--latest",
action="store_true", dest="run_latest", default=False,
help="Apply the latest patches")
+
+ # patch
parser.add_option("-p", "--patch", nargs=1, dest="patch_list", metavar='patch_module',
action="append",
help="Apply patch")
parser.add_option("-f", "--force",
action="store_true", dest="force", default=False,
help="Force Apply all patches specified using option -p or --patch")
- parser.add_option("-d", "--db",
- dest="db_name",
- help="Apply the patches on given db")
parser.add_option('--reload_doc', nargs=3, metavar = "module doctype docname",
help="reload doc")
parser.add_option('--export_doc', nargs=2, metavar = "doctype docname",
help="export doc")
+
+ # install
parser.add_option('--install', nargs=3, metavar = "rootpassword dbname source",
help="install fresh db")
- parser.add_option('--sync_with_gateway', nargs=1, metavar = "1/0", help="Set or Unset Sync with Gateway")
+ parser.add_option('--sync_with_gateway', nargs=1, metavar = "1/0", \
+ help="Set or Unset Sync with Gateway")
+
+ # diff
+ parser.add_option('--diff_ref_file', nargs=0, \
+ help="Get missing database records and mismatch properties, with file as reference")
+ parser.add_option('--diff_ref_db', nargs=0, \
+ help="Get missing .txt files and mismatch properties, with database as reference")
+
+ # scheduler
+ parser.add_option('--run_scheduler', default=False, action="store_true",
+ help="Trigger scheduler")
+ parser.add_option('--run_scheduler_event', nargs=1, metavar="[all|daily|weekly|monthly]",
+ help="Run scheduler event")
+
+ # misc
+ parser.add_option("--replace", nargs=3, default=False,
+ metavar = "search replace_by extension",
+ help="file search-replace")
+
return parser.parse_args()
@@ -152,6 +193,22 @@
else:
webnotes.message_log.append("ERROR: sync_with_gateway can be either 0 or 1")
+ elif options.diff_ref_file is not None:
+ import webnotes.modules.diff
+ webnotes.modules.diff.diff_ref_file()
+
+ elif options.diff_ref_db is not None:
+ import webnotes.modules.diff
+ webnotes.modules.diff.diff_ref_db()
+
+ elif options.run_scheduler:
+ import webnotes.utils.scheduler
+ print webnotes.utils.scheduler.execute()
+
+ elif options.run_scheduler_event is not None:
+ import webnotes.utils.scheduler
+ print webnotes.utils.scheduler.trigger('execute_' + options.run_scheduler_event)
+
# print messages
if webnotes.message_log:
print '\n'.join(webnotes.message_log)