Skip to content

Commit

Permalink
Merge pull request #20 from inoerp/master
Browse files Browse the repository at this point in the history
0.5.1
  • Loading branch information
inoerp committed Apr 4, 2016
2 parents a18db57 + 79bcd06 commit 0802acf
Show file tree
Hide file tree
Showing 73 changed files with 12,408 additions and 4,477 deletions.
11,664 changes: 8,413 additions & 3,251 deletions inoerp/engine/install/inoerp.sql

Large diffs are not rendered by default.

27 changes: 23 additions & 4 deletions inoerp/extensions/user/user_login.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?php include_once __DIR__ . '/../../includes/basics/basics.inc'; ?>
<?php
if ($session->login_status()) {
if ($session->login_status()) {
redirect_to(HOME_URL);
}
?>
<?php

if (!isset($msg)) {
$msg = '';
}
Expand Down Expand Up @@ -89,7 +90,7 @@
$new_user->save();
$new_user->_after_save();
$dbc->confirm();
}else{
} else {
$msg .= '<div class="message error"> Account creation failed!. Contact the admin. </div>';
redirect_to(HOME_URL . "extensions/user/user_login.php?error_message=email_error");
}
Expand Down Expand Up @@ -118,7 +119,18 @@
//Social login
}//end of if post submit
?>
<?php include_once('../../includes/basics/header_public.inc');
<?php

include_once('../../includes/basics/header_public.inc');
if (!empty($_SESSION['default_theme'])) {
$selected_theme = $_SESSION['default_theme'];
} else {
set_default_theme();
$selected_theme = $_SESSION['default_theme'];
}

defined('THEME_DIR') ? null : define('THEME_DIR', HOME_DIR . DS . 'themes' . DS . $selected_theme);
defined('THEME_URL') ? null : define("THEME_URL", HOME_URL . 'themes/' . $selected_theme);
//include_once(THEME_DIR . DS. 'header.inc');
?>
<script type='text/javascript' src="user.js" ></script>
Expand Down Expand Up @@ -188,4 +200,11 @@
}
?>

<?php require_once('login/user_login_template.php') ?>
<?php

if (file_exists(THEME_DIR . '/template/user_login_template.php')) {
require_once(THEME_DIR . '/template/user_login_template.php');
} else {
require_once('login/user_login_template.php');
}
?>
Binary file removed inoerp/files/051913-070543_images3.jpg
Binary file not shown.
Empty file.
Empty file.
Empty file.
95 changes: 91 additions & 4 deletions inoerp/includes/js/basics.js
Original file line number Diff line number Diff line change
Expand Up @@ -3282,9 +3282,9 @@ $(document).ready(function () {
});
}

