Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision d7ee4bed

Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt

  • ID d7ee4bed6eb13c63bc359df124c11ee8e38f76a3
  • Vorgänger 27e3ec0d
  • Nachfolger 98b16fdb

Rechnungsbericht: Lieferadresse anzeigen und filtern

Unterschiede anzeigen:

SL/AR.pm
526 526
    qq|  tz.description AS taxzone, | .
527 527
    qq|  pt.description AS payment_terms, | .
528 528
    qq|  d.description AS department, | .
529
    qq|  s.shiptoname, s.shiptodepartment_1, s.shiptodepartment_2, | .
530
    qq|  s.shiptostreet, s.shiptozipcode, s.shiptocity, s.shiptocountry, | .
529 531
    qq{  ( SELECT ch.accno || ' -- ' || ch.description
530 532
           FROM acc_trans at
531 533
           LEFT JOIN chart ch ON ch.id = at.chart_id
......
543 545
    qq|LEFT JOIN tax_zones tz ON (tz.id = a.taxzone_id)| .
544 546
    qq|LEFT JOIN payment_terms pt ON (pt.id = a.payment_id)| .
545 547
    qq|LEFT JOIN business b ON (b.id = c.business_id)| .
548
    qq|LEFT JOIN shipto s ON (
549
        (a.shipto_id = s.shipto_id) or
550
        (a.id = s.trans_id and s.module = 'AR')
551
       )| .
546 552
    qq|LEFT JOIN department d ON (d.id = a.department_id)|;
547 553

  
548 554
  my $where = "1 = 1";
......
711 717
    $where .= ' AND COALESCE(paid_difference.amount, 0) + a.paid != 0';
712 718
  }
713 719

  
720
  if ($form->{shiptoname}) {
721
    $where .= " AND s.shiptoname ILIKE ?";
722
    push(@values, like($form->{shiptoname}));
723
  }
724
  if ($form->{shiptodepartment_1}) {
725
    $where .= " AND s.shiptodepartment_1 ILIKE ?";
726
    push(@values, like($form->{shiptodepartment_1}));
727
  }
728
  if ($form->{shiptodepartment_2}) {
729
    $where .= " AND s.shiptodepartment_2 ILIKE ?";
730
    push(@values, like($form->{shiptodepartment_2}));
731
  }
732
  if ($form->{shiptostreet}) {
733
    $where .= " AND s.shiptostreet ILIKE ?";
734
    push(@values, like($form->{shiptostreet}));
735
  }
736
  if ($form->{shiptozipcode}) {
737
    $where .= " AND s.shiptozipcode ILIKE ?";
738
    push(@values, like($form->{shiptozipcode}));
739
  }
740
  if ($form->{shiptocity}) {
741
    $where .= " AND s.shiptocity ILIKE ?";
742
    push(@values, like($form->{shiptocity}));
743
  }
744
  if ($form->{shiptocountry}) {
745
    $where .= " AND s.shiptocountry ILIKE ?";
746
    push(@values, like($form->{shiptocountry}));
747
  }
748

  
714 749
  my ($cvar_where, @cvar_values) = CVar->build_filter_query('module'         => 'CT',
715 750
                                                            'trans_id_field' => 'c.id',
716 751
                                                            'filter'         => $form,
bin/mozilla/ar.pl
1068 1068

  
1069 1069
  my $report = SL::ReportGenerator->new(\%myconfig, $form);
1070 1070

  
1071
  @columns =
1072
    qw(ids transdate id type invnumber ordnumber cusordnumber donumber deliverydate name netamount tax amount paid
1073
       datepaid due duedate transaction_description notes salesman employee shippingpoint shipvia
1074
       marge_total marge_percent globalprojectnumber customernumber country ustid taxzone
1075
       payment_terms charts customertype direct_debit dunning_description department attachments
1076
       items customer_dunning_lock);
1071
  @columns = qw(
1072
    ids transdate id type invnumber ordnumber cusordnumber donumber
1073
    deliverydate name netamount tax amount paid datepaid due duedate
1074
    transaction_description notes salesman employee shippingpoint shipvia
1075
    marge_total marge_percent globalprojectnumber customernumber country
1076
    ustid taxzone payment_terms charts customertype direct_debit
1077
    dunning_description department attachments items customer_dunning_lock
1078
    shiptoname shiptodepartment_1 shiptodepartment_2 shiptostreet
1079
    shiptozipcode shiptocity shiptocountry
1080
  );
1077 1081

  
1078 1082
  my $ct_cvar_configs                 = CVar->get_configs('module' => 'CT');
1079 1083
  my @ct_includeable_custom_variables = grep { $_->{includeable} } @{ $ct_cvar_configs };
......
1083 1087
  push @columns, map { "cvar_$_->{name}" } @ct_includeable_custom_variables;
1084 1088

  
1085 1089
  my @hidden_variables = map { "l_${_}" } @columns;
1086
  push @hidden_variables, "l_subtotal", qw(open closed customer invnumber ordnumber cusordnumber transaction_description notes project_id
1087
                                           transdatefrom transdateto duedatefrom duedateto datepaidfrom datepaidto
1088
                                           employee_id salesman_id business_id parts_partnumber parts_description department_id show_marked_as_closed show_not_mailed
1089
                                           shippingpoint shipvia taxzone_id payment_id);
1090
  push @hidden_variables, "l_subtotal", qw(
1091
    open closed customer invnumber ordnumber cusordnumber
1092
    transaction_description notes project_id transdatefrom transdateto
1093
    duedatefrom duedateto datepaidfrom datepaidto employee_id salesman_id
1094
    business_id parts_partnumber parts_description department_id
1095
    show_marked_as_closed show_not_mailed shippingpoint shipvia taxzone_id
1096
    payment_id shiptoname shiptodepartment_1 shiptodepartment_2 shiptostreet
1097
    shiptozipcode shiptocity shiptocountry
1098
  );
1090 1099
  push @hidden_variables, map { "cvar_$_->{name}" } @ct_searchable_custom_variables;
1091 1100

  
1092 1101
  $href =  $params{want_binary_pdf} ? '' : build_std_url('action=ar_transactions', grep { $form->{$_} } @hidden_variables);
......
1131 1140
    attachments               => { 'text' => $locale->text('Attachments'), },
1132 1141
    items                     => { 'text' => $locale->text('Positions'), },
1133 1142
    customer_dunning_lock     => { 'text' => $locale->text('Dunning lock'), },
1143
    shiptoname                => { 'text' => $locale->text('Name (Shipping)'), },
1144
    shiptodepartment_1        => { 'text' => $locale->text('Department 1 (Shipping)'), },
1145
    shiptodepartment_2        => { 'text' => $locale->text('Department 2 (Shipping)'), },
1146
    shiptostreet              => { 'text' => $locale->text('Street (Shipping)'), },
1147
    shiptozipcode             => { 'text' => $locale->text('Zipcode (Shipping)'), },
1148
    shiptocity                => { 'text' => $locale->text('City (Shipping)'), },
1149
    shiptocountry             => { 'text' => $locale->text('Country (Shipping)'), },
1134 1150
    %column_defs_cvars,
1135 1151
  );
1136 1152

  
......
1234 1250
  if ($form->{shippingpoint}) {
1235 1251
    push @options, $locale->text('Shipping Point') . " : $form->{shippingpoint}";
1236 1252
  }
1237

  
1253
  if ($form->{shiptoname}) {
1254
    push @options, $locale->text('Name (Shipping)') . " : $form->{shiptoname}";
1255
  }
1256
  if ($form->{shiptodepartment_1}) {
1257
    push @options, $locale->text('Department 1 (Shipping)') . " : $form->{shiptodepartment_1}";
1258
  }
1259
  if ($form->{shiptodepartment_2}) {
1260
    push @options, $locale->text('Department 2 (Shipping)') . " : $form->{shiptodepartment_2}";
1261
  }
1262
  if ($form->{shiptostreet}) {
1263
    push @options, $locale->text('Street (Shipping)') . " : $form->{shiptostreet}";
1264
  }
1265
  if ($form->{shiptozipcode}) {
1266
    push @options, $locale->text('Zipcode (Shipping)') . " : $form->{shiptozipcode}";
1267
  }
1268
  if ($form->{shiptocity}) {
1269
    push @options, $locale->text('City (Shipping)') . " : $form->{shiptocity}";
1270
  }
1271
  if ($form->{shiptocountry}) {
1272
    push @options, $locale->text('Country (Shipping)') . " : $form->{shiptocountry}";
1273
  }
1238 1274

  
1239 1275
  $form->{ALL_PRINTERS} = SL::DB::Manager::Printer->get_all_sorted;
1240 1276

  
locale/de/all
734 734
  'Choose a Tax Number'         => 'Bitte eine Steuernummer angeben',
735 735
  'Choose bank account for reconciliation' => 'Wählen Sie das Bankkonto für den Kontenabgleich',
736 736
  'City'                        => 'Stadt',
737
  'City (Shipping)'             => 'Stadt (Lieferung)',
737 738
  'Classification'              => 'Klassifizierung',
738 739
  'Clear'                       => 'Löschen',
739 740
  'Clear fields'                => 'Felder leeren',
......
836 837
  'Could not spawn the printer command.' => 'Die Druckanwendung konnte nicht gestartet werden.',
837 838
  'Could not update prices!'    => 'Preise konnten nicht aktualisiert werden!',
838 839
  'Country'                     => 'Land',
840
  'Country (Shipping)'          => 'Land (Lieferung)',
839 841
  'Create'                      => 'Anlegen',
840 842
  'Create Chart of Accounts'    => 'Zu verwendender Kontenplan',
841 843
  'Create Dataset'              => 'Neue Datenbank anlegen',
......
1180 1182
  'Department (database ID)'    => 'Abeilung (Datenbank-ID)',
1181 1183
  'Department (description)'    => 'Abteilung (Beschreibung)',
1182 1184
  'Department 1'                => 'Abteilung (1)',
1185
  'Department 1 (Shipping)'     => 'Abteilung (1) (Lieferung)',
1183 1186
  'Department 2'                => 'Abteilung (2)',
1187
  'Department 2 (Shipping)'     => 'Abteilung (2) (Lieferung)',
1184 1188
  'Department Description'      => 'Abteilungbeschreibung',
1185 1189
  'Departments'                 => 'Abteilungen',
1186 1190
  'Dependencies'                => 'Abhängigkeiten',
......
2344 2348
  'Multiple addresses can be entered separated by commas.' => 'Mehrere Adressen können durch Kommata getrennt angegeben werden.',
2345 2349
  'MwSt. inkl.'                 => 'MwSt. inkl.',
2346 2350
  'Name'                        => 'Name',
2351
  'Name (Shipping)'             => 'Name (Lieferung)',
2347 2352
  'Name 2'                      => 'Name 2',
2348 2353
  'Name 3'                      => 'Name 3',
2349 2354
  'Name and Address'            => 'Name & Adresse',
......
3666 3671
  'Storno (one letter abbreviation)' => 'S',
3667 3672
  'Storno Invoice'              => 'Stornorechnung',
3668 3673
  'Street'                      => 'Straße',
3674
  'Street (Shipping)'           => 'Straße (Lieferung)',
3669 3675
  'Street 1'                    => 'Straße 1',
3670 3676
  'Street 2'                    => 'Straße 2',
3671 3677
  'Strict and halt'             => 'Strikt und Abbruch',
......
4760 4766
  'Zip'                         => 'PLZ',
4761 4767
  'Zip, City'                   => 'PLZ, Ort',
4762 4768
  'Zipcode'                     => 'PLZ',
4769
  'Zipcode (Shipping)'          => 'PLZ (Lieferung)',
4763 4770
  'Zipcode and city'            => 'PLZ und Stadt',
4764 4771
  '[email]'                     => '[email]',
4765 4772
  'absolute'                    => 'absolut',
locale/en/all
732 732
  'Choose a Tax Number'         => '',
733 733
  'Choose bank account for reconciliation' => '',
734 734
  'City'                        => '',
735
  'City (Shipping)'             => '',
735 736
  'Classification'              => '',
736 737
  'Clear'                       => '',
737 738
  'Clear fields'                => '',
......
833 834
  'Could not spawn the printer command.' => '',
834 835
  'Could not update prices!'    => '',
835 836
  'Country'                     => '',
837
  'Country (Shipping)'          => '',
836 838
  'Create'                      => '',
837 839
  'Create Chart of Accounts'    => '',
838 840
  'Create Dataset'              => '',
......
1177 1179
  'Department (database ID)'    => '',
1178 1180
  'Department (description)'    => '',
1179 1181
  'Department 1'                => '',
1182
  'Department 1 (Shipping)'     => '',
1180 1183
  'Department 2'                => '',
1184
  'Department 2 (Shipping)'     => '',
1181 1185
  'Department Description'      => '',
1182 1186
  'Departments'                 => '',
1183 1187
  'Dependencies'                => '',
......
2338 2342
  'Multiple addresses can be entered separated by commas.' => '',
2339 2343
  'MwSt. inkl.'                 => '',
2340 2344
  'Name'                        => '',
2345
  'Name (Shipping)'             => '',
2341 2346
  'Name 2'                      => '',
2342 2347
  'Name 3'                      => '',
2343 2348
  'Name and Address'            => '',
......
3659 3664
  'Storno (one letter abbreviation)' => '',
3660 3665
  'Storno Invoice'              => '',
3661 3666
  'Street'                      => '',
3667
  'Street (Shipping)'           => '',
3662 3668
  'Street 1'                    => '',
3663 3669
  'Street 2'                    => '',
3664 3670
  'Strict and halt'             => '',
......
4751 4757
  'Zip'                         => '',
4752 4758
  'Zip, City'                   => '',
4753 4759
  'Zipcode'                     => '',
4760
  'Zipcode (Shipping)'          => '',
4754 4761
  'Zipcode and city'            => '',
4755 4762
  '[email]'                     => '',
4756 4763
  'absolute'                    => '',
templates/design40_webpages/ar/search.html
126 126
      </tbody>
127 127
    </table>
128 128

  
129
    <table class="tbl-horizontal">
130
      <caption>[% 'Shipping Address' | $T8 %]</caption>
131
      <colgroup> <col class="wi-small"><col class="wi-wide"> </colgroup>
132
      <tbody>
133
        <tr>
134
          <th>[% 'Name' | $T8 %]</th>
135
          <td>[% L.input_tag("shiptoname", "") %]</td>
136
        </tr>
137
        <tr>
138
          <th>[% 'Department 1' | $T8 %]</th>
139
          <td>[% L.input_tag("shiptodepartment_1", "") %]</td>
140
        </tr>
141
        <tr>
142
          <th>[% 'Department 2' | $T8 %]</th>
143
          <td>[% L.input_tag("shiptodepartment_2", "") %]</td>
144
        </tr>
145
        <tr>
146
          <th>[% 'Street' | $T8 %]</th>
147
          <td>[% L.input_tag("shiptostreet", "") %]</td>
148
        </tr>
149
        <tr>
150
          <th>[% 'Zipcode' | $T8 %]</th>
151
          <td>[% L.input_tag("shiptozipcode", "") %]</td>
152
        </tr>
153
        <tr>
154
          <th>[% 'City' | $T8 %]</th>
155
          <td>[% L.input_tag("shiptocity", "") %]</td>
156
        </tr>
157
        <tr>
158
          <th>[% 'Country' | $T8 %]</th>
159
          <td>[% L.input_tag("shiptocountry", "") %]</td>
160
        </tr>
161
      </tbody>
162
    </table>
163

  
129 164
   <table class="tbl-horizontal">
130 165
     <caption>[% 'Status' | $T8 %]</caption>
131 166
     <colgroup> <col class="wi-small"><col class="wi-wide"> </colgroup>
......
217 252
      <input name="l_customer_dunning_lock" id="l_customer_dunning_lock" type="checkbox"><label for="l_customer_dunning_lock">[% 'Dunning lock' | $T8 %]</label>
218 253
    </div>
219 254
  </div>
255
  <div class="list col">
256
    <h4>[% 'Shipping Address' | $T8 %]</h4>
257
    <div>
258
      <input name="l_shiptoname" id="l_shiptoname" type="checkbox"><label for="l_shiptoname">[% 'Name' | $T8 %]</label>
259
    </div>
260
    <div>
261
      <input name="l_shiptodepartment_1" id="l_shiptodepartment_1" type="checkbox"><label for="l_shiptodepartment_1">[% 'Department 1' | $T8 %]</label>
262
    </div>
263
    <div>
264
      <input name="l_shiptodepartment_2" id="l_shiptodepartment_2" type="checkbox"><label for="l_shiptodepartment_2">[% 'Department 2' | $T8 %]</label>
265
    </div>
266
    <div>
267
      <input name="l_shiptostreet" id="l_shiptostreet" type="checkbox"><label for="l_shiptostreet">[% 'Street' | $T8 %]</label>
268
    </div>
269
    <div>
270
      <input name="l_shiptozipcode" id="l_shiptozipcode" type="checkbox"><label for="l_shiptozipcode">[% 'Zipcode' | $T8 %]</label>
271
    </div>
272
    <div>
273
      <input name="l_shiptocity" id="l_shiptocity" type="checkbox"><label for="l_shiptocity">[% 'City' | $T8 %]</label>
274
    </div>
275
    <div>
276
      <input name="l_shiptocountry" id="l_shiptocountry" type="checkbox"><label for="l_shiptocountry">[% 'Country' | $T8 %]</label>
277
    </div>
278
  </div>
220 279
  <div class="list col">
221 280
    <h4>[% 'Amounts' | $T8 %]</h4>
222 281
    <div>
templates/webpages/ar/search.html
65 65
      <th align="right">[% 'Ship via' | $T8 %]</th>
66 66
      <td>[% L.input_tag("shipvia", "", style=style) %]</td>
67 67
     </tr>
68
     <tr>
69
      <th align=right nowarp>[% 'Name (Shipping)' | $T8 %]</th>
70
      <td>[% L.input_tag("shiptoname", "", style=style) %]</td>
71
     </tr>
72
     <tr>
73
      <th align=right nowarp>[% 'Department 1 (Shipping)' | $T8 %]</th>
74
      <td>[% L.input_tag("shiptodepartment_1", "", style=style) %]</td>
75
     </tr>
76
     <tr>
77
      <th align=right nowarp>[% 'Department 2 (Shipping)' | $T8 %]</th>
78
      <td>[% L.input_tag("shiptodepartment_2", "", style=style) %]</td>
79
     </tr>
80
     <tr>
81
      <th align=right nowarp>[% 'Street (Shipping)' | $T8 %]</th>
82
      <td>[% L.input_tag("shiptostreet", "", style=style) %]</td>
83
     </tr>
84
     <tr>
85
      <th align=right nowarp>[% 'Zipcode (Shipping)' | $T8 %]</th>
86
      <td>[% L.input_tag("shiptozipcode", "", style=style) %]</td>
87
     </tr>
88
     <tr>
89
      <th align=right nowarp>[% 'City (Shipping)' | $T8 %]</th>
90
      <td>[% L.input_tag("shiptocity", "", style=style) %]</td>
91
     </tr>
92
     <tr>
93
      <th align=right nowarp>[% 'Country (Shipping)' | $T8 %]</th>
94
      <td>[% L.input_tag("shiptocountry", "", style=style) %]</td>
95
     </tr>
68 96
     <tr>
69 97
      <th align="right" nowrap>[% 'Payment Term' | $T8 %]</th>
70 98
      <td>[% L.select_tag('payment_id', ALL_PAYMENT_TERMS, with_empty=1, title_key="description", style=style) %]</td>
......
241 269
           <td align=right><input name="l_customer_dunning_lock" id="l_customer_dunning_lock" class=checkbox type=checkbox value=Y></td>
242 270
           <td nowrap>[% 'Dunning lock' | $T8 %]</td>
243 271
          </tr>
272
          <tr>
273
           <td colspan=4 align=left><b>[% 'Shipping Address' | $T8 %]</b></td>
274
          </tr>
275
          <tr>
276
           <td align=right><input name="l_shiptoname" id="l_shiptoname" type="checkbox"></td>
277
           <td nowrap>[% 'Name' | $T8 %]</td>
278
           <td align=right><input name="l_shiptodepartment_1" id="l_shiptodepartment_1" type="checkbox"></td>
279
           <td nowrap>[% 'Department 1' | $T8 %]</td>
280
           <td align=right><input name="l_shiptodepartment_2" id="l_shiptodepartment_2" type="checkbox"></td>
281
           <td nowrap>[% 'Department 2' | $T8 %]</td>
282
          </tr>
283
          <tr>
284
           <td align=right><input name="l_shiptostreet" id="l_shiptostreet" type="checkbox"></td>
285
           <td nowrap>[% 'Street' | $T8 %]</td>
286
           <td align=right><input name="l_shiptozipcode" id="l_shiptozipcode" type="checkbox"></td>
287
           <td nowrap>[% 'Zipcode' | $T8 %]</td>
288
           <td align=right><input name="l_shiptocity" id="l_shiptocity" type="checkbox"></td>
289
           <td nowrap>[% 'City' | $T8 %]</td>
290
           <td align=right><input name="l_shiptocountry" id="l_shiptocountry" type="checkbox"></td>
291
           <td nowrap>[% 'Country' | $T8 %]</td>
292
          </tr>
244 293

  
245 294
          <table>
246 295
            <tr><td align="right">

Auch abrufbar als: Unified diff