Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b4089f8d

Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt

  • ID b4089f8ded1d7a2b81837107fa90a861d29b7d5e
  • Vorgänger 84bed7a6
  • Nachfolger 6bad0469

Bearbeiten von Vorlagen: Es können jetzt die Vorlagen für alle konfigurierten Mahnstufen bearbeitet werden.

Unterschiede anzeigen:

SL/Form.pm
1574 1574
  $main::lxdebug->leave_sub();
1575 1575
}
1576 1576

  
1577
sub _get_dunning_configs {
1578
  $main::lxdebug->enter_sub();
1579

  
1580
  my ($self, $dbh, $key) = @_;
1581

  
1582
  $key = "all_dunning_configs" unless ($key);
1583

  
1584
  my $query = qq|SELECT * FROM dunning_config ORDER BY dunning_level|;
1585

  
1586
  $self->{$key} = selectall_hashref_query($self, $dbh, $query);
1587

  
1588
  $main::lxdebug->leave_sub();
1589
}
1590

  
1577 1591
sub get_lists {
1578 1592
  $main::lxdebug->enter_sub();
1579 1593

  
......
1628 1642
    $self->_get_business_types($dbh, $params{"business_types"});
1629 1643
  }
1630 1644

  
1645
  if ($params{"dunning_configs"}) {
1646
    $self->_get_dunning_configs($dbh, $params{"dunning_configs"});
1647
  }
1648

  
1631 1649
  $dbh->disconnect();
1632 1650

  
1633 1651
  $main::lxdebug->leave_sub();
......
1910 1928
           d.description AS department,
1911 1929
           e.name AS employee
1912 1930
         FROM $arap a
1913
         JOIN $table c ON (a.${table}_id = c.id)
1931
         LEFT JOIN $table c ON (a.${table}_id = c.id)
1914 1932
         LEFT JOIN employee e ON (e.id = a.employee_id)
1915 1933
         LEFT JOIN department d ON (d.id = a.department_id)
1916 1934
         WHERE a.id = ?|;
......
1927 1945

  
1928 1946
    # now get the account numbers
1929 1947
     $query = qq|SELECT c.accno, c.description, c.link, c.taxkey_id, tk.tax_id
1930
                 FROM chart c, taxkeys tk
1948
                 FROM chart c
1949
                 LEFT JOIN taxkeys tk ON (tk.chart_id = c.id)
1931 1950
                 WHERE c.link LIKE ? 
1932
                   AND (    tk.chart_id = c.id OR     c.link LIKE '%_tax%') 
1933
                   AND (NOT tk.chart_id = c.id OR NOT c.link LIKE '%_tax%')
1934 1951
                   AND (tk.id = (SELECT id FROM taxkeys WHERE taxkeys.chart_id = c.id AND startdate <= $transdate ORDER BY startdate DESC LIMIT 1)
1935 1952
                     OR c.link LIKE '%_tax%')
1936 1953
                 ORDER BY c.accno|;
1937 1954

  
1955
    dump_query(0, "wuff", $query, '%$module%');
1956

  
1938 1957
    $sth = $dbh->prepare($query);
1939 1958
    do_statement($self, $sth, $query, "%$module%");
1940 1959

  
bin/mozilla/amtemplates.pl
107 107
    # Setup "formname" selection
108 108
    #
109 109

  
110
    $form->get_lists("printers" => "ALL_PRINTERS",
111
                     "languages" => "ALL_LANGUAGES",
112
                     "dunning_configs" => "ALL_DUNNING_CONFIGS");
113

  
110 114
    my %formname_setup =