if (localStorage.getItem("close_field_class") !== null ) {
if (localStorage.getItem("close_field_class") !== null) {
var close_field_class = localStorage.getItem("close_field_class");
if (localStorage.getItem("close_div_class") !== null){
if (localStorage.getItem("close_div_class") !== null) {
var close_div_class = localStorage.getItem("close_div_class");
}
var opener_elemenType = window.opener.$(close_field_class).parent().prop('tagName');
Expand Down Expand Up @@ -3697,7 +3697,7 @@ $(document).ready(function () {
localStorage.setItem("set_value_for_one_div", true);
var close_div_class = '.' + $(this).closest('ul').parent().prop('class').replace(/\s+/g, '.');
localStorage.setItem("close_div_class", close_div_class);
var close_field_class = '.' + $(this).parent().find(':input').not('.hidden').prop('class').replace(/\s+/g, '.');
var close_field_class = '.' + $(this).parent().find(':input').not('.hidden').prop('class').replace(/\s+/g, '.');
localStorage.setItem("close_field_class", close_field_class);

void window.open('select.php?class_name=address&mode=2', '_blank',
Expand Down Expand Up @@ -4050,7 +4050,94 @@ $(document).ready(function () {

//Popup for print
$(".print").click(function () {
window.print();
// window.print();

var pContent = '<div id="popup_print">';

if ($('.extn_report_content').length > 0) {
$('#structure').find('table').each(function (k, v) {
pContent += '<table>' + $(v).html() + '</table>';
});
} else if ($('#searchResult').length > 0) {
$('#searchResult').find('table').each(function (k, v) {
pContent += '<table>' + $(v).html() + '</table>';
});
} else {
pContent += '<ul>';
$('#form_header').not('.big_popover').find('label,:input').each(function (k, v) {
if ($(v).closest('span').hasClass('big_popover')) {
return true;
}
if ($(v).is('label')) {
pContent += '<li><label>';
pContent += $(v).html();
} else {

if ($(v).is('select')) {
pContent += $(v).find(':selected').text();

} else if ($(v).is(':text') || $(v).is('bool')) {
pContent += $(v).val();
}
}
if (!$(v).is('label')) {
pContent += '</li>';
} else {
pContent += '</label>';
}
});
pContent += '</ul>';
}

if ($('#form_line').length > 0) {
if ($('#form_line').find('table').length > 0) {
$('#form_line').find('table').each(function (k, v) {
pContent += '<table>' + $(v).html() + '</table>';
});
} else {
pContent += '<ul>';
$('#form_line').find('label,:input').each(function (k, v) {
if ($(v).closest('span').hasClass('big_popover')) {
return true;
}
if ($(v).is('label')) {
pContent += '<li><label>';
pContent += $(v).html();
} else {

if ($(v).is('select')) {
pContent += $(v).find(':selected').text();

} else if ($(v).is(':text') || $(v).is('bool')) {
pContent += $(v).val();
}
}
if (!$(v).is('label')) {
pContent += '</li>';
} else {
pContent += '</label>';
}
});
pContent += '</ul>';
}

}



pContent += '</div>';
var printContenet = '<!DOCTYPE html><html><head>';
printContenet += '<title>Print it!</title>';
printContenet += '<link rel="stylesheet" type="text/css" href="themes/default/print.css">';
printContenet += '</head><body>';
printContenet += pContent;
printContenet += '<' + '/body' + '><' + '/html' + '>';
var popupWin = window.open("", "_blank", "width=1300,height=800,TOOLBAR=no,MENUBAR=no,SCROLLBARS=yes,RESIZABLE=yes,LOCATION=no,DIRECTORIES=no,STATUS=no");
popupWin.document.writeln('' + printContenet + '');
popupWin.document.close();
popupWin.focus();
popupWin.print();
popupWin.close();
});
//all download
$('#export_excel_allResult').on('click', function () {
Expand Down
102 changes: 97 additions & 5 deletions inoerp/includes/js/reload.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,101 @@ $(document).ready(function () {
$("[required]").addClass('required');
$("[readonly]").addClass('readonly');
//Popup for print
$(".print").click(function () {
window.print();
});
$(".print").click(function () {
// window.print();

var pContent = '<div id="popup_print">';

if ($('.extn_report_content').length > 0) {
$('#structure').find('table').each(function (k, v) {
pContent += '<table>' + $(v).html() + '</table>';
});
} else if ($('#searchResult').length > 0) {
$('#searchResult').find('table').each(function (k, v) {
pContent += '<table>' + $(v).html() + '</table>';
});
} else {
pContent += '<ul>';
$('#form_header').not('.big_popover').find('label,:input').each(function (k, v) {
if ($(v).closest('span').hasClass('big_popover')) {
return true;
}
if ($(v).is('label')) {
pContent += '<li><label>';
pContent += $(v).html();
} else {

if ($(v).is('select')) {
pContent += $(v).find(':selected').text();

} else if ($(v).is(':text') || $(v).is('bool')) {
pContent += $(v).val();
}
}
if (!$(v).is('label')) {
pContent += '</li>';
} else {
pContent += '</label>';
}
});
pContent += '</ul>';
}

if ($('#form_line').length > 0) {
if ($('#form_line').find('table').length > 0) {
$('#form_line').find('table').each(function (k, v) {
pContent += '<table>' + $(v).html() + '</table>';
});
} else {
pContent += '<ul>';
$('#form_line').find('label,:input').each(function (k, v) {
if ($(v).closest('span').hasClass('big_popover')) {
return true;
}
if ($(v).is('label')) {
pContent += '<li><label>';
pContent += $(v).html();
} else {

if ($(v).is('select')) {
pContent += $(v).find(':selected').text();

} else if ($(v).is(':text') || $(v).is('bool')) {
pContent += $(v).val();
}
}
if (!$(v).is('label')) {
pContent += '</li>';
} else {
pContent += '</label>';
}
});
pContent += '</ul>';
}

}



pContent += '</div>';

var printContenet = '<!DOCTYPE html><html><head>';
printContenet += '<title>Print it!</title>';

printContenet += '<link rel="stylesheet" type="text/css" href="themes/default/print.css">';

printContenet += '</head><body>';
printContenet += pContent;
printContenet += '<' + '/body' + '><' + '/html' + '>';

var popupWin = window.open("", "_blank", "width=1300,height=800,TOOLBAR=no,MENUBAR=no,SCROLLBARS=yes,RESIZABLE=yes,LOCATION=no,DIRECTORIES=no,STATUS=no");
popupWin.document.writeln('' + printContenet + '');
popupWin.document.close();
popupWin.focus();
popupWin.print();

popupWin.close();
});
//all download
$('#export_excel_allResult').on('click', function () {
$('#download_all').submit();
Expand Down Expand Up @@ -510,8 +602,8 @@ $(document).ready(function () {
json_url: 'modules/inv/item/json_item.php',
primary_column1: 'org_id'
});
//vaidation field auto complete

//vaidation field auto complete
$('.val_field').inoAutoCompleteElement({
json_url: 'includes/json/json_validation_field.php',
primary_column1: 'bu_org_id',
Expand Down
2 changes: 1 addition & 1 deletion inoerp/includes/template/json_multi_select_template.inc
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
if ((!empty($multi_selct_input_fields) && is_array($multi_selct_input_fields)) && (in_array($all_columns[$k], $multi_selct_input_fields))) {
$value = null;
} else {
$value = $records->$all_columns[$k];
$value = $records->{$all_columns[$k]};
}
echo "<td><input type=\"text\" name=\"$bracketName\" class=\"$div_class_name text $all_columns[$k]\" value=\"$value\" $readonly size=\"12\"> </td>";
} else {
Expand Down
Binary file removed inoerp/locale/docs/All List - Copy.docx
Binary file not shown.
Binary file removed inoerp/locale/docs/English_Chinese_China.xlsx
Binary file not shown.
1 change: 1 addition & 0 deletions inoerp/modules/fp/kanban/kanban_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
<li class="line_key_field" data-line_key_field="line_name" ></li>
<li class="single_line" data-single_line="false" ></li>
<li class="form_line_id" data-form_line_id="fp_kanban_line" ></li>
<li class="allow_header_delete" data-allow_header_delete="true" ></li>
</ul>
<ul id="js_contextMenu_data">
<li class="docHedaderId" data-docHedaderId="fp_kanban_header_id" ></li>
Expand Down
18 changes: 18 additions & 0 deletions inoerp/modules/fp/minmax_board/board.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,22 @@ $(document).ready(function () {
});
});

//
// $(".draggable_element").draggable(
// {helper: 'clone'},
// {cursor: "crosshair"});
// $("#urgent_card_block").droppable({
// accept: ".draggable_element",
// drop: function (event, ui) {
// $(this).append($(ui.draggable).clone());
//// remove_from_dragged_element();
// }
// });
//
// $('#urgent_card_block').on('dblclick', 'li.draggable_element', function () {
//
// $(this).remove();
// });

});

2 changes: 1 addition & 1 deletion inoerp/modules/gl/journal/journal.inc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php$ref_doc_stmt = '';$action_a = [ 'Entered' => 'No Action'];$lgr = new gl_ledger;if (!empty($$class->gl_journal_header_id)) { $readonly1 = 1; $ledger = $lgr->findBy_id($$class->ledger_id); $coa = coa::find_by_structure($ledger->coa_structure_id); $$class->coa_id = $coa->coa_id; $gp = new gl_period(); $gp_i = $gp->findBy_id($$class->period_id); $all_open_periods = $gp->find_all_periods($$class->ledger_id, 'OPEN'); $period_name_stmt = form::select_field_from_object('period_id', $all_open_periods, 'gl_period_id', 'period_name', $$class->period_id, 'gl_period_id', 1, '', '', $readonly1); //action array if ($$class->status == 'REVERSED') { $mode = 2; } elseif ($$class->status == 'POSTED') { $action_a = [ 'REVERSED' => 'Reverse']; $mode = 2; } elseif ($$class->status == 'ENTERED') { $action_a = [ 'POSTED' => 'Post', 'APPROVED' => 'Approve']; } elseif ($$class->status == 'APPROVED') { $action_a = [ 'POSTED' => 'Post', 'UNPOSTED' => 'Un Approve']; } //allow to change period for Reversed Journals if ($$class->journal_category == 'GL_REVERSAL') { $period_name_stmt = form::select_field_from_object('period_id', $all_open_periods, 'gl_period_id', 'period_name', $$class->period_id, 'gl_period_id', '', '', '', ''); } //view reference statement if((!empty($$class->reference_type)) && (!empty($$class->reference_key_name)) && (!empty($$class->reference_key_value))){ $ref_doc_stmt = show_reference_doc($$class->reference_key_name, $$class->reference_key_value);// $ref_doc_stmt = '<a href=\'form.php?class_name='. $$class->reference_key_name . '&gl_journal_header_id=' . $$class->reference_key_value. '&mode=2\'>View Reference Doc</a>'; } } else { $period_name_stmt = form::text_field('period_id', 'Select Ledger', 14, '', 1, '', 'period_id', 1);}if(empty($$class->doc_currency) && !empty($$class->currency)){ $$class->doc_currency = $$class->currency;}if(empty($$class->document_date)){ $$class->document_date = current_time(true);}$$class->set_module_default();?>
<?php$ref_doc_stmt = '';$action_a = [ 'Entered' => 'No Action'];$lgr = new gl_ledger;if (!empty($$class->gl_journal_header_id)) { $readonly1 = 1; $ledger = $lgr->findBy_id($$class->ledger_id); $coa = coa::find_by_structure($ledger->coa_structure_id); $$class->coa_id = $coa->coa_id; $gp = new gl_period(); $gp_i = $gp->findBy_id($$class->period_id); $all_open_periods = $gp->find_all_periods($$class->ledger_id, 'OPEN'); $period_name_stmt = form::select_field_from_object('period_id', $all_open_periods, 'gl_period_id', 'period_name', $$class->period_id, 'gl_period_id', 1, '', '', $readonly1); //action array if ($$class->status == 'REVERSED') { $mode = 2; } elseif ($$class->status == 'POSTED') { $action_a = [ 'REVERSED' => 'Reverse']; $mode = 2; } elseif ($$class->status == 'ENTERED') { $action_a = [ 'POSTED' => 'Post', 'APPROVED' => 'Approve']; } elseif ($$class->status == 'APPROVED') { $action_a = [ 'POSTED' => 'Post', 'UNPOSTED' => 'Un Approve']; } //allow to change period for Reversed Journals if ($$class->journal_category == 'GL_REVERSAL') { $period_name_stmt = form::select_field_from_object('period_id', $all_open_periods, 'gl_period_id', 'period_name', $$class->period_id, 'gl_period_id', '', '', '', ''); } //view reference statement if((!empty($$class->reference_type)) && (!empty($$class->reference_key_name)) && (!empty($$class->reference_key_value))){ $ref_doc_stmt = show_reference_doc($$class->reference_key_name, $$class->reference_key_value);// $ref_doc_stmt = '<a href=\'form.php?class_name='. $$class->reference_key_name . '&gl_journal_header_id=' . $$class->reference_key_value. '&mode=2\'>View Reference Doc</a>'; } } else { $period_name_stmt = form::text_field('period_id', 'Select Ledger', 14, '', 1, '', 'period_id', 1); if(empty($$class->status)){ $$class->status = 'ENTERED'; }}if(empty($$class->doc_currency) && !empty($$class->currency)){ $$class->doc_currency = $$class->currency;}if(empty($$class->document_date)){ $$class->document_date = current_time(true);}$$class->set_module_default();?>
Expand Down
2 changes: 1 addition & 1 deletion inoerp/modules/gl/journal/journal_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<li><?php $f->l_text_field_dm('journal_name'); ?></li>
<li><?php $f->l_text_field_d('description'); ?></li>
<li><?php $f->l_select_field_from_object('balance_type', $$class->gl_balance_type(), 'option_line_code', 'option_line_value', $$class->balance_type, 'balance_type', '', 1, $readonly1); ?></li>
<li><?php $f->l_select_field_from_array('status', $$class->status_a, $$class->status, 'status','','',1,1); ?></li>
<li><?php $f->l_select_field_from_array('status', $$class->status_a, $$class->status, 'status','always_readonly', 1); ?></li>
<li><?php $f->l_date_fieldFromToday_d('post_date', $$class->post_date) ?></li>
<li id="document_status"><?php $f->l_select_field_from_array('action', $action_a, $$class->action, 'action'); ?></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions inoerp/modules/pm/batch/batch.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?phpif (!empty($$class->pm_recipe_header_id)) { $pm_recipe_i = pm_recipe_all_v::find_by_id($$class->pm_recipe_header_id); $$class->recipe_name = $pm_recipe_i->recipe_name; $$class->routing_name = $pm_recipe_i->routing_name; $$class->formula_name = $pm_recipe_i->formula_name;} else { $$class->routing_name = $$class->formula_name = null;}if (empty($pm_batch_ingredient_object) && !empty($$class->pm_batch_header_id)) { $pm_batch_ingredient_object = pm_batch_ingredient::find_by_parent_id($$class->pm_batch_header_id);}if (empty($pm_batch_ingredient_object)) { $pm_batch_ingredient_object = array(new pm_batch_ingredient());}if (empty($pm_batch_byproduct_object) && !empty($$class->pm_batch_header_id)) { $pm_batch_byproduct_object = pm_batch_byproduct::find_by_parent_id($$class->pm_batch_header_id);}if (empty($pm_batch_byproduct_object)) { $pm_batch_byproduct_object = array(new pm_batch_byproduct());}if ((!empty($$class->arproval_status)) && ($$class->arproval_status == 'CANCELLED')) { $mode = 2; $readonly = 1;}$add_to_order_a = [];$pageno = !empty($_GET['pageno']) ? $_GET['pageno'] : 1;$per_page = !empty($_GET['per_page']) ? $_GET['per_page'] : 10;$total_count = count($pm_batch_line_object);$pagination = new pagination($pageno, $per_page, $total_count);$pagination->setProperty('_path', 'form');$position = ($pageno - 1) * $per_page;?>
Expand Down
Loading

0 comments on commit 0802acf

Please sign in to comment.