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

SF.net SVN: ledger-smb: [1937] trunk/UI/payments



Revision: 1937
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1937&view=rev
Author:   einhverfr
Date:     2007-12-03 01:06:51 -0800 (Mon, 03 Dec 2007)

Log Message:
-----------
Bulk payment template ready for real testing

Modified Paths:
--------------
    trunk/UI/payments/payments_detail.html
    trunk/UI/payments/payments_filter.html

Modified: trunk/UI/payments/payments_detail.html
===================================================================
--- trunk/UI/payments/payments_detail.html	2007-12-03 09:05:01 UTC (rev 1936)
+++ trunk/UI/payments/payments_detail.html	2007-12-03 09:06:51 UTC (rev 1937)
@@ -5,6 +5,8 @@
 			'UI/payments/payments.css'
 		]
 ?>
+<?lsmb BLOCK format_money ?><?lsmb FILTER format('%15.2f') ?><?lsmb number 
+?><?lsmb END # filter ?><?lsmb END # block ?>
  <?lsmb PROCESS elements.html  # Include form elements helper. ?>
 <?lsmb contact_type = (account_class == 1) ? text('Vendor') : text('Customer') 
 ?>
@@ -26,6 +28,11 @@
  } ?>
  <?lsmb INCLUDE input element_data = {
 	type = "hidden"
+	name = "source_start"
+	value = source_start
+ } ?>
+ <?lsmb INCLUDE input element_data = {
+	type = "hidden"
 	name = "approved"
 	value = approved
  } ?>
@@ -36,36 +43,34 @@
  } ?>
  <?lsmb INCLUDE input element_data = {
 	type = "hidden"
-	name = "payable_id"
-	value = payable_id
+	name = "ar_ap_accno"
+	value = ar_ap_accno
+ } ?>	
+ <?lsmb INCLUDE input element_data = {
+	type = "hidden"
+	name = "date_from"
+	value = date_from
  } ?>
  <?lsmb INCLUDE input element_data = {
 	type = "hidden"
+	name = "date_to"
+	value = date_to
+ } ?>
+ <?lsmb INCLUDE input element_data = {
+	type = "hidden"
+	name = "business"
+	value = business
+ } ?>
+ <?lsmb INCLUDE input element_data = {
+	type = "hidden"
 	name = "batch_id"
 	value = batch_id
  } ?>
- <table width=100% id="info_table">
-  <tr valign=top id="info_row">
-   <td width=50% id="info_data">
-    <table>
-     <!-- the department will be shown if it was selected in the first step -->
-     <?lsmb IF department.value  # Only process element if one exists. As in project above ?>
-     <tr id="department-row">
-      <th align="right" nowrap id="department_label_column"><?lsmb  text('Department')  ?>:</th>
-      <td colspan="2" id="department_column">
-       <?lsmb  department ?>
-      </td>
-     </tr>
-     <?lsmb END ?>
-     <tr id="account_row">
-      <th align="right" nowrap id="account_label_column"><?lsmb text('Account') ?></th>
-      <td colspan="2" id="account_column"><?lsmb payable_accno ?>--<?lsmb payable_description ?></td>
-     </tr>
-     <tr id="date_row">
-      <th align="right" nowrap id="date_label_column"><?lsmb text('Date') ?></th>
-      <td colspan="2" id="date_column">
+<div class="container">
+     <div id="date_row">
+      <label for="date_paid"><?lsmb text('Posting Date:') ?></label>
 	<?lsmb IF batch_id ?>
-		<?lsmb date_paid ?>
+		<span id="date_paid"><?lsmb date_paid ?></span>
 	<?lsmb END ?>
 	<?lsmb INCLUDE input element_data= {
 		value = datepaid
@@ -73,12 +78,37 @@
 		size = 20
 		class = (batch_id) ? "hidden" : "date"
 		type = (batch_id) ? "hidden" : "text"
-	} ?> </td>
-     </tr>
+	} ?>
+
+     </div>
+     <div id="date_filter_row">
+	<label for="filter_from"><?lsmb text('Filtering From:') ?></label>
+	<span id="filter_from"><?lsmb date_from ?> </span>
+	<label for="filter_to"><?lsmb text('To:') ?></label>
+	<span id="filter_to"><?lsmb date_to ?> </span>
+     <!-- the department will be shown if it was selected in the first step -->
+     <?lsmb IF department.value  # Only process element if one exists. As in project above ?>
+      <div class="info">
+      <label for="department_info"><?lsmb  text('Department')  ?></label>
+      <span id="department_info">
+       <?lsmb  department ?>
+      </span>
+     </div>
+     <?lsmb END ?>
+     <div class="info" id="account_row">
+      <label for="account_info">
+	<?lsmb text('Account:'); ?> 
+      </label>
+      <span id="account_info"></td>
+	<?lsmb FOREACH a = debt_accounts ?><?lsmb
+		IF a.accno == ar_ap_accno 
+	?><?lsmb a.accno ?>--<?lsmb a.description ?><?lsmb
+		END # If a.accno... ?><?lsmb
+	END # FOREACH a ?>
+      </span>
+     </div>
      <?lsmb  IF defaultcurrency != curr ?>
