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

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



Revision: 4088
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4088&view=rev
Author:   einhverfr
Date:     2011-11-26 05:19:47 +0000 (Sat, 26 Nov 2011)
Log Message:
-----------
Merging from 1.3

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/BP.pm
    trunk/LedgerSMB/Form.pm
    trunk/LedgerSMB/Template/HTML.pm
    trunk/LedgerSMB/Template/LaTeX.pm
    trunk/UI/Contact/contact.html
    trunk/bin/arapprn.pl
    trunk/bin/io.pl
    trunk/bin/jc.pl
    trunk/sql/Pg-database.sql
    trunk/sql/modules/Fixes.sql
    trunk/sql/modules/Person.sql

Property Changed:
----------------
    trunk/
    trunk/LedgerSMB/Scripts/admin.pm
    trunk/LedgerSMB/Scripts/employee.pm
    trunk/LedgerSMB/Scripts/file.pm
    trunk/LedgerSMB/Scripts/payment.pm
    trunk/LedgerSMB/Scripts/setup.pm
    trunk/sql/upgrade/1.2-1.3-manual.sql


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3:3711-4079
   + /branches/1.3:3711-4087

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2011-11-26 04:33:52 UTC (rev 4087)
+++ trunk/Changelog	2011-11-26 05:19:47 UTC (rev 4088)
@@ -28,6 +28,11 @@
 * Default language handling for invoices (Herman V)
 * Fixed LaTeX errors in timecard templates (Chris T)
 * Reduced warnings in logs (Chris T)
+* Fixed error when batch printing timecards (Erik H)
+* Fixed menu reversal with batch printing (Erik H)
+* Removed broken edit buttons on bank account tab of contacts form (Chris T)
+* Corrected UI glitches involving adding employee contact info (Chris T)
+* Corrected missing translation call in contact template (Chris T)
 
 Changelog for LedgerSMB 1.3.6
 * Including xelatex templates under directory templates/xedemo (Chris T)

Modified: trunk/LedgerSMB/BP.pm
===================================================================
--- trunk/LedgerSMB/BP.pm	2011-11-26 04:33:52 UTC (rev 4087)
+++ trunk/LedgerSMB/BP.pm	2011-11-26 05:19:47 UTC (rev 4088)
@@ -157,7 +157,8 @@
 			       '' AS ordnumber, '' AS quonumber, '0' AS invoice,
 			       '$arap{$form->{type}}[0]' AS module, s.spoolfile
 			  FROM jcitems j
-			  JOIN employees e ON (e.entity_id = j.employee_id)
+                          JOIN person p ON (j.person_id = p.id)
+			  JOIN employees e ON (e.entity_id = p.entity_id)
 			  JOIN status s ON (s.trans_id = j.id)
 			 WHERE s.formname = ?
 			       AND s.spoolfile IS NOT NULL|;

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2011-11-26 04:33:52 UTC (rev 4087)
+++ trunk/LedgerSMB/Form.pm	2011-11-26 05:19:47 UTC (rev 4088)
@@ -2751,7 +2751,7 @@
 
 sub update_status {
 
-    my ( $self, $myconfig ) = @_;
+    my ( $self, $myconfig, $commit ) = @_;
 
     # no id return
     return unless $self->{id};
@@ -2785,6 +2785,9 @@
     $sth->execute( $self->{id}, $printed, $emailed, $spoolfile,
         $self->{formname} ) || $self->dberror($query);
     $sth->finish;
+    if ($commit){
+        $dbh->commit;
+    }
 
 }
 


Property changes on: trunk/LedgerSMB/Scripts/admin.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4079
/branches/1.3/scripts/admin.pl:3711-3903
   + /branches/1.3/LedgerSMB/Scripts/admin.pm:3901-4087
/branches/1.3/scripts/admin.pl:3711-3903


Property changes on: trunk/LedgerSMB/Scripts/employee.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4079
/branches/1.3/scripts/employee.pl:3842-3843
   + /branches/1.3/LedgerSMB/Scripts/employee.pm:3712-4087
