Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a9325fe9

Von Bernd Bleßmann vor mehr als 10 Jahren hinzugefügt

  • ID a9325fe964a8b3c4c240409ddf5020756324b1e4
  • Vorgänger afb8e146
  • Nachfolger c5daa6b4

Kunden-/Lieferantenbericht: Zahlungsbegingungen anzeigen können.

Unterschiede anzeigen:

SL/CT.pm
76 76
      "city"               => "ct.city",
77 77
      "country"            => "ct.country",
78 78
      "discount"           => "ct.discount",
79
      "salesman"           => "e.name"
79
      "salesman"           => "e.name",
80
      "payment"            => "pt.description"
80 81
    );
81 82

  
82 83
  $form->{sort} ||= "name";
......
197 198
  }
198 199

  
199 200
  my $query =
200
    qq|SELECT ct.*, b.description AS business, e.name as salesman | .
201
    qq|SELECT ct.*, b.description AS business, e.name as salesman, |.
202
    qq|  pt.description as payment | .
201 203
    (qq|, NULL AS invnumber, NULL AS ordnumber, NULL AS quonumber, NULL AS invid, NULL AS module, NULL AS formtype, NULL AS closed | x!! $join_records) .
202 204
    qq|FROM $cv ct | .
203 205
    qq|LEFT JOIN business b ON (ct.business_id = b.id) | .
204 206
    qq|LEFT JOIN employee e ON (ct.salesman_id = e.id) | .
207
    qq|LEFT JOIN payment_terms pt ON (ct.payment_id = pt.id) | .
205 208
    qq|WHERE $where|;
206 209

  
207 210
  my @saved_values = @values;
......
215 218
      push(@values, @saved_values);
216 219
      $query .=
217 220
        qq| UNION | .
218
        qq|SELECT ct.*, b.description AS business, e.name as salesman, | .
221
        qq|SELECT ct.*, b.description AS business, e.name as salesman, |.
222
        qq|  pt.description as payment, | .
219 223
        qq|  a.invnumber, a.ordnumber, a.quonumber, a.id AS invid, | .
220 224
        qq|  '$module' AS module, 'invoice' AS formtype, | .
221 225
        qq|  (a.amount = a.paid) AS closed | .
......
223 227
        qq|JOIN $ar a ON (a.${cv}_id = ct.id) | .
224 228
        qq|LEFT JOIN business b ON (ct.business_id = b.id) | .
225 229
        qq|LEFT JOIN employee e ON (ct.salesman_id = e.id) | .
230
        qq|LEFT JOIN payment_terms pt ON (ct.payment_id = pt.id) | .
226 231
        qq|WHERE $where AND (a.invoice = '1')|;
227 232
    }
228 233

  
......
230 235
      push(@values, @saved_values);
231 236
      $query .=
232 237
        qq| UNION | .
233
        qq|SELECT ct.*, b.description AS business, e.name as salesman, | .
238
        qq|SELECT ct.*, b.description AS business, e.name as salesman, |.
239
        qq|  pt.description as payment, | .
234 240
        qq|  ' ' AS invnumber, o.ordnumber, o.quonumber, o.id AS invid, | .
235 241
        qq|  'oe' AS module, 'order' AS formtype, o.closed | .
236 242
        qq|FROM $cv ct | .
237 243
        qq|JOIN oe o ON (o.${cv}_id = ct.id) | .
238 244
        qq|LEFT JOIN business b ON (ct.business_id = b.id) | .
239 245
        qq|LEFT JOIN employee e ON (ct.salesman_id = e.id) | .
246
        qq|LEFT JOIN payment_terms pt ON (ct.payment_id = pt.id) | .
240 247
        qq|WHERE $where AND (o.quotation = '0')|;
241 248
    }
242 249

  
......
245 252
      $query .=
246 253
        qq| UNION | .
247 254
        qq|SELECT ct.*, b.description AS business, e.name as salesman, | .
255
        qq|  pt.description as payment, | .
248 256
        qq|  ' ' AS invnumber, o.ordnumber, o.quonumber, o.id AS invid, | .
249 257
        qq|  'oe' AS module, 'quotation' AS formtype, o.closed | .
250 258
        qq|FROM $cv ct | .
251 259
        qq|JOIN oe o ON (o.${cv}_id = ct.id) | .
252 260
        qq|LEFT JOIN business b ON (ct.business_id = b.id) | .
253 261
        qq|LEFT JOIN employee e ON (ct.salesman_id = e.id) | .
262
        qq|LEFT JOIN payment_terms pt ON (ct.payment_id = pt.id) | .
254 263
        qq|WHERE $where AND (o.quotation = '1')|;
255 264
    }
256 265
  }
bin/mozilla/ct.pl
153 153
  }
154 154

  
155 155
  my @columns = (
156
    'id',        'name',      "$form->{db}number",   'contact',   'phone',    'discount',
157
    'fax',       'email',     'taxnumber',           'street',    'zipcode' , 'city',
158
    'business',  'invnumber', 'ordnumber',           'quonumber', 'salesman', 'country'
156
    'id',        'name',    "$form->{db}number",   'contact',   'phone',    'discount',
157
    'fax',       'email',   'taxnumber',           'street',    'zipcode' , 'city',
158
    'business',  'payment', 'invnumber', 'ordnumber',           'quonumber', 'salesman',
159
    'country'
159 160
  );
160 161

  
161 162
  my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs };
......
184 185
    'country'           => { 'text' => $locale->text('Country'), },
185 186
    'salesman'          => { 'text' => $locale->text('Salesman'), },
186 187
    'discount'          => { 'text' => $locale->text('Discount'), },
188
    'payment'           => { 'text' => $locale->text('Payment Terms'), },
187 189
    %column_defs_cvars,
188 190
  );
189 191

  
templates/webpages/ct/search.html
159 159
        <input name="l_discount" id="l_discount" type="checkbox" class="checkbox" value="Y">
160 160
        <label for="l_discount">[% 'Discount' | $T8 %]</label>
161 161
       </td>
162
       <td>
163
        <input name="l_payment" id="l_payment" type="checkbox" class="checkbox" value="Y">
164
        <label for="l_payment">[% 'Payment Terms' | $T8 %]</label>
165
       </td>
162 166
      [% IF IS_CUSTOMER %]
163 167
      <td>
164 168
       <input name="l_salesman" id="l_salesman" type="checkbox" class="checkbox" value="Y">

Auch abrufbar als: Unified diff