-      <tr id="exrate_row">
-       <th valig="top" align="right" id="exrate_label_column"><?lsmb text('Exchange Rate') ?>:</th>
-       <td id="exrate_column">
+      <div class="info" id="exrate_row">
          <?lsmb PROCESS input element_data= {
 		label = text('Exchange Rate')
 		type = text
@@ -87,62 +117,106 @@
 		value = exchange_rate
 		size = 20
 	} # ' ?>
-       </td>
-      </tr>
+	</div>
      <?lsmb END ?>
+     <?lsmb IF business ?>
+     <div class="info">
+	<label for="business_info"><?lsmb text('Business:') ?></label>
+	<span id="business_info"><?lsmb FOREACH b = businesses ?>
+		<?lsmb IF b.id == business ?>
+		<?lsmb b.id ?> -- <?lsmb b.description ?>
+		<?lsmb END # if b.id... ?>
+	<?lsmb END # foreach b ?></span>
+    </div>
+    <?lsmb END # if business ?>
+    <table id="payments_table">
+    <tr class="listheading">
+	<th class="account_number"><?lsmb text('Account_number') ?></th>
+	<th class="entity_name"><?lsmb text('Name') ?></th>
+	<th class="invoice"><?lsmb text('Invoice Total') ?></th>
+        <th class="payment"><?lsmb text('Payment') ?></th>
+        <th class="payment"><?lsmb text('Details') ?></th>
+    </tr>
+    <?lsmb rc = 1 ?>
+    <?lsmb FOREACH r = contact_invoices ?>
+    <?lsmb rc = rc + 1; rc = rc % 2 ?>
+    <tr class="listrow<?lsmb rc ?>">
+       <td class="account_number" rowspan="2" ><?lsmb r.account_number ?></td>
+	<td class="entity_name"><?lsmb r.contact_name ?></td>
+	<td class="invoice"><?lsmb r.total_due ?> <?lsmb currency ?></td>
+        <td class="payment">
+		<?lsmb INCLUDE input element_data = {
+		name = "paid_$r.contact_id"
+		value = "some"
+		label = text('Some')
+		checked = ("${paid_$r.contact_id}" == 'some') ? checked : ""
+		type = "radio"
+	 }	?>
+		<?lsmb INCLUDE input element_data = {
+		name = "paid_$r.contact_id"
+		value = "all"
+		label = text('All')
+		checked = ("${paid_$r.contact_id}" != 'some') ? checked : ""
+		type = "radio"
+	 }	?>
+	</td>
+	<td rowspan = 2><?lsmb INCLUDE input element_data = {
+		name = "source_$r.contact_id"
+		value = r.source 
+		type = "text"
+		size = "20" 
+		label = text('Source')
+	} ?></td>
+    </tr>
+    <tr class="listrow<?lsmb rc ?>">
+	<td class="invoice_detail_list" colspan="3">
+	<table id = "invoice_data_table_<?lsmb r.contact_id ?>" width="100%">
+		<tr class="listheading">
+			<th class="invoice_date_list"><?lsmb text('Date') ?>
+			</th>
+			<th class="invoice_list">
+				<?lsmb text('Invoice Number') ?>
+			</th>
+		        <th class="total_due_list"><?lsmb text('Total') ?></th>
+			<th class="paid_list"><?lsmb text('Paid') ?></th>
+			<th class="net_due_list"><?lsmb text('Net Due') ?> </th>
+			<th class="to_pay_list"><?lsmb text('To Pay') ?></th>
+		</tr>
+		<?lsmb FOREACH i = r.invoices ?>
+		<tr>
+			<td class="invoice_date_list">&nbsp;<?lsmb i.2 ?></td>
+			<td class="invoice_list">&nbsp;<?lsmb i.1 ?></td>
+		        <td class="total_due_list">&nbsp;<?lsmb i.3 ?></td>
+			<td class="paid_list">&nbsp;<?lsmb i.4 ?></td>
+			<td class="net_due_list">&nbsp;
+				<?lsmb INCLUDE format_money number= i.6 ?>
+				<?lsmb currency ?></td>
+			<td class="to_pay_list">
+			<?lsmb IF ! ${"payment_$r.contact_id_$i.0"} ?>
+				
+			<?lsmb ${"payment_$r.contact_id_$i.0"} = 
+				INCLUDE format_money number= i.6  ?>
+			<?lsmb END # if ?>
+			<?lsmb INCLUDE input element_data = {
+				name = "payment_$r.contact_id_$i.0"
+				value = ${"payment_$r.contact_id_$i.0"}
+				size = 20
+				type = "text"
+				class = "monetary"
+			} ?>
+			</td>
+		</tr>
+		<?lsmb END # foreach i ?>
+	</table>
+    </tr>
+   <?lsmb END # foreach r ?>
     </table>