/branches/1.3/scripts/employee.pl:3842-3843


Property changes on: trunk/LedgerSMB/Scripts/file.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4079
/branches/1.3/scripts/file.pl:3711-4079
   + /branches/1.3/LedgerSMB/Scripts/file.pm:3711-4087
/branches/1.3/scripts/file.pl:3711-4079


Property changes on: trunk/LedgerSMB/Scripts/payment.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4079
/branches/1.3/scripts/payment.pl:3711-4011
   + /branches/1.3/LedgerSMB/Scripts/payment.pm:4010-4087
/branches/1.3/scripts/payment.pl:3711-4011


Property changes on: trunk/LedgerSMB/Scripts/setup.pm
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4079
/branches/1.3/scripts/setup.pl:3711-4079
   + /branches/1.3/LedgerSMB/Scripts/setup.pm:3937-4087
/branches/1.3/scripts/setup.pl:3711-4079

Modified: trunk/LedgerSMB/Template/HTML.pm
===================================================================
--- trunk/LedgerSMB/Template/HTML.pm	2011-11-26 04:33:52 UTC (rev 4087)
+++ trunk/LedgerSMB/Template/HTML.pm	2011-11-26 05:19:47 UTC (rev 4088)
@@ -123,7 +123,7 @@
             $tempdir = undef;
         }
 	$template = Template->new({
-		INCLUDE_PATH => [$parent->{include_path_lang}, $parent->{include_path}, 'UI/lib'],
+		INCLUDE_PATH => [$parent->{include_path_lang}, $parent->{include_path},'templates/demo','UI/lib'],
                 ENCODING => 'utf8',
 		START_TAG => quotemeta('<?lsmb'),
 		END_TAG => quotemeta('?>'),

Modified: trunk/LedgerSMB/Template/LaTeX.pm
===================================================================
--- trunk/LedgerSMB/Template/LaTeX.pm	2011-11-26 04:33:52 UTC (rev 4087)
+++ trunk/LedgerSMB/Template/LaTeX.pm	2011-11-26 05:19:47 UTC (rev 4088)
@@ -58,6 +58,8 @@
 use Template::Latex;
 use LedgerSMB::Template::TTI18N;
 
+my $logger = Log::Log4perl->get_logger('LedgerSMB::Template::LaTeX');
+
 sub get_template {
 	my $name = shift;
 	return "${name}.tex";
@@ -132,7 +134,7 @@
 	}
 	$template = Template::Latex->new({
 		LATEX_FORMAT => $format,
-		INCLUDE_PATH => [$parent->{include_path_lang}, $parent->{include_path}, 'UI/lib'],
+		INCLUDE_PATH => [$parent->{include_path_lang}, $parent->{include_path},'templates/demo','UI/lib'],
 		START_TAG => quotemeta('<?lsmb'),
 		END_TAG => quotemeta('?>'),
 		DELIMITER => ';',

Modified: trunk/UI/Contact/contact.html
===================================================================
--- trunk/UI/Contact/contact.html	2011-11-26 04:33:52 UTC (rev 4087)
+++ trunk/UI/Contact/contact.html	2011-11-26 05:19:47 UTC (rev 4088)
@@ -1004,18 +1004,11 @@
 	<td class="bic"><?lsmb ba.bic ?></td>
 	<td class="iban"><?lsmb ba.iban ?></td>
 	<td class="actions">
-		<a href="<?lsmb script ?>?action=edit_bank_acct&entity_id=<?lsmb
-			entity_id ?>&bank_account_id=<?lsmb ba.id 
-                        ?>&bic=<?lsmb tt_url(ba.bic)
-                        ?>&iban=<?lsmb tt_url(ba.iban) 
-                        ?>&credit_id=<?lsmb tt_url(credit_id) 
-                        ?>&target_div=bank_div"
-			>[Edit]</a> 
 		<a href="<?lsmb script ?>?action=delete_bank_acct&entity_id=<?lsmb
 			entity_id ?>&bank_account_id=<?lsmb ba.id 
                         ?>&target_div=bank_div&form_id=<?lsmb form_id 
                         ?>&credit_id=<?lsmb tt_url(credit_id) ?>"
-			>[Delete]</a> 
+			>[<?lsmb text('Delete') ?>]</a> 
 	</td>
 </tr>
 <?lsmb END ?>

Modified: trunk/bin/arapprn.pl
===================================================================
--- trunk/bin/arapprn.pl	2011-11-26 04:33:52 UTC (rev 4087)
+++ trunk/bin/arapprn.pl	2011-11-26 05:19:47 UTC (rev 4088)
@@ -311,7 +311,7 @@
         $form->{queued} =~ s/^ //;
 
         # save status
-        $form->update_status( \%myconfig );
+        $form->update_status( \%myconfig, 1);
 
         $old_form->{queued} = $form->{queued};
 
@@ -336,7 +336,7 @@
             $form->{printed} .= " $form->{formname}";
             $form->{printed} =~ s/^ //;
 
-            $form->update_status( \%myconfig );
+            $form->update_status( \%myconfig, 1);
         }
 
         $old_form->{printed} = $form->{printed} if %$old_form;

Modified: trunk/bin/io.pl
===================================================================
--- trunk/bin/io.pl	2011-11-26 04:33:52 UTC (rev 4087)
+++ trunk/bin/io.pl	2011-11-26 05:19:47 UTC (rev 4088)
@@ -1721,7 +1721,7 @@
             $form->{printed} .= " $form->{formname}";
             $form->{printed} =~ s/^ //;
 
-            $form->update_status( \%myconfig );
+            $form->update_status( \%myconfig, 1);
         }
 
         $old_form->{printed} = $form->{printed} if %$old_form;
@@ -1749,7 +1749,7 @@
             $form->{emailed} =~ s/^ //;
 
             # save status
-            $form->update_status( \%myconfig );
+            $form->update_status( \%myconfig, 1);
         }
 
         $now = scalar localtime;
@@ -1822,7 +1822,7 @@
         $form->{queued} =~ s/^ //;
 
         # save status
-        $form->update_status( \%myconfig );
+        $form->update_status( \%myconfig, 1);
 
         $old_form->{queued} = $form->{queued};
 

Modified: trunk/bin/jc.pl
===================================================================
--- trunk/bin/jc.pl	2011-11-26 04:33:52 UTC (rev 4087)
+++ trunk/bin/jc.pl	2011-11-26 05:19:47 UTC (rev 4088)
@@ -2144,7 +2144,7 @@
             $form->{printed} .= " $form->{formname}";
             $form->{printed} =~ s/^ //;
 
-            $form->update_status( \%myconfig );
+            $form->update_status( \%myconfig, 1);
         }
 
         %audittrail = (
@@ -2181,7 +2181,7 @@
         $form->{printmode} = '>';
 
         $form->{queued} = "$form->{formname} $filename";
-        $form->update_status( \%myconfig );
+        $form->update_status( \%myconfig, 1);
 
         %audittrail = (
             tablename => jcitems,

Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql	2011-11-26 04:33:52 UTC (rev 4087)
+++ trunk/sql/Pg-database.sql	2011-11-26 05:19:47 UTC (rev 4088)
@@ -2694,11 +2694,11 @@
 117	module	bp.pl	294
 117	action	search	295
 117	vc	customer	297
+117	type	invoice	296
 118	module	bp.pl	298
 118	action	search	299
 118	vc	customer	300
-118	type	invoice	301
-117	type	sales_order	296
+118	type	sales_order	301
 120	module	bp.pl	302
 120	action	search	303
 120	vc	customer	304

Modified: trunk/sql/modules/Fixes.sql
===================================================================
--- trunk/sql/modules/Fixes.sql	2011-11-26 04:33:52 UTC (rev 4087)
+++ trunk/sql/modules/Fixes.sql	2011-11-26 05:19:47 UTC (rev 4088)
@@ -44,3 +44,10 @@
 BEGIN;
 ALTER TABLE entity_credit_account ADD FOREIGN KEY (language_code) REFERENCES language(code);
 COMMIT;
+
+BEGIN;
+UPDATE menu_attribute SET value = 'invoice'
+   WHERE node_id = 117 AND attribute = 'type';
+UPDATE menu_attribute SET value = 'sales_order'
+   WHERE node_id = 118 AND attribute = 'type';
+COMMIT;

Modified: trunk/sql/modules/Person.sql
===================================================================
--- trunk/sql/modules/Person.sql	2011-11-26 04:33:52 UTC (rev 4087)
+++ trunk/sql/modules/Person.sql	2011-11-26 05:19:47 UTC (rev 4088)
@@ -4,6 +4,8 @@
 
 -- Docstrings already added to this file.
 
+BEGIN;
+
 CREATE OR REPLACE FUNCTION person__get_my_entity_id() RETURNS INT AS
 $$
 	SELECT entity_id from users where username = SESSION_USER;
@@ -149,8 +151,11 @@
 $$ Deletes a contact record specified for the person.  Returns true if a record
 was found and deleted, false if not.$$;
 
+DROP FUNCTION IF EXISTS  person__save_contact
+(in_entity_id int, in_contact_class int, in_contact_orig text, in_contact_new TEXT);
+
 CREATE OR REPLACE FUNCTION person__save_contact
-(in_entity_id int, in_contact_class int, in_contact_orig text, in_contact_new TEXT)
+(in_entity_id int, in_contact_class int, in_old_contact text, in_contact_new TEXT, in_description text, in_old_contact_class int)
 RETURNS INT AS
 $$
 DECLARE 
@@ -161,28 +166,28 @@
     SELECT cc.* into v_orig 
     FROM person_to_contact cc, person p
     WHERE p.entity_id = in_entity_id 
-    and cc.contact_class_id = in_contact_class
-    AND cc.contact = in_contact_orig
+    and cc.contact_class_id = in_old_contact_class
+    AND cc.contact = in_old_contact
     AND cc.person_id = p.id;
     
     IF NOT FOUND THEN
     
         -- create
-        INSERT INTO person_to_contact(person_id, contact_class_id, contact)
+        INSERT INTO person_to_contact(person_id, contact_class_id, contact, description)
         VALUES (
             (SELECT id FROM person WHERE entity_id = in_entity_id),
             in_contact_class,
-            in_contact_new
+            in_contact_new,
+            in_description
         );
         return 1;
     ELSE
         -- edit.
         UPDATE person_to_contact
-        SET contact = in_contact_new
-        WHERE 
-        contact = in_contact_orig
-        AND person_id = v_orig.person_id
-        AND contact_class = in_contact_class;
+           SET contact = in_contact_new, description = in_description
+         WHERE contact = in_old_contact
+               AND person_id = v_orig.person_id
+               AND contact_class_id = in_old_contact_class;
         return 0;
     END IF;
     
@@ -190,7 +195,7 @@
 $$ LANGUAGE PLPGSQL;
 
 COMMENT ON FUNCTION person__save_contact
-(in_entity_id int, in_contact_class int, in_contact_orig text, in_contact_new TEXT) IS
+(in_entity_id int, in_contact_class int, in_old_contact text, in_contact_new TEXT, in_description text, in_old_contact_class int) IS
 $$ Saves saves contact info.  Returns 1 if a row was inserted, 0 if it was 
 updated. $$;
 
@@ -324,4 +329,4 @@
 ) IS
 $$ Saves a location mapped to the person with the specified information.
 Returns the location id saved.$$;
-
+COMMIT;


Property changes on: trunk/sql/upgrade/1.2-1.3-manual.sql
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-4079
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710
   + /branches/1.3/sql/upgrade/1.2-1.3-manual.sql:3712-4087
/branches/1.3/sql/upgrade/1.2-1.3.sql:3711-3851
/trunk/sql/upgrade/1.2-1.3.sql:858-3710

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