Merge branch 'master' of ssh://git-sdonath@lx-office.linet-services.de/~/lx-office-erp
authorSven Donath <lxo@dexo.de>
Tue, 28 Dec 2010 14:35:04 +0000 (15:35 +0100)
committerSven Donath <lxo@dexo.de>
Tue, 28 Dec 2010 14:35:04 +0000 (15:35 +0100)
17 files changed:
SL/BP.pm
SL/DN.pm
SL/Form.pm
SL/IC.pm
SL/IS.pm
SL/RP.pm
bin/mozilla/amtemplates.pl
bin/mozilla/bp.pl
bin/mozilla/io.pl
bin/mozilla/is.pl
locale/de/all
locale/de/special_chars
locale/de_DE/all
locale/en/all
scripts/locales.pl
templates/webpages/admin/edit_groups.html
templates/webpages/am/edit_accounts.html

index b981f18..e2b7a2a 100644 (file)
--- a/SL/BP.pm
+++ b/SL/BP.pm
@@ -47,7 +47,6 @@ sub get_vc {
   my $dbh = $form->dbconnect($myconfig);
 
   my %arap = (invoice           => 'ar',
-              packing_list      => 'ar',
               sales_order       => 'oe',
               purchase_order    => 'oe',
               sales_quotation   => 'oe',
@@ -183,7 +182,7 @@ sub get_spoolfiles {
     }
   }
 
-  if ($form->{type} =~ /(invoice|sales_order|sales_quotation|packing_list|puchase_order|request_quotation)$/) {
+  if ($form->{type} =~ /(invoice|sales_order|sales_quotation|puchase_order|request_quotation)$/) {
     if ($form->{transdatefrom}) {
       $query .= " AND a.transdate >= ?";
       push(@values, $form->{transdatefrom});
index 45bc367..2cc87df 100644 (file)
--- a/SL/DN.pm
+++ b/SL/DN.pm
@@ -36,6 +36,7 @@ package DN;
 
 use SL::Common;
 use SL::DBUtils;
+use SL::GenericTranslations;
 use SL::IS;
 use SL::Mailer;
 use SL::MoreCommon;
@@ -503,7 +504,12 @@ sub get_invoices {
               ORDER BY dunning_level ASC
               LIMIT 1)
              , ?))
-       LEFT JOIN dunning d ON ((d.trans_id = a.id) AND (cfg.dunning_level = d.dunning_level))
+       LEFT JOIN dunning d ON (d.id = (
+         SELECT MAX(d2.id)
+         FROM dunning d2
+         WHERE (d2.trans_id      = a.id)
+           AND (d2.dunning_level = cfg.dunning_level)
+       ))
 
        WHERE (a.paid < a.amount)
          AND (a.duedate < current_date)
@@ -782,6 +788,7 @@ sub print_dunning {
   $form->{total_open_amount} = $form->format_amount($myconfig, $form->round_amount($ref->{total_open_amount}, 2), 2);
   $form->{total_amount}      = $form->format_amount($myconfig, $form->round_amount($ref->{fee} + $ref->{total_interest} + $ref->{total_open_amount}, 2), 2);
 
+  $self->set_customer_cvars($myconfig, $form);
   $self->set_template_options($myconfig, $form);
 
   my $filename          = "dunning_${dunning_id}_" . Common::unique_id() . ".pdf";
@@ -832,7 +839,7 @@ sub print_invoice_for_fees {
   $query =
     qq|SELECT
          ar.invnumber, ar.transdate AS invdate, ar.amount, ar.netamount,
-         ar.duedate,   ar.notes,     ar.notes AS invoicenotes,
+         ar.duedate,   ar.notes,     ar.notes AS invoicenotes, ar.customer_id,
 
          c.name,      c.department_1,   c.department_2, c.street, c.zipcode, c.city, c.country,
          c.contact,   c.customernumber, c.phone,        c.fax,    c.email,
@@ -873,6 +880,7 @@ sub print_invoice_for_fees {
 
   map { $form->{$_} = $form->format_amount($myconfig, $form->{$_}, 2) } qw(fee interest invamount);
 
+  $self->set_customer_cvars($myconfig, $form);
   $self->set_template_options($myconfig, $form);
 
   my $filename = Common::unique_id() . "dunning_invoice_${dunning_id}.pdf";
@@ -896,4 +904,18 @@ sub print_invoice_for_fees {
   $main::lxdebug->leave_sub();
 }
 
+sub set_customer_cvars {
+  my ($self, $myconfig, $form) = @_;
+
+  my $custom_variables = CVar->get_custom_variables(dbh      => $form->get_standard_dbh,
+                                                    module   => 'CT',
+                                                    trans_id => $form->{customer_id});
+  map { $form->{"vc_cvar_$_->{name}"} = $_->{value} } @{ $custom_variables };
+
+  $form->{cp_greeting} = GenericTranslations->get(dbh              => $form->get_standard_dbh,
+                                                  translation_type => 'greetings::' . ($form->{cp_gender} eq 'f' ? 'female' : 'male'),
+                                                  language_id      => $form->{language_id},
+                                                  allow_fallback   => 1);
+}
+
 1;
index 7b7746d..41ccab8 100644 (file)
@@ -1374,7 +1374,6 @@ sub get_formname_translation {
     bin_list                => $main::locale->text('Bin List'),
     credit_note             => $main::locale->text('Credit Note'),
     invoice                 => $main::locale->text('Invoice'),
-    packing_list            => $main::locale->text('Packing List'),
     pick_list               => $main::locale->text('Pick List'),
     proforma                => $main::locale->text('Proforma Invoice'),
     purchase_order          => $main::locale->text('Purchase Order'),
@@ -1382,7 +1381,6 @@ sub get_formname_translation {
     sales_order             => $main::locale->text('Confirmation'),
     sales_quotation         => $main::locale->text('Quotation'),
     storno_invoice          => $main::locale->text('Storno Invoice'),
-    storno_packing_list     => $main::locale->text('Storno Packing List'),
     sales_delivery_order    => $main::locale->text('Delivery Order'),
     purchase_delivery_order => $main::locale->text('Delivery Order'),
     dunning                 => $main::locale->text('Dunning'),
@@ -3225,7 +3223,6 @@ sub save_status {
 # $main::locale->text('invoice')
 # $main::locale->text('proforma')
 # $main::locale->text('sales_order')
-# $main::locale->text('packing_list')
 # $main::locale->text('pick_list')
 # $main::locale->text('purchase_order')
 # $main::locale->text('bin_list')
index ad17036..28fcc66 100644 (file)
--- a/SL/IC.pm
+++ b/SL/IC.pm
@@ -176,7 +176,7 @@ sub get_part {
 
       my $i = 1;
 
-      while (($form->{"make_$i"}, $form->{"model_$i"}, $form->{"old_lastcost_$i"}, 
+      while (($form->{"make_$i"}, $form->{"model_$i"}, $form->{"old_lastcost_$i"},
                 $form->{"lastcost_$i"}, $form->{"lastupdate_$i"}, $form->{"sortorder_$i"}) = $sth->fetchrow_array)
       {
         $i++;
@@ -502,9 +502,9 @@ sub save {
       if (($form->{"make_$i"}) || ($form->{"model_$i"})) {
         #hli
         $value = $form->parse_amount($myconfig, $form->{"lastcost_$i"});
-        if ($value == $form->{"old_lastcost_$i"}) 
+        if ($value == $form->{"old_lastcost_$i"})
         {
-            if ($form->{"lastupdate_$i"} eq "") { 
+            if ($form->{"lastupdate_$i"} eq "") {
                 $lastupdate = 'now()';
             } else {
                 $lastupdate = $dbh->quote($form->{"lastupdate_$i"});
index d1358de..e9e4711 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -2076,14 +2076,14 @@ sub get_pricegroups_for_parts {
           $pkr->{price}    = $form->{"sellprice_$i"};
           $pkr->{selected} = ' selected';
         }
-      }
-
-      if ($selectedpricegroup_id or $selectedpricegroup_id == 0) {
+      } else {
         if ($selectedpricegroup_id ne $pricegroup_old) {
           if ($pkr->{pricegroup_id} eq $selectedpricegroup_id) {
             $pkr->{selected}  = ' selected';
           }
-        } elsif (($price_new != $form->{"sellprice_$i"}) and ($price_new ne 0)) {
+        } elsif (    (   $form->parse_amount($myconfig, $price_new)
+                      != $form->parse_amount($myconfig, $form->{"sellprice_$i"}))
+                 and ($price_new ne 0)) {
           if ($pkr->{pricegroup_id} == 0) {
             $pkr->{price}     = $form->{"sellprice_$i"};
             $pkr->{selected}  = ' selected';
index 41cd390..607eb38 100644 (file)
--- a/SL/RP.pm
+++ b/SL/RP.pm
@@ -74,7 +74,7 @@ sub balance_sheet {
   }
 
   # get end of financial year and convert to Date format
-  my ($closedto) = selectfirst_arrayref_query($form, $dbh, 'SELECT closedto FROM defaults');
+  my ($closedto) = selectfirst_array_query($form, $dbh, 'SELECT closedto FROM defaults');
 
   # get date of last opening balance
   my $startdate = get_openbalance_date($closedto, $form->{asofdate});
index e339790..1dc7344 100644 (file)
@@ -138,29 +138,29 @@ sub display_template_form {
 
     my %formname_setup =
       (
-#        "balance_sheet"       => { "translation" => $locale->text('Balance Sheet'), "html" => 1 },
-        "bin_list"            => $locale->text('Bin List'),
-        "bwa"                 => { "translation" => $locale->text('BWA'), "html" => 1 },
-        "check"               => { "translation" => $locale->text('Check'), "html" => 1 },
-        "credit_note"         => $locale->text('Credit Note'),
-        "income_statement"    => { "translation" => $locale->text('Income Statement'), "html" => 1 },
-        "invoice"             => $locale->text('Invoice'),
-        "packing_list"        => $locale->text('Packing List'),
-        "pick_list"           => $locale->text('Pick List'),
-        "proforma"            => $locale->text('Proforma Invoice'),
-        "purchase_order"      => $locale->text('Purchase Order'),
-        "receipt"             => { "translation" => $locale->text('Receipt'), "tex" => 1 },
-        "request_quotation"   => $locale->text('RFQ'),
-        "sales_order"         => $locale->text('Confirmation'),
-        "sales_quotation"     => $locale->text('Quotation'),
-        "statement"           => $locale->text('Statement'),
-        "storno_invoice"      => $locale->text('Storno Invoice'),
-        "storno_packing_list" => $locale->text('Storno Packing List'),
-        "ustva-2004"          => { "translation" => $locale->text("USTVA 2004"), "tex" => 1 },
-        "ustva-2005"          => { "translation" => $locale->text("USTVA 2005"), "tex" => 1 },
-        "ustva-2006"          => { "translation" => $locale->text("USTVA 2006"), "tex" => 1 },
-        "ustva-2007"          => { "translation" => $locale->text("USTVA 2007"), "tex" => 1 },
-        "ustva"               => $locale->text("USTVA"),
+        # balance_sheet           => { translation => $locale->text('Balance Sheet'),             html => 1 },
+        bin_list                => $locale->text('Bin List'),
+        bwa                     => { translation => $locale->text('BWA'),                       html => 1 },
+        check                   => { translation => $locale->text('Check'),                     html => 1 },
+        credit_note             => $locale->text('Credit Note'),
+        income_statement        => { translation => $locale->text('Income Statement'),          html => 1 },
+        invoice                 => $locale->text('Invoice'),
+        pick_list               => $locale->text('Pick List'),
+        proforma                => $locale->text('Proforma Invoice'),
+        purchase_delivery_order => { translation => $::locale->text('Purchase delivery order'), tex => 1 },
+        purchase_order          => $locale->text('Purchase Order'),
+        receipt                 => { translation => $locale->text('Receipt'),                   tex => 1 },
+        request_quotation       => $locale->text('RFQ'),
+        sales_delivery_order    => { translation => $::locale->text('Sales delivery order'),    tex => 1 },
+        sales_order             => $locale->text('Confirmation'),
+        sales_quotation         => $locale->text('Quotation'),
+        statement               => $locale->text('Statement'),
+        storno_invoice          => $locale->text('Storno Invoice'),
+        "ustva-2004"            => { translation => $locale->text("USTVA 2004"),                tex => 1 },
+        "ustva-2005"            => { translation => $locale->text("USTVA 2005"),                tex => 1 },
+        "ustva-2006"            => { translation => $locale->text("USTVA 2006"),                tex => 1 },
+        "ustva-2007"            => { translation => $locale->text("USTVA 2007"),                tex => 1 },
+        ustva                   => $locale->text("USTVA"),
       );
 
     my (@values, $file, $setup);
index 1196763..173f8b6 100644 (file)
@@ -59,14 +59,6 @@ sub assert_bp_access {
   if ($form->{type} && $access_map{$form->{type}}) {
     $main::auth->assert($access_map{$form->{type}});
 
-  } elsif ($form->{type} eq 'packing_list') {
-    $main::lxdebug->message(0, "1");
-    if (!$main::auth->assert('sales_order_edit', 1)) {
-    $main::lxdebug->message(0, "2");
-      $main::auth->assert('invoice_edit') ;
-    }
-    $main::lxdebug->message(0, "3");
-
   } else {
     $main::auth->assert('DOES_NOT_EXIST');
   }
@@ -84,7 +76,6 @@ sub search {
   assert_bp_access();
 
   # $locale->text('Sales Invoices')
-  # $locale->text('Packing Lists')
   # $locale->text('Sales Orders')
   # $locale->text('Purchase Orders')
   # $locale->text('Quotations')
@@ -109,8 +100,6 @@ sub search {
   my %label = (
        invoice =>
          { title => 'Sales Invoices', name => 'Customer', l_invnumber => 'Y' },
-       packing_list =>
-         { title => 'Packing Lists', name => 'Customer', l_invnumber => 'Y' },
        sales_order =>
          { title => 'Sales Orders', name => 'Customer', l_ordnumber => 'Y' },
        purchase_order =>
@@ -148,8 +137,6 @@ sub search {
         </tr>
 |;
 
-  $label{packing_list}{invnumber}      = $label{invoice}{invnumber};
-  $label{packing_list}{ordnumber}      = $label{invoice}{ordnumber};
   $label{sales_order}{ordnumber}       = $label{invoice}{ordnumber};
   $label{purchase_order}{ordnumber}    = $label{invoice}{ordnumber};
   $label{request_quotation}{quonumber} = $label{sales_quotation}{quonumber};
@@ -476,9 +463,6 @@ sub list_spool {
   my $name = ucfirst $form->{vc};
 
   my @columns = qw(transdate);
-  if ($form->{type} =~ /(invoice|packing_list|check|receipt)/) {
-    push @columns, "invnumber";
-  }
   if ($form->{type} =~ /_order$/) {
     push @columns, "ordnumber";
   }
index 0b3dfab..b50fe4e 100644 (file)
@@ -1151,7 +1151,6 @@ sub print_options {
     ) : undef,
     ($form->{type} eq 'invoice' && $form->{storno}) ? (
       opthash("storno_invoice",      $form->{PD}{storno_invoice},      $locale->text('Storno Invoice')),
-      opthash("storno_packing_list", $form->{PD}{storno_packing_list}, $locale->text('Storno Packing List'))
     ) : undef,
     ($form->{type} =~ /_delivery_order$/) ? (
       opthash($form->{type},         $form->{PD}{$form->{type}},       $locale->text('Delivery Order')),
@@ -1297,11 +1296,6 @@ sub print_form {
   if ($form->{formname} eq "invoice") {
     $form->{label} = $locale->text('Invoice');
   }
-  if ($form->{formname} eq "packing_list") {
-
-    # this is from an invoice
-    $form->{label} = $locale->text('Packing List');
-  }
   if ($form->{formname} eq 'sales_order') {
     $inv                  = "ord";
     $due                  = "req";
@@ -1331,17 +1325,6 @@ sub print_form {
     $order                = 1;
   }
 
-  if ($form->{formname} eq 'packing_list' && $form->{type} ne 'invoice') {
-
-    # we use the same packing list as from an invoice
-    $inv = "ord";
-    $due = "req";
-    $form->{invdate} = $form->{"${inv}date"} = $form->{transdate};
-    $form->{label} = $locale->text('Packing List');
-    $order = 1;
-    # set invnumber for template packing_list
-    $form->{invnumber}   = $form->{ordnumber};
-  }
   if ($form->{formname} eq 'purchase_order') {
     $inv                  = "ord";
     $due                  = "req";
@@ -1402,8 +1385,6 @@ sub print_form {
 
   # $locale->text('Invoice Number missing!')
   # $locale->text('Invoice Date missing!')
-  # $locale->text('Packing List Number missing!')
-  # $locale->text('Packing List Date missing!')
   # $locale->text('Order Number missing!')
   # $locale->text('Order Date missing!')
   # $locale->text('Quotation Number missing!')
index 9ec9bec..b38cfd1 100644 (file)
@@ -266,6 +266,8 @@ sub prepare_invoice {
 
       $form->{"qty_$i"}        = $form->format_amount(\%myconfig, $form->{"qty_$i"}, $dec_qty);
 
+      $form->{"sellprice_pg_$i"} = join ('--', $form->{"sellprice_$i"}, $form->{"pricegroup_id_$i"});
+
       $form->{rowcount}        = $i;
 
     }
@@ -423,9 +425,17 @@ sub form_footer {
   $form->{paidaccounts}++ if ($form->{"paid_$form->{paidaccounts}"});
   $form->{paid_indices} = [ 1 .. $form->{paidaccounts} ];
 
+  # Standard Konto für Umlaufvermögen
+  my $accno_arap = IS->get_standard_accno_current_assets(\%myconfig, \%$form);
+
   for my $i (1 .. $form->{paidaccounts}) {
     $form->{"selectAR_paid_$i"} = $form->{selectAR_paid};
-    $form->{"selectAR_paid_$i"} =~ s/option>\Q$form->{"AR_paid_$i"}\E/option selected>$form->{"AR_paid_$i"}/;
+    if (!$form->{"AR_paid_$i"}) {
+      $form->{"selectAR_paid_$i"} =~ s/option>$accno_arap--(.*?)</option selected>$accno_arap--$1</;
+    } else {
+      $form->{"selectAR_paid_$i"} =~ s/option>\Q$form->{"AR_paid_$i"}\E/option selected>$form->{"AR_paid_$i"}/;
+    }
+
     $totalpaid += $form->{"paid_$i"};
   }
 
index f25d637..f7bc612 100644 (file)
@@ -2,6 +2,8 @@
 # -*- coding: utf-8; -*-
 # vim: fenc=UTF-8
 
+use utf8;
+
 # These are all the texts to build the translations files.
 # The file has the form of 'english text'  => 'foreign text',
 # you can add the translation in this file or in the 'missing' file
@@ -153,7 +155,6 @@ $self->{texts} = {
   'Add bank account'            => 'Bankkonto erfassen',
   'Add custom variable'         => 'Benutzerdefinierte Variable erfassen',
   'Add note'                    => 'Notiz erfassen',
-  'Add to group'                => 'Zu Gruppe hinzufügen',
   'Add unit'                    => 'Einheit hinzuf&uuml;gen',
   'Address'                     => 'Adresse',
   'Administration'              => 'Administration',
@@ -224,6 +225,7 @@ $self->{texts} = {
   'Authentification tables creation' => 'Anlegen der Tabellen zur Benutzerauthentifizierung',
   'Auto Send?'                  => 'Auto. Versand?',
   'Automatically created invoice for fee and interest for dunning %s' => 'Automatisch erzeugte Rechnung für Gebühren und Zinsen zu Mahnung %s',
+  'Available'                   => 'Verfügbar',
   'Available qty'               => 'Lagerbestand',
   'BALANCE SHEET'               => 'BILANZ',
   'BIC'                         => 'BIC',
@@ -1011,8 +1013,6 @@ $self->{texts} = {
   'May '                        => 'Mai',
   'May set the BCC field when sending emails' => 'Beim Verschicken von Emails das Feld \'BCC\' setzen',
   'Medium Number'               => 'Datentr&auml;gernummer',
-  'Members not of'              => 'Benutzer nicht in Gruppe',
-  'Members of'                  => 'Benutzer in Gruppe',
   'Memo'                        => 'Memo',
   'Menu'                        => 'Men&uuml;',
   'Message'                     => 'Nachricht',
@@ -1103,7 +1103,7 @@ $self->{texts} = {
   'Not done yet'                => 'Noch nicht fertig',
   'Not obsolete'                => 'Gültig',
   'Note'                        => 'Hinweis',
-  'Note: Taxkeys must have a "valid from" date, and will not be in effect otherwise.' => 'Achtung: Steuerschlüssel brauchen ein gültiges "Gültig ab"-Datum und werden andernfalls ignoriert.',
+  'Note: Taxkeys must have a "valid from" date, and will not behave correctly without.' => '',
   'Notes'                       => 'Bemerkungen',
   'Notes (will appear on hard copy)' => 'Bemerkungen',
   'Nothing has been selected for removal.' => 'Es wurde nichts f&uuml;r eine Entnahme ausgew&auml;hlt.',
@@ -1171,9 +1171,6 @@ $self->{texts} = {
   'POSTED'                      => 'Gebucht',
   'POSTED AS NEW'               => 'Als neu gebucht',
   'PRINTED'                     => 'Gedruckt',
-  'Packing List'                => 'Packliste',
-  'Packing List Date missing!'  => 'Datum für Packliste fehlt!',
-  'Packing List Number missing!' => 'Packlistennummer fehlt!',
   'Packing Lists'               => 'Lieferschein',
   'Page #1/#2'                  => 'Seite #1/#2',
   'Paid'                        => 'bezahlt',
@@ -1452,6 +1449,7 @@ $self->{texts} = {
   'Select the checkboxes that match users to the groups they should belong to.' => 'W&auml;hlen Sie diejenigen Checkboxen aus, die die Benutzer zu den gew&uuml;schten Gruppen zuordnen.',
   'Select type of removal'      => 'Grund der Entnahme ausw&auml;hlen',
   'Select type of transfer'     => 'Grund der Umlagerung ausw&auml;hlen',
+  'Selected'                    => 'Ausgewählt',
   'Selection'                   => 'Auswahlbox',
   'Selection fields: The option field must contain the available options for the selection. Options are separated by \'##\', for example \'Early##Normal##Late\'.' => 'Auswahlboxen: Das Optionenfeld muss die f&uuml;r die Auswahl verf&uuml;gbaren Eintr&auml;ge enthalten. Die Eintr&auml;ge werden mit \'##\' voneinander getrennt. Beispiel: \'Fr&uuml;h##Normal##Sp&auml;t\'.',
   'Sell Price'                  => 'Verkaufspreis',
@@ -1520,7 +1518,6 @@ $self->{texts} = {
   'Storno'                      => 'Storno',
   'Storno (one letter abbreviation)' => 'S',
   'Storno Invoice'              => 'Stornorechnung',
-  'Storno Packing List'         => 'Stornolieferschein',
   'Street'                      => 'Straße',
   'Stylesheet'                  => 'Stilvorlage',
   'Subject'                     => 'Betreff',
@@ -2028,9 +2025,8 @@ $self->{texts} = {
   'open'                        => 'Offen',
   'order'                       => 'Reihenfolge',
   'our vendor number at customer' => 'Unsere Lieferanten-Nr. beim Kunden',
-  'packing_list'                => 'Versandliste',
   'part_list'                   => 'warenliste',
-  'pick_list'                   => 'Entnahmeliste',
+  'pick_list'                   => 'Sammelliste',
   'plural first char'           => 'P',
   'pos_bilanz'                  => 'Bilanz',
   'pos_bwa'                     => 'BWA',
index 0b1f889..f96523a 100644 (file)
@@ -33,7 +33,7 @@ order=< > \n
 \n=<br>
 
 [Template/LaTeX]
-order=\\ <pagebreak> & \n \r " $ % _ # ^ { } < > £ ± \xe1 ² ³ °
+order=\\ <pagebreak> & \n \r " $ % _ # ^ { } < > £ ± \xe1 ² ³ ° § ® ©
 \\=\\textbackslash\s
 <pagebreak>=
 "=''
@@ -55,6 +55,9 @@ _=\\_
 ²=$^2$
 ³=$^3$
 °=$^\\circ$
+§=\\S
+®=\\textregistered
+©=\\textcopyright
 
 [Template/OpenDocument]
 order=& < > " ' \x80 \n \r
index 59a2e74..16db51a 100644 (file)
@@ -2,6 +2,8 @@
 # -*- coding: utf-8; -*-
 # vim: fenc=UTF-8
 
+use utf8;
+
 # These are all the texts to build the translations files.
 # The file has the form of 'english text'  => 'foreign text',
 # you can add the translation in this file or in the 'missing' file
index e562295..461e7dc 100644 (file)
@@ -2,6 +2,8 @@
 # -*- coding: utf-8; -*-
 # vim: fenc=UTF-8
 
+use utf8;
+
 # These are all the texts to build the translations files.
 # The file has the form of 'english text'  => 'foreign text',
 # you can add the translation in this file or in the 'missing' file
index 25579c3..16f2b3e 100755 (executable)
@@ -31,6 +31,7 @@ parse_args();
 my $basedir      = "../..";
 my $locales_dir  = ".";
 my $bindir       = "$basedir/bin/mozilla";
+my @progdirs     = ( "$basedir/SL/Template/Plugin" );
 my $dbupdir      = "$basedir/sql/Pg-upgrade";
 my $dbupdir2     = "$basedir/sql/Pg-upgrade2";
 my $menufile     = "menu.ini";
@@ -42,11 +43,17 @@ my ($ALL_HEADER, $MISSING_HEADER, $LOST_HEADER);
 init();
 
 opendir DIR, "$bindir" or die "$!";
-my @progfiles = grep { /\.pl$/ && !/(_custom|^\.)/ } readdir DIR;
+my @progfiles = map { [ $_, $bindir ] } grep { /\.pl$/ && !/(_custom|^\.)/ } readdir DIR;
 seekdir DIR, 0;
 my @customfiles = grep /_custom/, readdir DIR;
 closedir DIR;
 
+foreach my $dir (@progdirs) {
+  opendir DIR, $dir or die "$!";
+  push @progfiles, map { [ $_, $dir ] } grep { /\.pm$/ } readdir DIR;
+  closedir DIR;
+}
+
 # put customized files into @customfiles
 my @menufiles;
 
@@ -91,7 +98,7 @@ chomp $charset;
 
 my %old_texts = %{ $self->{texts} || {} };
 
-map({ handle_file($_, $bindir); } @progfiles);
+map({ handle_file(@{ $_ }); } @progfiles);
 map({ handle_file($_, $dbupdir); } @dbplfiles);
 map({ handle_file($_, $dbupdir2); } @dbplfiles2);
 
@@ -283,11 +290,11 @@ sub extract_text_between_parenthesis {
 
     } else {
       if ($quote_next) {
+        $text .= '\\' unless $cur_char eq "'";
         $text .= $cur_char;
         $quote_next = 0;
 
       } elsif ($cur_char eq '\\') {
-        $text .= $cur_char;
         $quote_next = 1;
 
       } elsif ($cur_char eq $inside_string) {
@@ -600,12 +607,12 @@ sub generate_file {
   my $data_name = $params{data_name};
   my @delim     = split //, ($params{delim} || '{}');
 
-  open my $fh, '>', $file or die "$! : $file";
+  open my $fh, '>:encoding(utf8)', $file or die "$! : $file";
 
   $charset =~ s/\r?\n//g;
   my $emacs_charset = lc $charset;
 
-  print $fh "#!/usr/bin/perl\n# -*- coding: $emacs_charset; -*-\n# vim: fenc=$charset\n\n";
+  print $fh "#!/usr/bin/perl\n# -*- coding: $emacs_charset; -*-\n# vim: fenc=$charset\n\nuse utf8;\n\n";
   print $fh $header, "\n" if $header;
   print $fh "$data_name = $delim[0]\n" if $data_name;
 
index 41cbf72..af71026 100644 (file)
@@ -6,10 +6,7 @@
   <p class="message_ok">[% message %]</p>
   [% END %]
 
-  <form method="post" action="admin.pl">
-     <input type="hidden" name="back_nextsub" value="list_users">
-    <p><input type="submit" class="submit" name="action" value="[% 'Back' | $T8 %]"></p>
-  </form>
+  <p><a href="admin.pl?action=login">[% 'Back' | $T8 %]</a></p>
 
  <div class="listheading">[% 'Add a new group' | $T8 %]</div>
  <form method="post" action="admin.pl">
@@ -25,8 +22,6 @@
 
 
  <form name="Form" method="post" action="admin.pl">
-
-
   <div class="listheading">[% 'Edit and delete a group' | $T8 %]</div>
 
   [% IF num_groups %]
@@ -48,7 +43,6 @@
    <input type="submit" class="submit" name="action" value="[% 'Edit' | $T8 %]">
    <input type="submit" class="submit" name="action" value="[% 'Delete' | $T8 %]">
    [% END %]
-   <input type="hidden" name="back_nextsub" value="list_users">
   </p>
  </form>
 
index 6ccb7a2..6252ee1 100644 (file)
@@ -143,7 +143,7 @@ window.onload = function() {
   <legend>
     [% 'Taxkeys and Taxreport Preferences' | $T8 %]
   </legend>
-  <p style='font-weight:normal'>[% 'Note: Taxkeys must have a "valid from" date, and will not be in effect otherwise.' | $T8 %]</p>
+  <p style='font-weight:normal'>[% 'Note: Taxkeys must have a "valid from" date, and will not behave correctly without.' | $T8 %]</p>
 
             <table>
 [% IF account_exists %]