111 115
      (
112
       "balance_sheet" => { "translation" => $locale->text('Balance Sheet'), "html" => 1 },
113
       "bin_list" => $locale->text('Bin List'),
114
       "bwa" => { "translation" => $locale->text('BWA'), "html" => 1 },
115
       "check" => { "translation" => $locale->text('Check'), "html" => 1 },
116
       "credit_note" => $locale->text('Credit Note'),
117
       "income_statement" => { "translation" => $locale->text('Income Statement'), "html" => 1 },
118
       "invoice" => $locale->text('Invoice'),
119
       "packing_list" => $locale->text('Packing List'),
120
       "pick_list" => $locale->text('Pick List'),
121
       "proforma" => $locale->text('Proforma Invoice'),
122
       "purchase_order" => $locale->text('Purchase Order'),
123
       "receipt" => { "translation" => $locale->text('Receipt'), "tex" => 1 },
124
       "request_quotation" => $locale->text('RFQ'),
125
       "sales_order" => $locale->text('Confirmation'),
126
       "sales_quotation" => $locale->text('Quotation'),
127
       "statement" => $locale->text('Statement'),
128
       "storno_invoice" => $locale->text('Storno Invoice'),
129
       "storno_packing_list" => $locale->text('Storno Packing List'),
130
       "ustva-2004" => { "translation" => $locale->text("USTVA 2004"), "tex" => 1 },
131
       "ustva-2005" => { "translation" => $locale->text("USTVA 2005"), "tex" => 1 },
132
       "ustva-2006" => { "translation" => $locale->text("USTVA 2006"), "tex" => 1 },
133
       "ustva-2007" => { "translation" => $locale->text("USTVA 2007"), "tex" => 1 },
134
       "ustva" => $locale->text("USTVA"),
135
       "zahlungserinnerung" => $locale->text('Payment Reminder'),
116
        "balance_sheet" => { "translation" => $locale->text('Balance Sheet'), "html" => 1 },
117
        "bin_list" => $locale->text('Bin List'),
118
        "bwa" => { "translation" => $locale->text('BWA'), "html" => 1 },
119
        "check" => { "translation" => $locale->text('Check'), "html" => 1 },
120
        "credit_note" => $locale->text('Credit Note'),
121
        "income_statement" => { "translation" => $locale->text('Income Statement'), "html" => 1 },
122
        "invoice" => $locale->text('Invoice'),
123
        "packing_list" => $locale->text('Packing List'),
124
        "pick_list" => $locale->text('Pick List'),
125
        "proforma" => $locale->text('Proforma Invoice'),
126
        "purchase_order" => $locale->text('Purchase Order'),
127
        "receipt" => { "translation" => $locale->text('Receipt'), "tex" => 1 },
128
        "request_quotation" => $locale->text('RFQ'),
129
        "sales_order" => $locale->text('Confirmation'),
130
        "sales_quotation" => $locale->text('Quotation'),
131
        "statement" => $locale->text('Statement'),
132
        "storno_invoice" => $locale->text('Storno Invoice'),
133
        "storno_packing_list" => $locale->text('Storno Packing List'),
134
        "ustva-2004" => { "translation" => $locale->text("USTVA 2004"), "tex" => 1 },
135
        "ustva-2005" => { "translation" => $locale->text("USTVA 2005"), "tex" => 1 },
136
        "ustva-2006" => { "translation" => $locale->text("USTVA 2006"), "tex" => 1 },
137
        "ustva-2007" => { "translation" => $locale->text("USTVA 2007"), "tex" => 1 },
138
        "ustva" => $locale->text("USTVA"),
136 139
      );
137 140

  
138 141
    my (@values, $file, $setup);
......
146 149
             "default" => $file eq $form->{"formname"} });
147 150
    }
148 151

  
152
    # "zahlungserinnerung" => $locale->text('Payment Reminder'),
153

  
154
    foreach my $ref (@{ $form->{"ALL_DUNNING_CONFIGS"} }) {
155
      next if !$ref->{"template"};
156

  
157
      push(@values,
158
           { "value"   => $ref->{"template"},
159
             "label"   => $locale->text('Payment Reminder') . ": " . $ref->{"dunning_description"},
160
             "default" => $ref->{"template"} eq $form->{"formname"} });
161
    }
162

  
149 163
    @values = sort({ $a->{"label"} cmp $b->{"label"} } @values);
150 164

  
151 165
    $options{"FORMNAME"} = [ @values ];
......
154 168
    # Setup "language" selection
155 169
    #
156 170

  
157
    $form->get_lists("printers" => "ALL_PRINTERS",
158
                     "languages" => "ALL_LANGUAGES");
159

  
160 171
    @values = ( { "value" => "", "label" => "", "default" => 0 } );
161 172

  
162 173
    foreach my $item (@{ $form->{"ALL_LANGUAGES"} }) {

Auch abrufbar als: Unified diff