[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[2588] trunk



Revision: 2588
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2588&view=rev
Author:   einhverfr
Date:     2009-05-08 15:48:32 +0000 (Fri, 08 May 2009)

Log Message:
-----------
Payment type handling complete

Modified Paths:
--------------
    trunk/LedgerSMB/DBObject/Payment.pm
    trunk/UI/payments/payments_detail.html
    trunk/UI/payments/payments_filter.html

Modified: trunk/LedgerSMB/DBObject/Payment.pm
===================================================================
--- trunk/LedgerSMB/DBObject/Payment.pm	2009-05-06 18:41:38 UTC (rev 2587)
+++ trunk/LedgerSMB/DBObject/Payment.pm	2009-05-08 15:48:32 UTC (rev 2588)
@@ -87,8 +87,24 @@
    @{$self->{payment_types}} = $self->exec_method(
 		funcname => 'payment_type__list'
     );
+    
 
+    if($self->{payment_type_id})
+    {
+       @{$self->{payment_type_label_id}} =$self->exec_method(
+		funcname => 'payment_type__get_label'  );
+       
+       $self->{payment_type_return_id}=$self->{payment_type_label_id}->[0]->{id};
+     
+       $self->{payment_type_return_label}=$self->{payment_type_label_id}->[0]->{label};
 
+       #print STDERR qq|______payment type id= $self->{payment_type_label_id}->[0]->{id} and label= $self->{payment_type_label_id}->[0]->{label}|;
+ 
+       #print STDERR qq|______actual payment type id= $self->{payment_type_return_id} and label= $self->{payment_type_return_label}|;
+
+    }
+
+
     @{$self->{debt_accounts}} = $self->exec_method(
 		funcname => 'chart_get_ar_ap');
     @{$self->{cash_accounts}} = $self->exec_method(

Modified: trunk/UI/payments/payments_detail.html
===================================================================
--- trunk/UI/payments/payments_detail.html	2009-05-06 18:41:38 UTC (rev 2587)
+++ trunk/UI/payments/payments_detail.html	2009-05-08 15:48:32 UTC (rev 2588)
@@ -33,6 +33,21 @@
 	value = account_class
 
  } ?>
+
+
+
+
+<?lsmb INCLUDE input element_data = {
+	type = "hidden"
+	name = "payment_type_id"
+	value = payment_type_id
+
+ } ?>
+
+
+
+
+
  <?lsmb INCLUDE input element_data = {
 	type = "hidden"
 	name = "department_id"
@@ -148,6 +163,14 @@
 	<?lsmb END # foreach b ?></span>
     </div>
     <?lsmb END # if business ?>
+
+	<div class="payment_type" id="payment_type_label_div">        
+
+	<label for="filter_type_label"><?lsmb text('Payment Type :') ?></label>
+		<span id="filter_type_label"><?lsmb payment_type_return_label ?> </span>
+	</div>
+
+
     <div class="info" id="cash_account_div">
 	<?lsmb INCLUDE input element_data = {
 		type = "hidden"

Modified: trunk/UI/payments/payments_filter.html
===================================================================
--- trunk/UI/payments/payments_filter.html	2009-05-06 18:41:38 UTC (rev 2587)
+++ trunk/UI/payments/payments_filter.html	2009-05-08 15:48:32 UTC (rev 2588)
@@ -131,14 +131,21 @@
 	} ?> 
 
 <?lsmb IF payment_types ?>
+
 <div id = "payments-filter-payment_types" class="inputpayment">
-  <label for="payment_types"><?lsmb text('Payment Type') ?></label>
-  <select name="payment_type_id" id="payment_types">
-  <?lsmb FOREACH p = payment_types ?>
-  <option value="<?lsmb p.id ?>"><?lsmb p.label ?></option>
-  <?lsmb END ?>
-  </select>
+  
+ <?lsmb PROCESS select element_data = {
+		name = "payment_type_id"
+		default_values = []
+		options = payment_types
+		value_attr = "id"
+		text_attr = "label"
+		label = text('Payment Type:') 
+	} ?> 
+
+
 </div>
+
 <?lsmb END ?>
 
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.