Skip to content

Commit

Permalink
0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
inoerp committed Oct 10, 2015
1 parent 9dbfc70 commit ba49060
Show file tree
Hide file tree
Showing 6 changed files with 389 additions and 75 deletions.
294 changes: 294 additions & 0 deletions inoerp/includes/js/angular.min.js

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions inoerp/includes/js/custom_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,4 @@
});
};

}(jQuery));




}(jQuery));
7 changes: 6 additions & 1 deletion inoerp/modules/prj/revenue/class_prj_revenue_header.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class prj_revenue_header extends dbObject {

public static $table_name = "prj_revenue_header";
public static $primary_column = "prj_revenue_header_id";
public static $key_column = 'revenue_class';
public static $primary_column2 = "revenue_number";
public static $key_column = 'prj_project_header_id';
public static $dependent_classes = ['prj_revenue_line'];
public static $module = "prj";
// data base variables as stored database column name
Expand Down Expand Up @@ -94,6 +95,9 @@ class prj_revenue_header extends dbObject {
];
public $fields_inForm_notInDataBase = [
'action',
];
public $fields_inDataBase_notInForm = [
'currency'
];
public $search = [
'_show_update_path' => 1,
Expand All @@ -103,6 +107,7 @@ class prj_revenue_header extends dbObject {
'Organization' => 'search_org_name'
];
public $profile_default = [
'exchange_rate_type' => 'gl_currency_conversion_type',
'bu_org_id' => 'org_bu_name_default',
];
public $prg_distribute_cost_parameters = [
Expand Down
16 changes: 16 additions & 0 deletions inoerp/modules/prj/revenue/revenue.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$(document).ready(function () {
$('body').off('click', '#menu_button4_2, #menu_button4_2_1').on('click', '#menu_button4_2, #menu_button4_2_1', function () {
$('.status2').val('ENTERED');
$('.debit_ac_id, .credit_ac_id').val('');
$('.gl_journal_interface_cb').attr('checked', false)
});

$('body').off('change', '#bu_org_id').on('change', '#bu_org_id', function () {
getBUDetails($(this).val());
});

if ($('#bu_org_id').val() && (!$('#prj_revenue_header_id').val()) && ($('#bu_org_id').attr('disabled') !== 'disabled')) {
getBUDetails($('#bu_org_id').val());
}

});
135 changes: 68 additions & 67 deletions inoerp/modules/prj/revenue/revenue_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,48 +7,69 @@
* @source code https://github.com/inoerp/inoERP
-->

<div id ="form_header"><span class="heading"><?php echo gettext('Project Revenue') ?></span>
<div id ="form_header"><span class="heading"><?php
$f = new inoform();
echo gettext('Project Revenue')
?></span>
<form method="post" id="prj_revenue_header" name="prj_revenue_header">
<div id="tabsHeader">
<ul class="tabMain">
<li><a href="#tabsHeader-1"><?php echo gettext('Basic Info') ?></a></li>
<li><a href="#tabsHeader-2"><?php echo gettext('References') ?></a></li>
<li><a href="#tabsHeader-3"><?php echo gettext('Note') ?></a></li>
<li><a href="#tabsHeader-4"><?php echo gettext('Attachments') ?></a></li>
<li><a href="#tabsHeader-5"><?php echo gettext('Actions') ?></a></li>
<li><a href="#tabsHeader-2"><?php echo gettext('Finance') ?></a></li>
<li><a href="#tabsHeader-3"><?php echo gettext('References') ?></a></li>
<li><a href="#tabsHeader-4"><?php echo gettext('Note') ?></a></li>
<li><a href="#tabsHeader-5"><?php echo gettext('Attachments') ?></a></li>
<li><a href="#tabsHeader-6"><?php echo gettext('Actions') ?></a></li>
</ul>
<div class="tabContainer">
<div id="tabsHeader-1" class="tabContent">
<ul class="column header_field">
<li><?php $f->l_text_field_dr_withSearch('prj_revenue_header_id') ?>
<a name="show" href="form.php?class_name=prj_revenue_header&<?php echo "mode=$mode"; ?>" class="show document_id prj_revenue_header_id"><i class="fa fa-refresh"></i></a>
</li>
<li><?php $f->l_text_field_d('revenue_number', 'primary_column2'); ?></li>
<li><?php $f->l_select_field_from_object('bu_org_id', org::find_all_business(), 'org_id', 'org', $$class->bu_org_id, 'bu_org_id', '', 1, $readonly1); ?> </li>
<li><?php
$f->val_field_wid2m('project_number', 'prj_project_header', 'project_number', '', 'select project_number');
$f->l_val_field_d('project_number', 'prj_project_header', 'project_number', '', 'select project_number');
echo $f->hidden_field_withCLass('prj_project_header_id', $$class_second->prj_project_header_id, 'popup_value');
echo $f->hidden_field_withCLass('approval_status', 'APPROVED', 'popup_value');
?><i class="generic select_project_number select_popup clickable fa fa-search" data-class_name="prj_project_header"></i></li>
<li><?php $f->l_text_field_d('revenue_class'); ?></li>
<li><?php $f->l_text_field_d('description'); ?></li>
<li><?php $f->l_date_fieldAnyDay('effective_to', $$class->effective_to); ?></li>
<li><?php $f->l_text_field_dr('status'); ?></li>
<li><?php $f->l_text_field_dr('revenue_status'); ?></li>
<li><?php $f->l_text_field_dr('transfer_status'); ?></li>

</ul>
</div>
<div id="tabsHeader-2" class="tabContent">
<ul class="column header_field">
<li><?php $f->l_ac_field_d('unearned_coa_id'); ?></li>
<li><?php $f->l_ac_field_d('unbilled_coa_id'); ?></li>
<li><?php $f->l_ac_field_d('revenue_coa_id'); ?></li>
<li><?php $f->l_select_field_from_object('doc_currency', option_header::currencies(), 'option_line_code', 'option_line_code', $$class->doc_currency, 'doc_currency', '', 1, $readonly); ?></li>
<li><?php $f->l_select_field_from_object('ledger_currency', option_header::currencies(), 'option_line_code', 'option_line_code', $$class->currency, 'currency', 'currency always_readonly', 1, 1); ?></li>
<li><?php $f->l_select_field_from_object('exchange_rate_type', gl_currency_conversion::currency_conversion_type(), 'option_line_code', 'option_line_code', $$class->exchange_rate_type, 'exchange_rate_type', '', 1, $readonly); ?></li>
<li><?php $f->l_number_field('exchange_rate', $$class->exchange_rate, '', 'exchange_rate'); ?> </li>
<li><?php $f->l_text_field_dr('unearned_amount'); ?></li>
<li><?php $f->l_text_field_dr('unbilled_amount'); ?></li>
<li><?php $f->l_text_field_dr('revenue_amount'); ?></li>
</ul>
</div>
<div id="tabsHeader-3" class="tabContent">
<ul class="column header_field">
<li><?php $f->l_text_field_dr('gl_journal_header_id', 'always_readonly'); ?></li>
<li><?php $f->l_text_field_dr('rejection_reason', 'always_readonly'); ?></li>
<li><?php $f->l_text_field_dr('reference_type'); ?></li>
<li><?php $f->l_text_field_dr('reference_key_name'); ?></li>
<li><?php $f->l_text_field_dr('reference_key_value'); ?></li>
<li><?php $f->l_text_field_dr('submitted_by_user_id'); ?></li>
<li><?php $f->l_text_field_dr('submitted_on'); ?></li>
<li><?php $f->l_date_fieldAnyDay('release_date', $$class->release_date); ?></li>
<li><?php $f->l_date_fieldAnyDay('transfer_date', $$class->transfer_date); ?></li>
</ul>
</div>
<div id="tabsHeader-3" class="tabContent">
<div id="tabsHeader-4" class="tabContent">
<div>
<div id="comments">
<div id="comment_list">
<?php echo!(empty($comments)) ? $comments : ""; ?>
<?php echo!(empty($comments)) ? $comments : ""; ?>
</div>
<div id ="display_comment_form">
<?php
Expand All @@ -61,13 +82,13 @@
</div>
</div>
</div>
<div id="tabsHeader-4" class="tabContent">
<div id="tabsHeader-5" class="tabContent">
<div> <?php echo ino_attachement($file) ?> </div>
</div>
<div id="tabsHeader-5" class="tabContent">
<div id="tabsHeader-6" class="tabContent">
<ul class="column header_field">
<li id="document_status"><label><?php echo gettext('Action') ?></label>
<?php echo $f->select_field_from_array('action', $$class->action_a, '', 'action'); ?>
<?php echo $f->select_field_from_array('action', $$class->action_a, '', 'action'); ?>
</li>
</ul>
</div>
Expand All @@ -76,12 +97,12 @@
</form>
</div>

<div id="form_line" class="form_line"><span class="heading"><?php echo gettext('revenue Lines') ?></span>
<div id="form_line" class="form_line"><span class="heading"><?php echo gettext('Revenue Lines') ?></span>
<form action="" method="post" id="prj_revenue_line" name="prj_revenue_line">
<div id="tabsLine">
<ul class="tabMain">
<li><a href="#tabsLine-1"><?php echo gettext('Basic') ?></a></li>
<li><a href="#tabsLine-2"><?php echo gettext('Basic-2') ?></a></li>
<li><a href="#tabsLine-2"><?php echo gettext('Reference') ?></a></li>
</ul>
<div class="tabContainer">
<div id="tabsLine-1" class="tabContent">
Expand All @@ -90,24 +111,21 @@
<tr>
<th><?php echo gettext('Action') ?></th>
<th><?php echo gettext('Line Id') ?></th>
<th><?php echo gettext('Type') ?></th>
<th><?php echo gettext('Org') ?></th>
<th><?php echo gettext('Employee') ?></th>
<th><?php echo gettext('Job') ?></th>
<th><?php echo gettext('Seq') ?>#</th>
<th><?php echo gettext('Line') # ?></th>
<th><?php echo gettext('Revenue Category') ?></th>
<th><?php echo gettext('Revenue Source') ?></th>
<th><?php echo gettext('Description') ?></th>
<th><?php echo gettext('Date') ?></th>
<th><?php echo gettext('Project') ?></th>
<th><?php echo gettext('Task') ?></th>
<th><?php echo gettext('UOM') ?></th>
<th><?php echo gettext('Quantity') ?></th>
<th><?php echo gettext('Rate') ?></th>
<th><?php echo gettext('Amount') ?></th>
<th><?php echo gettext('Release Date') ?></th>
<th><?php echo gettext('Trasnfer Date') ?></th>

</tr>
</thead>
<tbody class="form_data_line_tbody">
<?php
$count = 0;
foreach ($prj_revenue_line_object as $prj_revenue_line) {
$$class_second->employee_name = !empty($$class_second->hr_employee_id) ? hr_employee_v::find_by_id($$class_second->hr_employee_id)->position_name : '';
$$class_second->project_number = !empty($$class_second->prj_project_header_id) ? prj_project_header::find_by_id($$class_second->prj_project_header_id)->project_number : '';
$$class_second->task_number = !empty($$class_second->prj_project_line_id) ? prj_project_line::find_by_id($$class_second->prj_project_line_id)->task_number : '';
?>
Expand All @@ -118,28 +136,15 @@
?>
</td>
<td><?php $f->text_field_d2sr('prj_revenue_line_id', 'line_id always_readonly'); ?></td>
<td><?php echo $f->select_field_from_object('prj_revenue_type_header_id', prj_revenue_type_header::find_all(), 'prj_revenue_type_header_id', 'revenue_type', $$class_second->prj_revenue_type_header_id, '', '', 1); ?> </td>
<td><?php echo $f->select_field_from_object('org_id', org::find_all(), 'org_id', 'org', $$class_second->org_id); ?> </td>
<td><?php
$f->val_field_wid2('employee_name', 'hr_employee_v', 'employee_name', '', 'select employee resource_type_control');
echo $f->hidden_field_withCLass('hr_employee_id', $$class_second->hr_employee_id, 'resource_type_control employee hr_employee_id');
?><i class="select_employee_name select_popup clickable fa fa-search"></i></td>
<td><?php echo $f->select_field_from_object('job_id', hr_job::find_all(), 'hr_job_id', 'job_name', $$class_second->job_id); ?></td>
<td><?php $f->text_field_d2sr('line_number', 'lines_number always_readonly'); ?></td>
<td><?php $f->seq_field_d($count) ?></td>
<td><?php $f->text_field_d2('revenue_category'); ?></td>
<td><?php $f->text_field_d2('revenue_source'); ?></td>
<td><?php $f->text_field_d2('description'); ?></td>
<td><?php echo $f->date_fieldAnyDay('revenue_date', $$class_second->revenue_date); ?></td>
<td><?php
$f->val_field_wid2m('project_number', 'prj_project_header', 'project_number', '', 'select project_number');
echo $f->hidden_field_withCLass('prj_project_header_id', $$class_second->prj_project_header_id, 'popup_value');
echo $f->hidden_field_withCLass('approval_status', 'APPROVED', 'popup_value');
?><i class="generic select_project_number select_popup clickable fa fa-search" data-class_name="prj_project_header"></i></td>
<td><?php
$f->val_field_wid2m('task_number', 'prj_project_all_lowesttask_v', 'task_number', 'prj_project_header_id', 'select project_task_number');
echo $f->hidden_field('prj_project_line_id', $$class_second->prj_project_line_id);
echo $f->hidden_field_withCLass('approval_status', 'APPROVED', 'popup_value');
?><i class="generic select_project_task_number select_popup clickable fa fa-search" data-class_name="prj_project_all_lowesttask_v"></i></td>
<td><?php echo $f->select_field_from_object('uom_id', uom::find_all(), 'uom_id', 'uom_name', $$class_second->uom_id, '', 'small'); ?></td>
<td><?php $f->text_field_wid2s('quantity'); ?></td>
<td><?php $f->text_field_wid2s('rate'); ?></td>
<td><?php $f->text_field_d2('amount'); ?></td>
<td><?php echo $f->date_fieldAnyDay('release_date', $$class_second->release_date); ?></td>
<td><?php echo $f->date_fieldAnyDay('transfer_date', $$class_second->transfer_date); ?></td>

</tr>
<?php
$count = $count + 1;
Expand All @@ -152,15 +157,14 @@
<table class="form_line_data_table">
<thead>
<tr>
<th><?php echo gettext('Seq') ?>#</th>
<th><?php echo gettext('Line Id') ?></th>
<th><?php echo gettext('Line Amount') ?></th>
<th><?php echo gettext('Status') ?></th>
<th><?php echo gettext('Debit Account') ?></th>
<th><?php echo gettext('Credit Account') ?></th>
<th><?php echo gettext('Reject Reason') ?></th>
<th><?php echo gettext('Document Number') ?></th>
<th><?php echo gettext('Reference Type') ?></th>
<th><?php echo gettext('Reference Key') ?></th>
<th><?php echo gettext('Reference Value') ?></th>
<th><?php echo gettext('Journal Header Id') ?></th>
<th><?php echo gettext('Journal Interface Id') ?></th>
<th><?php echo gettext('Burden Amount') ?></th>
<th><?php echo gettext('Burden Details') ?></th>
</tr>
</thead>
<tbody class="form_data_line_tbody">
Expand All @@ -169,16 +173,13 @@
foreach ($prj_revenue_line_object as $prj_revenue_line) {
?>
<tr class="prj_revenue_line<?php echo $count ?>">
<td><?php echo $$class_second->prj_revenue_line_id ?></td>
<td><?php $f->text_field_wid2sr('line_amount'); ?></td>
<td><?php echo $f->select_field_from_array('status2', prj_revenue_line::$status_a, $$class_second->status, '', 'medium', '', 1, 1); ?> </td>
<td><?php $f->ac_field_wid2('debit_ac_id'); ?></td>
<td><?php $f->ac_field_wid2('credit_ac_id'); ?></td>
<td><?php $f->text_field_wid2r('gl_journal_header_id'); ?></td>
<td><?php echo $f->checkBox_field('gl_journal_interface_cb', $$class_second->gl_journal_interface_cb, '', 'always_readonly', 1); ?></td>
<td><?php $f->text_field_wid2r('burden_amount'); ?></td>
<td><a role="button" target="_blank" class="btn btn-sm btn-default dont_copy" href="search.php?class_name=prj_burden_revenue_v&amp;show_block=1&amp;prj_revenue_line_id=<?php echo $$class_second->prj_revenue_line_id; ?>"><?php echo gettext('View') ?></a></td>
</tr>
<td><?php $f->seq_field_d($count) ?></td>
<td><?php $f->text_field_d2('rejection_reason'); ?></td>
<td><?php $f->text_field_d2('document_number'); ?></td>
<td><?php $f->text_field_d2('reference_type'); ?></td>
<td><?php $f->text_field_d2('reference_key_name'); ?></td>
<td><?php $f->text_field_d2('reference_key_value'); ?></td>
<td><?php $f->text_field_d2('gl_journal_header_id'); ?></td> </tr>
<?php
$count = $count + 1;
}
Expand Down
6 changes: 4 additions & 2 deletions inoerp/robots.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
User-agent: *
Disallow: /
# Directories
Disallow: /includes/
Disallow: /modules/
Disallow: /extensions/

0 comments on commit ba49060

Please sign in to comment.