SVN author mbunkus | 1 Sep 2008 10:50
Picon
Favicon
Gravatar

r3375 - in trunk/unstable: SL bin/mozilla

Author: mbunkus
Date: 2008-09-01 10:50:59 +0200 (Mo, 01 Sep 2008)
New Revision: 3375

Log:
Bei Lieferanschrift-Drop-Down auch die Straße und den Ort anzeigen.

Modified:
   trunk/unstable/SL/CT.pm
   trunk/unstable/bin/mozilla/ct.pl
Geändert: trunk/unstable/SL/CT.pm
===================================================================
--- trunk/unstable/SL/CT.pm	2008-08-28 10:12:07 UTC (rev 3374)
+++ trunk/unstable/SL/CT.pm	2008-09-01 08:50:59 UTC (rev 3375)
 <at>  <at>  -155,8 +155,9  <at>  <at> 

   # get shipto address
   $query =
-    qq|SELECT shipto_id, shiptoname, shiptodepartment_1 | .
-    qq|FROM shipto WHERE (trans_id = ?) AND (module = 'CT')|;
+    qq|SELECT shipto_id, shiptoname, shiptodepartment_1, shiptostreet, shiptocity
+       FROM shipto
+       WHERE (trans_id = ?) AND (module = 'CT')|;
   $form->{SHIPTO} = selectall_hashref_query($form, $dbh, $query, $form->{id});

   # get contacts

Geändert: trunk/unstable/bin/mozilla/ct.pl
===================================================================
--- trunk/unstable/bin/mozilla/ct.pl	2008-08-28 10:12:07 UTC (rev 3374)
(Continue reading)

SVN author mbunkus | 3 Sep 2008 16:04
Picon
Favicon
Gravatar

r3376 - trunk/unstable/SL

Author: mbunkus
Date: 2008-09-03 16:04:07 +0200 (Mi, 03 Sep 2008)
New Revision: 3376

Log:
Beim Anlegen des allerersten Beleges eines Typs dafür sorgen, dass vendor_id bzw. customer_id auch
gesetzt werden. Andernfalls funktionieren Dinge wie Ansprechpartner-Drop-Down-Boxen nicht, oder es
erscheinen später SQL-Fehler.

Modified:
   trunk/unstable/SL/IR.pm
   trunk/unstable/SL/IS.pm
Geändert: trunk/unstable/SL/IR.pm
===================================================================
--- trunk/unstable/SL/IR.pm	2008-09-01 08:50:59 UTC (rev 3375)
+++ trunk/unstable/SL/IR.pm	2008-09-03 14:04:07 UTC (rev 3376)
 <at>  <at>  -866,7 +866,7  <at>  <at> 
   }
   my $query =
     qq|SELECT
-         v.name AS vendor, v.creditlimit, v.terms, v.notes AS intnotes,
+         v.id AS vendor_id, v.name AS vendor, v.creditlimit, v.terms, v.notes AS intnotes,
          v.email, v.cc, v.bcc, v.language_id, v.payment_id,
          v.street, v.zipcode, v.city, v.country, v.taxzone_id,
          $duedate + COALESCE(pt.terms_netto, 0) AS duedate,

Geändert: trunk/unstable/SL/IS.pm
===================================================================
--- trunk/unstable/SL/IS.pm	2008-09-01 08:50:59 UTC (rev 3375)
+++ trunk/unstable/SL/IS.pm	2008-09-03 14:04:07 UTC (rev 3376)
(Continue reading)

SVN author mbunkus | 4 Sep 2008 16:41
Picon
Favicon
Gravatar

r3377 - trunk/unstable/SL

Author: mbunkus
Date: 2008-09-04 16:41:34 +0200 (Do, 04 Sep 2008)
New Revision: 3377

Log:
Eine Option " <at> ignore: 1" für Datenbankupgradescripte, mit denen das Script von Lx-Office ignoriert
wird. Kann benutzt werden, um ein Script temporär zu deaktivieren, z.B. wenn man noch am Entwickeln ist.

Modified:
   trunk/unstable/SL/DBUpgrade2.pm
Geändert: trunk/unstable/SL/DBUpgrade2.pm
===================================================================
--- trunk/unstable/SL/DBUpgrade2.pm	2008-09-03 14:04:07 UTC (rev 3376)
+++ trunk/unstable/SL/DBUpgrade2.pm	2008-09-04 14:41:34 UTC (rev 3377)
 <at>  <at>  -47,6 +47,8  <at>  <at> 
       }
     }

