mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-13 11:28:26 -04:00
Code clean up, fix for not being able to delete payment types with spaces in the name.
Updated to version 2.0_RC8. Tom git-svn-id: svn+ssh://jekkos@svn.code.sf.net/p/opensourcepos/code/@54 c3eb156b-1dc0-44e1-88ae-e38439141b53
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
|
||||
|
|
||||
*/
|
||||
$config['application_version'] = '2.0_RC7';
|
||||
$config['application_version'] = '2.0_RC8';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -100,9 +100,9 @@ class Sales extends Secure_area
|
||||
}
|
||||
|
||||
//Alain Multiple Payments
|
||||
function delete_payment($payment_id)
|
||||
function delete_payment( $payment_id )
|
||||
{
|
||||
$this->sale_lib->delete_payment($payment_id);
|
||||
$this->sale_lib->delete_payment( $payment_id );
|
||||
$this->_reload();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ class Sale_lib
|
||||
//Alain Multiple Payments
|
||||
function get_payments()
|
||||
{
|
||||
if(!$this->CI->session->userdata('payments'))
|
||||
$this->set_payments(array());
|
||||
if( !$this->CI->session->userdata( 'payments' ) )
|
||||
$this->set_payments( array( ) );
|
||||
|
||||
return $this->CI->session->userdata('payments');
|
||||
}
|
||||
@@ -107,11 +107,11 @@ class Sale_lib
|
||||
}
|
||||
|
||||
//Alain Multiple Payments
|
||||
function delete_payment($payment_id)
|
||||
function delete_payment( $payment_id )
|
||||
{
|
||||
$payments=$this->get_payments();
|
||||
unset($payments[$payment_id]);
|
||||
$this->set_payments($payments);
|
||||
$payments = $this->get_payments();
|
||||
unset( $payments[urldecode( $payment_id )] );
|
||||
$this->set_payments( $payments );
|
||||
}
|
||||
|
||||
//Alain Multiple Payments
|
||||
|
||||
@@ -292,15 +292,15 @@ else
|
||||
<?php echo $this->lang->line('sales_payment').': ';?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo form_dropdown('payment_type',$payment_options,array(), 'id="payment_types"');?>
|
||||
<?php echo form_dropdown( 'payment_type', $payment_options, array(), 'id="payment_types"' ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span id="amount_tendered_label"><?php echo $this->lang->line('sales_amount_tendered').': ';?></span>
|
||||
<span id="amount_tendered_label"><?php echo $this->lang->line( 'sales_amount_tendered' ).': '; ?></span>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo form_input(array('name'=>'amount_tendered','id'=>'amount_tendered','value'=>to_currency_no_money($amount_due),'size'=>'10')); ?>
|
||||
<?php echo form_input( array( 'name'=>'amount_tendered', 'id'=>'amount_tendered', 'value'=>to_currency_no_money($amount_due), 'size'=>'10' ) ); ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -332,11 +332,10 @@ else
|
||||
echo form_open("sales/edit_payment/$payment_id",array('id'=>'edit_payment_form'.$payment_id));
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo anchor("sales/delete_payment/$payment_id",'['.$this->lang->line('common_delete').']');?></td>
|
||||
<td><?php echo anchor( "sales/delete_payment/$payment_id", '['.$this->lang->line('common_delete').']' ); ?></td>
|
||||
|
||||
|
||||
<td><?php echo $payment['payment_type'] ?> </td>
|
||||
<td style="text-align:right;"><?php echo to_currency($payment['payment_amount']) ?> </td>
|
||||
<td><?php echo $payment['payment_type']; ?></td>
|
||||
<td style="text-align:right;"><?php echo to_currency( $payment['payment_amount'] ); ?></td>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user