Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 65f7a07e

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID 65f7a07e4be81dde5698ecb2d7f01c324c054fb5
  • Vorgänger 06ec5141
  • Nachfolger e059f9cf

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
731 731
  'Choose a Tax Number'         => 'Bitte eine Steuernummer angeben',
732 732
  'Choose bank account for reconciliation' => 'Wählen Sie das Bankkonto für den Kontenabgleich',
733 733
  'City'                        => 'Stadt',
734
  'City (Shipping)'             => 'Stadt (Lieferung)',
734 735
  'Classification'              => 'Klassifizierung',
735 736
  'Clear'                       => 'Löschen',
736 737
  'Clear fields'                => 'Felder leeren',
......
832 833
  'Could not spawn the printer command.' => 'Die Druckanwendung konnte nicht gestartet werden.',
833 834
  'Could not update prices!'    => 'Preise konnten nicht aktualisiert werden!',
834 835
  'Country'                     => 'Land',
836
  'Country (Shipping)'          => 'Land (Lieferung)',
835 837
  'Create'                      => 'Anlegen',
836 838
  'Create Chart of Accounts'    => 'Zu verwendender Kontenplan',
837 839
  'Create Dataset'              => 'Neue Datenbank anlegen',
......
1176 1178
  'Department (database ID)'    => 'Abeilung (Datenbank-ID)',
1177 1179
  'Department (description)'    => 'Abteilung (Beschreibung)',
1178 1180
  'Department 1'                => 'Abteilung (1)',
1181
  'Department 1 (Shipping)'     => 'Abteilung (1) (Lieferung)',
1179 1182
  'Department 2'                => 'Abteilung (2)',
1183
  'Department 2 (Shipping)'     => 'Abteilung (2) (Lieferung)',
1180 1184
  'Department Description'      => 'Abteilungbeschreibung',
1181 1185
  'Departments'                 => 'Abteilungen',
1182 1186
  'Dependencies'                => 'Abhängigkeiten',
......
2335 2339
  'Multiple addresses can be entered separated by commas.' => 'Mehrere Adressen können durch Kommata getrennt angegeben werden.',
2336 2340
  'MwSt. inkl.'                 => 'MwSt. inkl.',
2337 2341
  'Name'                        => 'Name',
2342
  'Name (Shipping)'             => 'Name (Lieferung)',
2338 2343
  'Name 2'                      => 'Name 2',
2339 2344
  'Name 3'                      => 'Name 3',
2340 2345
  'Name and Address'            => 'Name & Adresse',
......
3655 3660
  'Storno (one letter abbreviation)' => 'S',
3656 3661
  'Storno Invoice'              => 'Stornorechnung',
3657 3662
  'Street'                      => 'Straße',
3663
  'Street (Shipping)'           => 'Straße (Lieferung)',
3658 3664
  'Street 1'                    => 'Straße 1',
3659 3665
  'Street 2'                    => 'Straße 2',
3660 3666
  'Strict and halt'             => 'Strikt und Abbruch',
......
4744 4750
  'Zip'                         => 'PLZ',
4745 4751
  'Zip, City'                   => 'PLZ, Ort',
4746 4752
  'Zipcode'                     => 'PLZ',
4753
  'Zipcode (Shipping)'          => 'PLZ (Lieferung)',
4747 4754
  'Zipcode and city'            => 'PLZ und Stadt',
4748 4755
  '[email]'                     => '[email]',
4749 4756
  'absolute'                    => 'absolut',
locale/en/all
731 731
  'Choose a Tax Number'         => '',
732 732
  'Choose bank account for reconciliation' => '',
733 733
  'City'                        => '',
734
  'City (Shipping)'             => '',
734 735
  'Classification'              => '',
735 736
  'Clear'                       => '',
736 737
  'Clear fields'                => '',
......
832 833
  'Could not spawn the printer command.' => '',
833 834
  'Could not update prices!'    => '',
834 835
  'Country'                     => '',
836
  'Country (Shipping)'          => '',
835 837
  'Create'                      => '',
836 838
  'Create Chart of Accounts'    => '',
837 839
  'Create Dataset'              => '',
......
1176 1178
  'Department (database ID)'    => '',
1177 1179
  'Department (description)'    => '',
1178 1180
  'Department 1'                => '',
1181
  'Department 1 (Shipping)'     => '',
1179 1182
  'Department 2'                => '',
1183
  'Department 2 (Shipping)'     => '',
1180 1184
  'Department Description'      => '',
1181 1185
  'Departments'                 => '',
1182 1186
  'Dependencies'                => '',
......
2334 2338
  'Multiple addresses can be entered separated by commas.' => '',
2335 2339
  'MwSt. inkl.'                 => '',
2336 2340
  'Name'                        => '',
2341
  'Name (Shipping)'             => '',
2337 2342
  'Name 2'                      => '',
2338 2343
  'Name 3'                      => '',
2339 2344
  'Name and Address'            => '',
......
3654 3659
  'Storno (one letter abbreviation)' => '',
3655 3660
  'Storno Invoice'              => '',
3656 3661
  'Street'                      => '',
3662
  'Street (Shipping)'           => '',
3657 3663
  'Street 1'                    => '',
3658 3664
  'Street 2'                    => '',
3659 3665
  'Strict and halt'             => '',
......
4742 4748
  'Zip'                         => '',
4743 4749
  'Zip, City'                   => '',
4744 4750
  'Zipcode'                     => '',
4751
  'Zipcode (Shipping)'          => '',
4745 4752
  'Zipcode and city'            => '',
4746 4753
  '[email]'                     => '',
4747 4754
  '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