Changes in invoice view screen and pdf

This commit is contained in:
saravanakumar_kandasami 2017-09-11 16:39:53 +05:30
parent c940cb1a2c
commit 182d119843
6 changed files with 155 additions and 188 deletions

View File

@ -3,7 +3,7 @@ $lang = array(
'account_information' => 'Account Information',
'active' => 'Active',
'active_client' => 'Active',
'add_client' => 'Add Customer',
'add_client' => 'Add Client',
'add_family' => 'Add Family',
'add_files' => 'Add Files...',
'add_invoice_tax' => 'Add Invoice Tax',
@ -27,8 +27,8 @@ $lang = array(
'approve' => 'Approve',
'approve_this_quote' => 'Approve This Quote',
'approved' => 'Approved',
'assign_client' => 'Assign Customer',
'assigned_clients' => 'Assigned Customers',
'assign_client' => 'Assign Client',
'assigned_clients' => 'Assigned Clients',
'attachments' => 'Attachments',
'automatic_email_on_recur' => 'Automatically Email recurring invoices',
'balance' => 'Balance',
@ -41,7 +41,7 @@ $lang = array(
'boolean' => 'Boolean',
'bill_to' => 'Bill To',
'body' => 'Body',
'change_client' => 'Change Customer',
'change_client' => 'Change Client',
'calculate_discounts' => 'Calculate Discounts',
'calendar_week_1' => '1 Week',
'calendar_week_2' => '2 Weeks',
@ -63,14 +63,14 @@ $lang = array(
'checking_for_updates' => 'Checking for Updates...',
'city' => 'City',
'cldr' => 'en',
'client' => 'Ccustomer',
'client_access' => 'Customer Access',
'client_already_exists' => 'Customer already exists!',
'client_form' => 'Customer Form',
'client_name' => 'Customer Name',
'client_surname' => 'Customer Surname',
'client_surname_optional' => 'Customer Surname (Optional)',
'clients' => 'Customers',
'client' => 'Client',
'client_access' => 'Client Access',
'client_already_exists' => 'Client already exists!',
'client_form' => 'Client Form',
'client_name' => 'Client Name',
'client_surname' => 'Client Surname',
'client_surname_optional' => 'Client Surname (Optional)',
'clients' => 'Clients',
'close' => 'Close',
'closed' => 'Closed',
'column' => 'Column',
@ -132,8 +132,8 @@ $lang = array(
'default_terms' => 'Default Terms',
'delete' => 'Delete',
'delete_attachment_warning' => 'Are you sure you wish to delete this attachment?',
'delete_client' => 'Delete Customer',
'delete_client_warning' => 'If you delete this customer you will also delete any invoices, quotes and payments related to this customer. Are you sure you want to permanently delete this client?',
'delete_client' => 'Delete Client',
'delete_client_warning' => 'If you delete this client you will also delete any invoices, quotes and payments related to this client. Are you sure you want to permanently delete this client?',
'delete_invoice' => 'Delete Invoice',
'delete_invoice_warning' => 'If you delete this invoice you will not be able to recover it later. Are you sure you want to permanently delete this invoice?',
'delete_quote' => 'Delete Quote',
@ -171,7 +171,7 @@ $lang = array(
'email_template_overdue' => 'Overdue Email Template',
'email_template_paid' => 'Paid Email Template',
'email_template_tags' => 'Email Template Tags',
'email_template_tags_instructions' => 'Template tags can be used to add dynamic information like the customer name or an invoice number to the email template. Click on the Body textfield and then select a tag from the drop down. It will be automatically inserted into the textfield.',
'email_template_tags_instructions' => 'Template tags can be used to add dynamic information like the client name or an invoice number to the email template. Click on the Body textfield and then select a tag from the drop down. It will be automatically inserted into the textfield.',
'email_templates' => 'Email Templates',
'enabled' => 'Enabled',
'enable_debug_mode' => 'Enable the Debug Mode',
@ -193,7 +193,7 @@ $lang = array(
'fax_abbr' => 'F',
'fax_number' => 'Fax Number',
'field' => 'Field',
'filter_clients' => 'Filter Customers',
'filter_clients' => 'Filter Clients',
'filter_invoices' => 'Filter Invoices',
'filter_payments' => 'Filter Payments',
'filter_quotes' => 'Filter Quotes',
@ -217,7 +217,7 @@ $lang = array(
'id' => 'ID',
'identifier_format' => 'Identifier formatting',
'identifier_format_template_tags' => 'Template tags for the Identifier',
'identifier_format_template_tags_instructions' => 'Template tags can be used to add dynamic information like the customer name or an invoice number to the email template. Click on the <b>Identifier formatting</b> field and then select a tag from the drop down. It will be automatically inserted into the textfield.',
'identifier_format_template_tags_instructions' => 'Template tags can be used to add dynamic information like the client name or an invoice number to the email template. Click on the <b>Identifier formatting</b> field and then select a tag from the drop down. It will be automatically inserted into the textfield.',
'import' => 'Import',
'import_data' => 'Import Data',
'import_from_csv' => 'Import from CSV',
@ -366,7 +366,7 @@ $lang = array(
'product_families' => 'Product families',
'product_name' => 'Product name',
'product_price' => 'Price',
'product_sku' => 'HSN',
'product_sku' => 'SKU',
'product_tariff' => 'Tariff',
'product_units' => 'Product Units',
'product_unit' => 'Product Unit',
@ -392,8 +392,8 @@ $lang = array(
'quote_password' => 'Quote PDF password (optional)',
'quote_pre_password' => 'Quote standard PDF password (optional)',
'quote_rejected' => 'This quote has been rejected',
'quote_status_email_body' => 'The customer %1$s has %2$s the quote %3$s.' . "\n\n" . 'Link to Quote: %4$s',
'quote_status_email_subject' => 'Customer %1$s %2$s quote %3$s',
'quote_status_email_body' => 'The client %1$s has %2$s the quote %3$s.' . "\n\n" . 'Link to Quote: %4$s',
'quote_status_email_subject' => 'Client %1$s %2$s quote %3$s',
'quote_tax' => 'Quote Tax',
'quote_template' => 'Quote Template',
'quote_templates' => 'Quote Templates',
@ -402,7 +402,7 @@ $lang = array(
'quotes_expire_after' => 'Quotes Expire After (Days)',
'quotes_requiring_approval' => 'Quotes Requiring Approval',
'read_only' => 'Read only',
'recent_clients' => 'Recent Customers',
'recent_clients' => 'Recent Clients',
'recent_invoices' => 'Recent Invoices',
'recent_payments' => 'Recent Payments',
'recent_quotes' => 'Recent Quotes',
@ -423,7 +423,7 @@ $lang = array(
'run_report' => 'Run Report',
'search_product' => 'Search product',
'sales' => 'Sales',
'sales_by_client' => 'Sales by Customer',
'sales_by_client' => 'Sales by Client',
'sales_by_date' => 'Sales by Date',
'sales_with_tax' => 'Sales with Tax',
'save' => 'Save',
@ -433,7 +433,7 @@ $lang = array(
'select_payment_method' => 'Select the Payment Method',
'send' => 'Send',
'send_email' => 'Send Email',
'sent' => 'Printed',
'sent' => 'Sent',
'set_new_password' => 'Set a new password',
'settings' => 'Settings',
'settings_successfully_saved' => 'Settings successfully saved',
@ -552,8 +552,8 @@ $lang = array(
'version_history' => 'Version History',
'view' => 'View',
'view_all' => 'View All',
'view_client' => 'View Customer',
'view_clients' => 'View Customers',
'view_client' => 'View Client',
'view_clients' => 'View Clients',
'view_invoices' => 'View Invoices',
'view_payments' => 'View Payments',
'view_products' => 'View products',
@ -589,8 +589,8 @@ $lang = array(
'new_task' => 'New task',
'select_project' => 'Select project',
'task_finish_date' => 'Finish date',
'no_client' => 'No customer',
'alert_no_client_assigned' => 'No customer assigned to this project.',
'no_client' => 'No client',
'alert_no_client_assigned' => 'No client assigned to this project.',
'not_started' => 'Not started',
'in_progress' => 'In progress',
'complete' => 'Complete',

View File

@ -169,8 +169,6 @@ class Invoices extends Admin_Controller
echo $ClientID; */
$PaymentDays = $this->mdl_invoices->GetPaymentDays($invoice_id,$ClientID,'51');
$GetSecondaryAddress = $this->mdl_invoices->GetSecondaryAddress($ClientID);
$getSecondayAddressSelected = $this->mdl_invoices->getSecondayAddressSelected($invoice_id,'44');
// print_r($GetSecondaryAddress);
$custom_fields = $this->mdl_custom_fields->by_table('ip_invoice_custom')->get()->result();
@ -186,22 +184,10 @@ class Invoices extends Admin_Controller
foreach ($fields as $fvalue) {
if ($fvalue->invoice_custom_fieldid == $cfield->custom_field_id) {
// TODO: Hackish, may need a better optimization
//echo $fvalue->invoice_custom_fieldid ;
if ($fvalue->invoice_custom_fieldid == "7" && $fvalue->invoice_custom_fieldvalue == '')
{
echo 'Mode'. $fvalue->invoice_custom_fieldvalue;
$this->mdl_invoices->set_form_value(
'custom[' . $cfield->custom_field_id . ']',
'By Road'
);
}
else
{
$this->mdl_invoices->set_form_value(
'custom[' . $cfield->custom_field_id . ']',
$fvalue->invoice_custom_fieldvalue
);
}
break;
}
}
@ -212,7 +198,6 @@ class Invoices extends Admin_Controller
'invoice' => $invoice,
'Duedate' =>$PaymentDays,
'GetSecondary' =>$GetSecondaryAddress,
'getSecondaySelected' => $getSecondayAddressSelected,
'items' => $this->mdl_items->where('invoice_id', $invoice_id)->get()->result(),
'invoice_id' => $invoice_id,
'tax_rates' => $this->mdl_tax_rates->get()->result(),

View File

@ -62,23 +62,13 @@ class Mdl_Invoices extends Response_Model
{
$subQuery = "select group_concat(client_custom_fieldvalue separator '<br>') as Secondary from ip_client_custom where
client_id =? and client_custom_fieldid in (12,45,46,47,48,50,49)";
client_id =? and client_custom_fieldid in (12,45,46,47)";
$query = $this->db->query($subQuery,array($ClientID));
return $query->result();
}
public function getSecondayAddressSelected($InvID,$client_custom_fieldid)
{
$subQuery = "select invoice_custom_fieldvalue as secondary from ip_invoice_custom where invoice_id=? and
invoice_custom_fieldid=?";
$query = $this->db->query($subQuery,array($InvID,$client_custom_fieldid));
return $query->result();
}
public function default_select()
{

View File

@ -1,59 +1,82 @@
<div class="table-responsive">
<table id="item_table" class="items table table-condensed table-bordered no-margin">
<thead style="display: none">
<thead>
<tr>
<th></th>
<th></th>
<th><?php _trans('item'); ?></th>
<th><?php _trans('description'); ?></th>
<th><?php _trans('UOM'); ?></th>
<th><?php _trans('quantity'); ?></th>
<th><?php _trans('price'); ?></th>
<th><?php _trans('SGST'); ?></th>
<th><?php _trans('Item Discount'); ?></th>
<th><?php _trans('CGST'); ?></th>
<th><?php _trans('IGST'); ?></th>
<th><?php _trans('subtotal'); ?></th>
<th><?php _trans('tax'); ?></th>
<th><?php _trans('total'); ?></th>
<th><?php _trans('SGST'); ?></th>
<th><?php _trans('IGST'); ?></th>
<th></th>
</tr>
</thead>
<tbody id="new_row" style="display: none;">
<tr>
<td rowspan="2" class="td-icon"><i class="fa fa-arrows cursor-move"></i></td>
<td class="td-icon"><i class="fa fa-arrows cursor-move"></i></td>
<td class="td-text">
<input type="hidden" name="invoice_id" value="<?php echo $invoice_id; ?>">
<input type="hidden" name="item_id" value="">
<input type="hidden" name="item_product_id" value="">
<input type="hidden" name="item_task_id" class="item-task-id" value="">
<div class="input-group">
<span class="input-group-addon"><?php _trans('item'); ?></span>
<div class="input-group">
<input type="text" name="item_name" class="input-sm form-control" value="">
</div>
</td>
<?php if ($invoice->sumex_id == ""): ?>
<td class="td-textarea">
<div class="input-group">
<textarea name="item_description" class="input-sm form-control"></textarea>
</div>
</td>
<?php else: ?>
<td class="td-date">
<div class="input-group">
<input type="text" name="item_date" class="input-sm form-control datepicker"
value="<?php echo format_date(@$item->item_date); ?>"
<?php if ($invoice->is_read_only == 1) {
echo 'disabled="disabled"';
} ?>>
</div>
</td>
<?php endif; ?>
<td class="td-amount">
<div class="input-group">
<select name="item_product_unit_id" class="form-control input-sm">
<option value="0"><?php _trans('none'); ?></option>
<?php foreach ($units as $unit) { ?>
<option value="<?php echo $unit->unit_id; ?>">
<?php echo $unit->unit_name . "/" . $unit->unit_name_plrl; ?>
</option>
<?php } ?>
</select>
</div>
</td>
<td class="td-amount td-quantity">
<div class="input-group">
<span class="input-group-addon"><?php _trans('quantity'); ?></span>
<div class="input-group">
<input type="text" name="item_quantity" class="input-sm form-control amount" value="">
</div>
</td>
<td class="td-amount">
<div class="input-group">
<span class="input-group-addon"><?php _trans('price'); ?></span>
<div class="input-group">
<input type="text" name="item_price" class="input-sm form-control amount" value="">
</div>
</td>
<td class="td-amount">
<div class="input-group">
<span class="input-group-addon"><?php _trans('item_discount'); ?></span>
<div class="input-group">
<input type="text" name="item_discount_amount" class="input-sm form-control amount"
value="" data-toggle="tooltip" data-placement="bottom"
title="<?php echo get_setting('currency_symbol') . ' ' . trans('per_item'); ?>">
</div>
</td>
<td>
<div class="input-group">
<span class="input-group-addon"><?php _trans('CGST'); ?></span>
<div class="input-group">
<select name="Cgst_item_tax_rate_id" class="form-control input-sm">
<option value="0"><?php _trans('none'); ?></option>
<?php foreach ($tax_rates as $tax_rate) { ?>
@ -66,8 +89,7 @@
</div>
</td>
<td>
<div class="input-group">
<span class="input-group-addon"><?php _trans('SGST'); ?></span>
<div class="input-group">
<select name="Sgst_item_tax_rate_id" class="form-control input-sm">
<option value="0"><?php _trans('none'); ?></option>
<?php foreach ($tax_rates as $tax_rate) { ?>
@ -80,8 +102,7 @@
</div>
</td>
<td>
<div class="input-group">
<span class="input-group-addon"><?php _trans('IGST'); ?></span>
<div class="input-group">
<select name="Igst_item_tax_rate_id" class="form-control input-sm">
<option value="0"><?php _trans('none'); ?></option>
<?php foreach ($tax_rates as $tax_rate) { ?>
@ -94,41 +115,9 @@
</div>
</td>
<td class="td-icon text-right td-vert-middle"></td>
</tr>
<tr>
<?php if ($invoice->sumex_id == ""): ?>
<td class="td-textarea">
<div class="input-group">
<span class="input-group-addon"><?php _trans('description'); ?></span>
<textarea name="item_description" class="input-sm form-control"></textarea>
</div>
</td>
<?php else: ?>
<td class="td-date">
<div class="input-group">
<span class="input-group-addon"><?php _trans('date'); ?></span>
<input type="text" name="item_date" class="input-sm form-control datepicker"
value="<?php echo format_date(@$item->item_date); ?>"
<?php if ($invoice->is_read_only == 1) {
echo 'disabled="disabled"';
} ?>>
</div>
</td>
<?php endif; ?>
<td class="td-amount">
<div class="input-group">
<span class="input-group-addon"><?php _trans('product_unit'); ?></span>
<select name="item_product_unit_id" class="form-control input-sm">
<option value="0"><?php _trans('none'); ?></option>
<?php foreach ($units as $unit) { ?>
<option value="<?php echo $unit->unit_id; ?>">
<?php echo $unit->unit_name . "/" . $unit->unit_name_plrl; ?>
</option>
<?php } ?>
</select>
</div>
</td>
<td class="td-amount td-vert-middle">
<!-- <td class="td-amount td-vert-middle">
<span><?php _trans('subtotal'); ?></span><br/>
<span name="subtotal" class="amount"></span>
</td>
@ -143,7 +132,7 @@
<td class="td-amount td-vert-middle">
<span><?php _trans('total'); ?></span><br/>
<span name="item_total" class="amount"></span>
</td>
</td>-->
</tr>
</tbody>
@ -164,17 +153,55 @@
<input type="hidden" name="item_product_id" value="<?php echo $item->item_product_id; ?>">
<div class="input-group">
<span class="input-group-addon"><?php _trans('item'); ?></span>
<!-- <span class="input-group-addon"><?php _trans('item'); ?></span>-->
<input type="text" name="item_name" class="input-sm form-control"
value="<?php _htmlsc($item->item_name); ?>"
<?php if ($invoice->is_read_only == 1) {
echo 'disabled="disabled"';
} ?>>
</div>
</td>
<?php if ($invoice->sumex_id == ""): ?>
<td class="td-textarea">
<div class="input-group">
<!-- <span class="input-group-addon"><?php _trans('description'); ?></span> -->
<textarea name="item_description"
class="input-sm form-control"
<?php if ($invoice->is_read_only == 1) {
echo 'disabled="disabled"';
} ?>><?php echo htmlsc($item->item_description); ?></textarea>
</div>
</td>
<?php else: ?>
<td class="td-date">
<div class="input-group">
<!-- <span class="input-group-addon"><?php _trans('date'); ?></span> -->
<input type="text" name="item_date" class="input-sm form-control datepicker"
value="<?php echo format_date($item->item_date); ?>"
<?php if ($invoice->is_read_only == 1) {
echo 'disabled="disabled"';
} ?>>
</div>
</td>
<?php endif; ?>
<td class="td-amount">
<div class="input-group">
<!-- <span class="input-group-addon"><?php _trans('product_unit'); ?></span> -->
<select name="item_product_unit_id" class="form-control input-sm">
<option value="0"><?php _trans('none'); ?></option>
<?php foreach ($units as $unit) { ?>
<option value="<?php echo $unit->unit_id; ?>"
<?php check_select($item->item_product_unit_id, $unit->unit_id); ?>>
<?php echo htmlsc($unit->unit_name) . "/" . htmlsc($unit->unit_name_plrl); ?>
</option>
<?php } ?>
</select>
</div>
</td>
<td class="td-amount td-quantity">
<div class="input-group">
<span class="input-group-addon"><?php _trans('quantity'); ?></span>
<!-- <span class="input-group-addon"><?php _trans('quantity'); ?></span>-->
<input type="text" name="item_quantity" class="input-sm form-control amount"
value="<?php echo format_amount($item->item_quantity); ?>"
<?php if ($invoice->is_read_only == 1) {
@ -184,7 +211,7 @@
</td>
<td class="td-amount">
<div class="input-group">
<span class="input-group-addon"><?php _trans('price'); ?></span>
<!-- <span class="input-group-addon"><?php _trans('price'); ?></span> -->
<input type="text" name="item_price" class="input-sm form-control amount"
value="<?php echo format_amount($item->item_price); ?>"
<?php if ($invoice->is_read_only == 1) {
@ -194,7 +221,7 @@
</td>
<td class="td-amount">
<div class="input-group">
<span class="input-group-addon"><?php _trans('item_discount'); ?></span>
<!-- <span class="input-group-addon"><?php _trans('item_discount'); ?></span> -->
<input type="text" name="item_discount_amount" class="input-sm form-control amount"
value="<?php echo format_amount($item->item_discount_amount); ?>"
data-toggle="tooltip" data-placement="bottom"
@ -206,7 +233,7 @@
</td>
<td class="td-amount">
<div class="input-group">
<span class="input-group-addon"><?php _trans('CGST'); ?></span>
<!-- <span class="input-group-addon"><?php _trans('CGST'); ?></span> -->
<select name="Cgst_item_tax_rate_id" class="form-control input-sm"
<?php if ($invoice->is_read_only == 1) {
echo 'disabled="disabled"';
@ -223,7 +250,7 @@
</td>
<td class="td-amount">
<div class="input-group">
<span class="input-group-addon"><?php _trans('SGST'); ?></span>
<!-- <span class="input-group-addon"><?php _trans('SGST'); ?></span> -->
<select name="Sgst_item_tax_rate_id" class="form-control input-sm"
<?php if ($invoice->is_read_only == 1) {
echo 'disabled="disabled"';
@ -241,7 +268,7 @@
<td class="td-amount">
<div class="input-group">
<span class="input-group-addon"><?php _trans('IGST'); ?></span>
<!-- <span class="input-group-addon"><?php _trans('IGST'); ?></span> -->
<select name="Igst_item_tax_rate_id" class="form-control input-sm"
<?php if ($invoice->is_read_only == 1) {
echo 'disabled="disabled"';
@ -267,45 +294,8 @@
</td>
</tr>
<tr>
<?php if ($invoice->sumex_id == ""): ?>
<td class="td-textarea">
<div class="input-group">
<span class="input-group-addon"><?php _trans('description'); ?></span>
<textarea name="item_description"
class="input-sm form-control"
<?php if ($invoice->is_read_only == 1) {
echo 'disabled="disabled"';
} ?>><?php echo htmlsc($item->item_description); ?></textarea>
</div>
</td>
<?php else: ?>
<td class="td-date">
<div class="input-group">
<span class="input-group-addon"><?php _trans('date'); ?></span>
<input type="text" name="item_date" class="input-sm form-control datepicker"
value="<?php echo format_date($item->item_date); ?>"
<?php if ($invoice->is_read_only == 1) {
echo 'disabled="disabled"';
} ?>>
</div>
</td>
<?php endif; ?>
<td class="td-amount">
<div class="input-group">
<span class="input-group-addon"><?php _trans('product_unit'); ?></span>
<select name="item_product_unit_id" class="form-control input-sm">
<option value="0"><?php _trans('none'); ?></option>
<?php foreach ($units as $unit) { ?>
<option value="<?php echo $unit->unit_id; ?>"
<?php check_select($item->item_product_unit_id, $unit->unit_id); ?>>
<?php echo htmlsc($unit->unit_name) . "/" . htmlsc($unit->unit_name_plrl); ?>
</option>
<?php } ?>
</select>
</div>
</td>
<!-- <tr>
<td class="td-amount td-vert-middle">
<span><?php _trans('subtotal'); ?></span><br/>
<span name="subtotal" class="amount">
@ -330,7 +320,7 @@
<?php echo format_currency($item->item_total); ?>
</span>
</td>
</tr>
</tr> -->
</tbody>
<?php } ?>
@ -370,7 +360,7 @@
<td><?php _trans('item_tax'); ?></td>
<td class="amount"><?php echo format_currency($invoice->invoice_item_tax_total); ?></td>
</tr>
<tr>
<!--<tr>
<td><?php _trans('invoice_tax'); ?></td>
<td>
<?php if ($invoice_tax_rates) {
@ -387,8 +377,8 @@
echo format_currency('0');
} ?>
</td>
</tr>
<tr>
</tr>-->
<tr style="display:none;">
<td class="td-vert-middle"><?php _trans('discount'); ?></td>
<td class="clearfix">
<div class="discount-field">
@ -414,7 +404,7 @@
</div>
</div>
</td>
</tr>
</tr>
<tr>
<td><?php _trans('total'); ?></td>
<td class="amount"><b><?php echo format_currency($invoice->invoice_total); ?></b></td>
@ -423,11 +413,11 @@
<tr>
<td><?php _trans('paid'); ?></td>
<td class="amount"><b><?php echo format_currency($invoice->invoice_paid); ?></b></td>
</tr>-->
</tr>
<tr>
<td><b><?php _trans('balance'); ?></b></td>
<td class="amount"><b><?php echo format_currency($invoice->invoice_balance); ?></b></td>
</tr>
</tr>-->
</table>
</div>

View File

@ -303,7 +303,7 @@ if ($this->config->item('disable_read_only') == true) {
</div> </div>
<?php if ($custom_fields): ?>
<div class="row">
<div class="row" id='NewAddress' style='display:none'>
<div class="col-xs-12">
<hr>
@ -426,14 +426,7 @@ if ($this->config->item('disable_read_only') == true) {
value="<?php
$Date = $invoice->invoice_date_created;
if(strlen($CustomVal)>0)
{
echo date('d-m-Y', strtotime($Date. '+ '.trim($CustomVal).'days'));
}
else
{
echo date('d-m-Y', strtotime($Date));
}
echo date('d-m-Y', strtotime($Date. '+ '.trim($CustomVal).'days'));
?>"
@ -569,13 +562,22 @@ if ($this->config->item('disable_read_only') == true) {
<?php $this->layout->load_view('upload/dropzone-invoice-scripts'); ?>
<script>
function myFun(a){
if(document.getElementById(a).value=="9"){
document.getElementById("SecondayAddress").style.display="block";
document.getElementById("NewAddress").style.display="none";
}
else if(document.getElementById(a).value=="8"){
document.getElementById("NewAddress").style.display="block";
document.getElementById("SecondayAddress").style.display="none";
}
else{
document.getElementById("SecondayAddress").style.display="none";
document.getElementById("NewAddress").style.display="none";
}
}
</script>

View File

@ -159,7 +159,19 @@ $cv = $this->controller->view_data["custom_values"];
<input type="text" name="user_address_2" id="user_address_2" class="form-control"
value="<?php echo $this->mdl_users->form_value('user_address_2', true); ?>">
</div>
<!-- Custom fields -->
<?php foreach ($custom_fields as $custom_field): ?>
<?php if ($custom_field->custom_field_location != 2) {
continue;
} ?>
<?php
print_field(
$this->mdl_users,
$custom_field,
$cv
);
?>
<?php endforeach; ?>
<div class="form-group">
<label for="user_city">
<?php _trans('city'); ?>
@ -199,19 +211,7 @@ $cv = $this->controller->view_data["custom_values"];
</select>
</div>
<!-- Custom fields -->
<?php foreach ($custom_fields as $custom_field): ?>
<?php if ($custom_field->custom_field_location != 2) {
continue;
} ?>
<?php
print_field(
$this->mdl_users,
$custom_field,
$cv
);
?>
<?php endforeach; ?>
</div>
</div>