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

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



Revision: 3734
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3734&view=rev
Author:   einhverfr
Date:     2011-09-22 20:05:22 +0000 (Thu, 22 Sep 2011)
Log Message:
-----------
Merging branches/1.3

Modified Paths:
--------------
    trunk/Makefile.PL
    trunk/UI/accounts/edit.css
    trunk/UI/payments/payments.css
    trunk/UI/payments/payments_detail.html
    trunk/UI/payments/payments_detail.js
    trunk/dists/rpm/ledgersmb.spec
    trunk/scripts/payment.pl

Property Changed:
----------------
    trunk/


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3:3711-3726
   + /branches/1.3:3711-3733

Modified: trunk/Makefile.PL
===================================================================
--- trunk/Makefile.PL	2011-09-22 19:23:03 UTC (rev 3733)
+++ trunk/Makefile.PL	2011-09-22 20:05:22 UTC (rev 3734)
@@ -24,8 +24,6 @@
 requires 'IO::File';
 requires 'IO::Scalar';
 requires 'Encode';
-requires 'Locale::Country';
-requires 'Locale::Language';
 requires 'Time::Local';
 requires 'Cwd';
 requires 'Config::Std';
@@ -52,7 +50,9 @@
 feature 'Developer tool dependencies',
     -default => 0,
     'Getopt::Long' => 0,
-    'FileHandle' => 0;
+    'FileHandle' => 0,
+    'Locale::Country' => 0,
+    'Locale::Language' => 0;
 
 # Rendering options
 feature 'PDF and Postscript output',

Modified: trunk/UI/accounts/edit.css
===================================================================
--- trunk/UI/accounts/edit.css	2011-09-22 19:23:03 UTC (rev 3733)
+++ trunk/UI/accounts/edit.css	2011-09-22 20:05:22 UTC (rev 3734)
@@ -29,3 +29,4 @@
    font-weight: bold;
    margin: 1em;
 }
+

Modified: trunk/UI/payments/payments.css
===================================================================
--- trunk/UI/payments/payments.css	2011-09-22 19:23:03 UTC (rev 3733)
+++ trunk/UI/payments/payments.css	2011-09-22 20:05:22 UTC (rev 3734)
@@ -4,3 +4,7 @@
 table.detail_table_hidden{
 	display: none;
 }
+
+div.selectall {
+       float: left;
+}

Modified: trunk/UI/payments/payments_detail.html
===================================================================
--- trunk/UI/payments/payments_detail.html	2011-09-22 19:23:03 UTC (rev 3733)
+++ trunk/UI/payments/payments_detail.html	2011-09-22 20:05:22 UTC (rev 3734)
@@ -191,7 +191,14 @@
     </div>
     <table id="payments-table">
     <tr class="listheading">
-	<th class="account"><?lsmb text('Account') ?></th>
+	<th class="account"><div class="selectall">
+        <?lsmb INCLUDE input element_data = {
+               id = 'checkbox-selectall'
+             name = 'selectall'
+            class = 'selectall'
+            value = 0
+             type = 'checkbox'
+        } ?></div><?lsmb text('Account') ?></th>
 	<th class="entity_name"><?lsmb text('Name') ?></th>
 	<th class="invoice"><?lsmb text('Invoice Total') ?></th>
         <th class="payment"><?lsmb text('Payment') ?></th>
@@ -212,11 +219,11 @@
 			name = "contact_label_" _ r.contact_id
 			value = r.econtrol_code _ "--" _ r.account_number _ "--" _ r.contact_name
 		} ?>
-		<?lsmb IF action == "update_payments" -?>
+		<?lsmb # IF action == "update_payments" -?>
 			<?lsmb IF ${"id_$r.contact_id"} -?>
 				<?lsmb r.selected = 1 -?>
 			<?lsmb END # IF !${"id_$r.contact_id"} -?>
-		<?lsmb END # IF action ... -?>
+		<?lsmb # END # IF action ... -?>
 		<?lsmb INCLUDE input element_data = {
 			type = "checkbox"
 			name = "id_$r.contact_id"

Modified: trunk/UI/payments/payments_detail.js
===================================================================
--- trunk/UI/payments/payments_detail.js	2011-09-22 19:23:03 UTC (rev 3733)
+++ trunk/UI/payments/payments_detail.js	2011-09-22 20:05:22 UTC (rev 3734)
@@ -36,6 +36,17 @@
 			table.className = 'detail_table_hidden';
 		}
 	}
+        var cb = document.getElementById('checkbox-selectall');
+        cb.addEventListener('click',
+                function(e){
+                    var cb = document.getElementById('checkbox-selectall');
+                    var cc = document.getElementById('contact-count').value;
+                    for (var i=1; i <= cc; i++){
+                        var cid = document.getElementById('contact-' + i).value;
+                        var rowcb = document.getElementById('id-' + cid);
+                        rowcb.checked = cb.checked;
+                    }
+                 }, false);
 }
 
 function show_details(contact_id){

Modified: trunk/dists/rpm/ledgersmb.spec
===================================================================
--- trunk/dists/rpm/ledgersmb.spec	2011-09-22 19:23:03 UTC (rev 3733)
+++ trunk/dists/rpm/ledgersmb.spec	2011-09-22 20:05:22 UTC (rev 3734)
@@ -21,6 +21,7 @@
 Requires: perl-Locale-Maketext-Lexicon >= 0.62
 Requires: perl-IO-String
 Requires: perl-Math-BigInt-GMP
+Requires: perl-Log-Log4perl perl-DateTime
 BuildRequires: perl
 # avoid bogus autodetection of perl modules:
 AutoReqProv: no

Modified: trunk/scripts/payment.pl
===================================================================
--- trunk/scripts/payment.pl	2011-09-22 19:23:03 UTC (rev 3733)
+++ trunk/scripts/payment.pl	2011-09-22 20:05:22 UTC (rev 3734)
@@ -227,7 +227,7 @@
         credits => $total_credits};
         
     my $buttons = [{
-        text  => $request->{_locale}->text('Post'),
+        text  => $request->{_locale}->text('Save Batch'),
         name  => 'action',
         value => 'post_payments_bulk',
         class => 'submit',
@@ -570,6 +570,7 @@
             if (($payment->{action} ne 'update_payments') 
                   or (defined $payment->{"id_$_->{contact_id}"})){
                    $payment->{"paid_$_->{contact_id}"} = "" unless defined $payment->{"paid_$_->{contact_id}"};
+
                    if ($payment->{"paid_$_->{contact_id}"} eq 'some'){
                       my $i_id = $invoice->[0];
                       my $payment_amt = $payment->parse_amount(
@@ -602,6 +603,12 @@
             $_->{contact_total} = $contact_total;
             $_->{to_pay} = $contact_to_pay;
             $payment->{grand_total} += $contact_total;
+
+            my ($check_all) = $payment->get_default_value_by_key('check_payments');
+            if ($payment->{account_class} == 1 and $check_all){
+                 $payment->{"id_$_->{contact_id}"} = $_->{contact_id};
+            }
+                       
         }
         $_->{total_due} = $payment->format_amount(amount =>  $_->{total_due},
                                                   money  => 1);

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