-   </td>
-  </tr>
- </table>
- <table width="100%" border="1">
-  <tr class="listheading">
-   <?lsmb FOREACH column IN column_headers  # Loop through columns ?>
-   <th class="listheading"><?lsmb column.text ?></th>
-   <?lsmb END ?>
-  </tr>
-  <?lsmb # We have to clear i for later usage :)  ?>
-  <?lsmb i = '0' ?>
-  <?lsmb FOREACH row IN rows ?>
-  <?lsmb i = i + 1; j = i % 2; alterning_style = "listrow$j" 
-	# TODO: Refactor -- CT ?>
-  <tr class="<?lsmb alterning_style ?>"=>
-    <td><a href="<?lsmb row.invoice.href ?>"><?lsmb row.invoice.number ?></a>
-        <input type="hidden" value="<?lsmb row.invoice.id ?>" />                 </td>
-    <!-- we can use an href to link this invoice number to the invoice - DM -->
-    <td><?lsmb row.invoice_date ?></td>
-    <td><?lsmb row.amount ?></td>
-    <td><?lsmb row.paid ?></td>
-    <td><?lsmb row.due ?></td>
-    <?lsmb IF defaultcurrency.text != curr.text ?>
-    <td><?lsmb row.exchange_rate ?></td>
-    <td><?lsmb row.due_fx ?></td>
-    <td><div id="<?lsmb "div_topay_invoice_$i" ?>"><?lsmb row.topay ?></div></td>
-    <?lsmb END ?> 
-    <!-- DM: This should be computed and updated to the div using  --> 
-    <td><?lsmb PROCESS input  element_data=row.topay_fx ?><div id="<?lsmb "div_topay_$i" ?>">
-    <hr />  
-    <table>
-     <!-- Row for payment cash accounts -->
-     <tr id="<?lsmb "account-row$i"?>">
-      <th align="right" nowrap id="<?lsmb "account_label_column$i" ?>"><?lsmb text('Account') ?></th>
-      <td colspan="2" id="<?lsmb "account_column$i" ?>"><?lsmb PROCESS select element_data=account ?></td>
-     </tr>
-     <tr id="<?lsmb "source_row$i" ?>">
-      <?lsmb # here goes all the posible sources wich we can used ?>
-      <th align="right" nowrap id="<?lsmb "source_label_column$i" ?>"><?lsmb text('Source') ?></th>
-      <td width="28%" id="<?lsmb "source_column$i" ?>"><?lsmb PROCESS select element_data=source ?></td>
-      <td><?lsmb PROCESS input element_data=source_text ?></td>   
-      <td nowrap align="left"><input  name="<?lsmb "optionalpay_$i" ?>" type="checkbox"  class="checkbox"></td>
-     </tr>
-    </table>
-   </div>
-   <?lsmb END ?>
-  </table>
-  <hr />
-  <?lsmb PROCESS button element_data=post ?>
-  <?lsmb PROCESS button element_data=post_and_print ?>
-  <?lsmb PROCESS select element_data=format ?>
-  <?lsmb PROCESS select element_data=media ?>
+    <?lsmb INCLUDE button element_data = {
+	text = text('Post'),
+	value = 'post_payments_bulk'
+	class = "submit"
+	name = 'action'
+	} ?>
   </form>
  </body>
 </html>

Modified: trunk/UI/payments/payments_filter.html
===================================================================
--- trunk/UI/payments/payments_filter.html	2007-12-03 09:05:01 UTC (rev 1936)
+++ trunk/UI/payments/payments_filter.html	2007-12-03 09:06:51 UTC (rev 1937)
@@ -50,7 +50,7 @@
 <?lsmb IF businesses ?>
 <div id = "payments-filter-businesses" class="input">
   <label for="businesses"><?lsmb text('Business Class') ?></label>
-  <select name="businesses" id="businesses">
+  <select name="business" id="businesses">
   <?lsmb FOREACH b = businesses ?>
   <option value="<?lsmb b.id ?>"><?lsmb b.description ?></option>
   <?lsmb END ?>
@@ -58,6 +58,15 @@
 </div>
 <?lsmb END ?>
 </div>
+<div class="input" id="account_input">
+	<label for="account"><?lsmb text('Account') ?>
+	<select name="ar_ap_accno">
+	<?lsmb FOREACH a = debt_accounts ?>
+	<option value="<?lsmb a.accno ?>" <?lsmb 
+		IF a.id == account ?> SELECTED <?lsmb END ?>>
+			<?lsmb a.accno ?>--<?lsmb a.description ?></option>
+	<?lsmb END ?>
+	</select>
 <div id = "payments-filter-daterow" class = "inputgroup">
 <?lsmb PROCESS input element_data = {
 	label = text('Date From:')
@@ -85,6 +94,14 @@
 </select>
 </div>
 </div>
+<div class = "input">
+<?lsmb INCLUDE input element_data = {
+	type = "text"
+	size = "20"
+	name = "source_start"
+	label = text('Start Source Numbering At:')
+} # '?>
+</div>
 <?lsmb INCLUDE button element_data = {
 	type = "submit"
 	name = "action"


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