+    next if ($control->{ignore});
+
     $control->{charset} ||= Common::DEFAULT_CHARSET;

     if (!$control->{"tag"}) {

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
(Continue reading)

SVN author mbunkus | 5 Sep 2008 12:10
Picon
Favicon
Gravatar

r3378 - trunk/unstable/SL

Author: mbunkus
Date: 2008-09-05 12:10:27 +0200 (Fr, 05 Sep 2008)
New Revision: 3378

Log:
Kosmetik

Modified:
   trunk/unstable/SL/DATEV.pm
Geändert: trunk/unstable/SL/DATEV.pm
===================================================================
--- trunk/unstable/SL/DATEV.pm	2008-09-04 14:41:34 UTC (rev 3377)
+++ trunk/unstable/SL/DATEV.pm	2008-09-05 10:10:27 UTC (rev 3378)
 <at>  <at>  -295,40 +295,38  <at>  <at> 
                 || $i->[$j]->{'taxkey'} eq "0"
                 || $i->[$j]->{'taxkey'} eq "1"
                 || $i->[$j]->{'taxkey'} eq "10"
-                || $i->[$j]->{'taxkey'} eq "11")
-          ) {
+                || $i->[$j]->{'taxkey'} eq "11")) {
           my %blubb = {};
-          map({ $blubb{$_} = $i->[$notsplitindex]->{$_}; }
-              keys(%{ $i->[$notsplitindex] }));
-          $absumsatz += $i->[$j]->{'amount'};
-          $blubb{'amount'}     = $i->[$j]->{'amount'} * (-1);
-          $blubb{'umsatz'}     = abs($i->[$j]->{'amount'}) * $ml;
-          $i->[$j]->{'umsatz'} = abs($i->[$j]->{'amount'}) * $ml;
+          map({ $blubb{$_} = $i->[$notsplitindex]->{$_}; } keys(%{ $i->[$notsplitindex] }));
+
+          $absumsatz           += $i->[$j]->{'amount'};
(Continue reading)

SVN author mbunkus | 5 Sep 2008 12:23
Picon
Favicon
Gravatar

r3379 - trunk/unstable/SL

Author: mbunkus
Date: 2008-09-05 12:23:19 +0200 (Fr, 05 Sep 2008)
New Revision: 3379

Log:
Kosmetik

Modified:
   trunk/unstable/SL/DATEV.pm
Geändert: trunk/unstable/SL/DATEV.pm
===================================================================
--- trunk/unstable/SL/DATEV.pm	2008-09-05 10:10:27 UTC (rev 3378)
+++ trunk/unstable/SL/DATEV.pm	2008-09-05 10:23:19 UTC (rev 3379)
 <at>  <at>  -26,6 +26,8  <at>  <at> 

 package DATEV;

+use SL::DBUtils;
+
 use Data::Dumper;

 sub get_datev_stamm {
 <at>  <at>  -217,47 +219,61  <at>  <at> 
 sub get_transactions {
   $main::lxdebug->enter_sub();

-  my ($myconfig, $form, $fromto) =  <at> _;
+  my $dbh = $form->get_standard_dbh($myconfig);

-  # connect to database
(Continue reading)

SVN author mbunkus | 5 Sep 2008 12:32
Picon
Favicon
Gravatar

r3380 - trunk/unstable/bin/mozilla

Author: mbunkus
Date: 2008-09-05 12:32:54 +0200 (Fr, 05 Sep 2008)
New Revision: 3380

Log:
Doppeltes HTML-Quoting vermeiden (das CGI-Modul quotet selber schon).

Modified:
   trunk/unstable/bin/mozilla/gl.pl
Geändert: trunk/unstable/bin/mozilla/gl.pl
===================================================================
--- trunk/unstable/bin/mozilla/gl.pl	2008-09-05 10:23:19 UTC (rev 3379)
+++ trunk/unstable/bin/mozilla/gl.pl	2008-09-05 10:32:54 UTC (rev 3380)
 <at>  <at>  -793,10 +793,10  <at>  <at> 
   my %charts = ();
   my $taxchart_init;
   foreach my $item ( <at> { $form->{ALL_CHARTS} }) {
-    my $key = Q($item->{accno}) . "--" . Q($item->{tax_id});
+    my $key = $item->{accno} . "--" . $item->{tax_id};
     $taxchart_init = $item->{taxkey_id} unless ( <at> chart_values);
     push( <at> chart_values, $key);
-    $chart_labels{$key} = H($item->{accno}) . "--" . H($item->{description});
+    $chart_labels{$key} = $item->{accno} . "--" . $item->{description};
     $charts{$item->{accno}} = $item;
   }

 <at>  <at>  -804,11 +804,10  <at>  <at> 
   my  <at> taxchart_values = ();
   my %taxcharts = ();
   foreach my $item ( <at> { $form->{ALL_TAXCHARTS} }) {
(Continue reading)

SVN author mbunkus | 5 Sep 2008 12:33
Picon
Favicon
Gravatar

r3381 - trunk/unstable/SL

Author: mbunkus
Date: 2008-09-05 12:33:22 +0200 (Fr, 05 Sep 2008)
New Revision: 3381

Log:
Kosmetik; Variablen lokal deklarieren.

Modified:
   trunk/unstable/SL/DATEV.pm
Geändert: trunk/unstable/SL/DATEV.pm
===================================================================
--- trunk/unstable/SL/DATEV.pm	2008-09-05 10:32:54 UTC (rev 3380)
+++ trunk/unstable/SL/DATEV.pm	2008-09-05 10:33:22 UTC (rev 3381)
 <at>  <at>  -216,16 +216,21  <at>  <at> 
   return $fromto;
 }

-sub get_transactions {
+sub _get_transactions {
   $main::lxdebug->enter_sub();

-  my $dbh = $form->get_standard_dbh($myconfig);
+  my $fromto   =  shift;

-  $fromto =~ s/transdate/ac\.transdate/g;
+  my $myconfig =  \%main::myconfig;
+  my $form     =  $main::form;

-  my %taxes = selectall_as_map($form, $dbh, qq|SELECT id, rate FROM tax|, 'id', 'rate');
+  my $dbh      =  $form->get_standard_dbh($myconfig);
(Continue reading)

SVN author mbunkus | 5 Sep 2008 13:01
Picon
Favicon
Gravatar

r3382 - trunk/unstable/SL

Author: mbunkus
Date: 2008-09-05 13:01:50 +0200 (Fr, 05 Sep 2008)
New Revision: 3382

Log:
Variable $i in $trans umbenannt.

Modified:
   trunk/unstable/SL/DATEV.pm
Geändert: trunk/unstable/SL/DATEV.pm
===================================================================
--- trunk/unstable/SL/DATEV.pm	2008-09-05 10:33:22 UTC (rev 3381)
+++ trunk/unstable/SL/DATEV.pm	2008-09-05 11:01:50 UTC (rev 3382)
 <at>  <at>  -284,7 +284,7  <at>  <at> 
       print("$counter ");
     }

-    my $i        = [ $ref ];
+    my $trans    = [ $ref ];

     my $count    = $ref->{amount};
     my $firstrun = 1;
 <at>  <at>  -293,7 +293,7  <at>  <at> 
       my $ref2 = $sth->fetchrow_hashref(NAME_lc);
       last unless ($ref2);

-      push  <at> {$i}, $ref2;
+      push  <at> { $trans }, $ref2;

       $count    += $ref2->{amount};
(Continue reading)

SVN author mbunkus | 5 Sep 2008 13:16
Picon
Favicon
Gravatar

r3383 - trunk/unstable/SL

Author: mbunkus
Date: 2008-09-05 13:16:37 +0200 (Fr, 05 Sep 2008)
New Revision: 3383

Log:
Kosmetik; Code vereinfacht

Modified:
   trunk/unstable/SL/DATEV.pm
Geändert: trunk/unstable/SL/DATEV.pm
===================================================================
--- trunk/unstable/SL/DATEV.pm	2008-09-05 11:01:50 UTC (rev 3382)
+++ trunk/unstable/SL/DATEV.pm	2008-09-05 11:16:37 UTC (rev 3383)
 <at>  <at>  -275,9 +275,8  <at>  <at> 

   my $sth     = prepare_execute_query($form, $dbh, $query);

-  my $g       = 0;
-  my $counter = 0;
   my  <at> splits;
+  my $counter = 0;
   while (my $ref = $sth->fetchrow_hashref(NAME_lc)) {
     $counter++;
     if (($counter % 500) == 0) {
 <at>  <at>  -315,7 +314,8  <at>  <at> 
         $taxid_taxkeys{$trans->[$j]->{'taxtaxkey'}}     = $trans->[$j]->{'taxid'};
       }
     }
-    $ml = ($trans->[0]->{'umsatz'} > 0) ? 1 : -1;
+
(Continue reading)

SVN author mbunkus | 5 Sep 2008 13:22
Picon
Favicon
Gravatar

r3384 - trunk/unstable/SL

Author: mbunkus
Date: 2008-09-05 13:22:19 +0200 (Fr, 05 Sep 2008)
New Revision: 3384

Log:
Kosmetik; mehr Variablen umbenannt

Modified:
   trunk/unstable/SL/DATEV.pm
Geändert: trunk/unstable/SL/DATEV.pm
===================================================================
--- trunk/unstable/SL/DATEV.pm	2008-09-05 11:16:37 UTC (rev 3383)
+++ trunk/unstable/SL/DATEV.pm	2008-09-05 11:22:19 UTC (rev 3384)
 <at>  <at>  -324,8 +324,8  <at>  <at> 
               || $trans->[$j]->{'taxkey'} eq "1"
               || $trans->[$j]->{'taxkey'} eq "10"
               || $trans->[$j]->{'taxkey'} eq "11")) {
-        my %new_trans = {};
-        map({ $new_trans{$_} = $trans->[$notsplitindex]->{$_}; } keys(%{ $trans->[$notsplitindex] }));
+        my %new_trans = ();
+        map { $new_trans{$_} = $trans->[$notsplitindex]->{$_}; } keys %{ $trans->[$notsplitindex] };

         $absumsatz               += $trans->[$j]->{'amount'};
         $new_trans{'amount'}      = $trans->[$j]->{'amount'} * (-1);
 <at>  <at>  -338,13 +338,13  <at>  <at> 
       } elsif (($j != $notsplitindex) && ($trans->[$j]->{'chart_id'} eq "")) {
         $absumsatz += ($trans->[$j]->{'amount'} * (1 + $taxes{ $taxid_taxkeys{$trans->[$j]->{'taxkey'}} }));

-        my %new_trans = {};
-        map({ $new_trans{$_} = $trans->[$notsplitindex]->{$_}; } keys(%{ $trans->[$notsplitindex] }));
(Continue reading)


Gmane