Revision 82c78486
Von Moritz Bunkus vor fast 18 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
437 | 437 |
payment_id = $form->{payment_id}, |
438 | 438 |
delivery_vendor_id = $form->{delivery_vendor_id}, |
439 | 439 |
delivery_customer_id = $form->{delivery_customer_id}, |
440 |
globalproject_id = | . conv_i($form->{"globalproject_id"}, 'NULL') . qq|, |
|
440 | 441 |
employee_id = $form->{employee_id}, |
441 | 442 |
cp_id = | . conv_i($form->{cp_id}, 'NULL') . qq| |
442 | 443 |
WHERE id = $form->{id}|; |
... | ... | |
670 | 671 |
o.closed, o.reqdate, o.quonumber, o.department_id, o.cusordnumber, |
671 | 672 |
d.description AS department, o.payment_id, o.language_id, o.taxzone_id, |
672 | 673 |
o.delivery_customer_id, o.delivery_vendor_id, o.proforma, o.shipto_id, |
674 |
o.globalproject_id, pr.projectnumber AS globalprojectnumber, |
|
673 | 675 |
o.delivered |
674 | 676 |
FROM oe o |
675 | 677 |
JOIN $form->{vc} cv ON (o.$form->{vc}_id = cv.id) |
676 | 678 |
LEFT JOIN employee e ON (o.employee_id = e.id) |
677 | 679 |
LEFT JOIN department d ON (o.department_id = d.id) |
680 |
LEFT JOIN project pr ON (o.globalproject_id = pr.id) |
|
678 | 681 |
| |
679 | 682 |
. ($form->{id} |
680 | 683 |
? qq|WHERE o.id = $form->{id}| |
bin/mozilla/ar.pl | ||
---|---|---|
531 | 531 |
<th align=right nowrap>| . $locale->text('Due Date') . qq|</th> |
532 | 532 |
$button2 |
533 | 533 |
</tr> |
534 |
</table>
|
|
534 |
</table>
|
|
535 | 535 |
</td> |
536 | 536 |
</tr> |
537 | 537 |
</table> |
bin/mozilla/arap.pl | ||
---|---|---|
272 | 272 |
sub check_project { |
273 | 273 |
$lxdebug->enter_sub(); |
274 | 274 |
|
275 |
for $i (1 .. $form->{rowcount}) { |
|
276 |
$form->{"project_id_$i"} = "" unless $form->{"projectnumber_$i"}; |
|
277 |
if ($form->{"projectnumber_$i"} ne $form->{"oldprojectnumber_$i"}) { |
|
278 |
if ($form->{"projectnumber_$i"}) { |
|
275 |
for $i (0 .. $form->{rowcount}) { |
|
276 |
my $suffix = $i ? "_$i" : ""; |
|
277 |
my $prefix = $i ? "" : "global"; |
|
278 |
$form->{"${prefix}project_id${suffix}"} = "" unless $form->{"${prefix}projectnumber$suffix"}; |
|
279 |
if ($form->{"${prefix}projectnumber${suffix}"} ne $form->{"old${prefix}projectnumber${suffix}"}) { |
|
280 |
if ($form->{"${prefix}projectnumber${suffix}"}) { |
|
279 | 281 |
|
280 | 282 |
# get new project |
281 |
$form->{projectnumber} = $form->{"projectnumber_$i"};
|
|
283 |
$form->{projectnumber} = $form->{"${prefix}projectnumber${suffix}"};
|
|
282 | 284 |
if (($rows = PE->projects(\%myconfig, $form)) > 1) { |
283 | 285 |
|
284 | 286 |
# check form->{project_list} how many there are |
285 | 287 |
$form->{rownumber} = $i; |
286 |
&select_project; |
|
288 |
&select_project($i ? undef : 1);
|
|
287 | 289 |
exit; |
288 | 290 |
} |
289 | 291 |
|
290 | 292 |
if ($rows == 1) { |
291 |
$form->{"project_id_$i"} = $form->{project_list}->[0]->{id}; |
|
292 |
$form->{"projectnumber_$i"} = |
|
293 |
$form->{"${prefix}project_id${suffix}"} = |
|
294 |
$form->{project_list}->[0]->{id}; |
|
295 |
$form->{"${prefix}projectnumber${suffix}"} = |
|
293 | 296 |
$form->{project_list}->[0]->{projectnumber}; |
294 |
$form->{"oldprojectnumber_$i"} =
|
|
297 |
$form->{"old${prefix}projectnumber${suffix}"} =
|
|
295 | 298 |
$form->{project_list}->[0]->{projectnumber}; |
296 | 299 |
} else { |
297 | 300 |
|
... | ... | |
299 | 302 |
$form->error($locale->text('Project not on file!')); |
300 | 303 |
} |
301 | 304 |
} else { |
302 |
$form->{"oldprojectnumber_$i"} = "";
|
|
305 |
$form->{"old${prefix}projectnumber${suffix}"} = "";
|
|
303 | 306 |
} |
304 | 307 |
} |
305 | 308 |
} |
... | ... | |
310 | 313 |
sub select_project { |
311 | 314 |
$lxdebug->enter_sub(); |
312 | 315 |
|
316 |
my ($is_global) = @_; |
|
317 |
|
|
313 | 318 |
@column_index = qw(ndx projectnumber description); |
314 | 319 |
|
315 | 320 |
$column_data{ndx} = qq|<th> </th>|; |
... | ... | |
387 | 392 |
|; |
388 | 393 |
|
389 | 394 |
# delete action variable |
390 |
map { delete $form->{$_} } qw(action project_list header); |
|
395 |
map { delete $form->{$_} } qw(action project_list header update);
|
|
391 | 396 |
|
392 | 397 |
# save all other form variables |
393 | 398 |
foreach $key (keys %${form}) { |
... | ... | |
396 | 401 |
} |
397 | 402 |
|
398 | 403 |
print qq| |
404 |
<input type="hidden" name="is_global" value="$is_global"> |
|
399 | 405 |
<input type=hidden name=nextsub value=project_selected> |
400 | 406 |
|
401 | 407 |
<br> |
... | ... | |
418 | 424 |
# index for new item |
419 | 425 |
$i = $form->{ndx}; |
420 | 426 |
|
421 |
$form->{"projectnumber_$form->{rownumber}"} = |
|
427 |
my $prefix = $form->{"is_global"} ? "global" : ""; |
|
428 |
my $suffix = $form->{"is_global"} ? "" : "_$form->{rownumber}"; |
|
429 |
|
|
430 |
$form->{"${prefix}projectnumber${suffix}"} = |
|
422 | 431 |
$form->{"new_projectnumber_$i"}; |
423 |
$form->{"oldprojectnumber_$form->{rownumber}"} =
|
|
432 |
$form->{"old${prefix}projectnumber${suffix}"} =
|
|
424 | 433 |
$form->{"new_projectnumber_$i"}; |
425 |
$form->{"project_id_$form->{rownumber}"} = $form->{"new_id_$i"};
|
|
434 |
$form->{"${prefix}project_id${suffix}"} = $form->{"new_id_$i"};
|
|
426 | 435 |
|
427 | 436 |
# delete all the new_ variables |
428 | 437 |
for $i (1 .. $form->{lastndx}) { |
429 | 438 |
map { delete $form->{"new_${_}_$i"} } qw(id projectnumber description); |
430 | 439 |
} |
431 | 440 |
|
432 |
map { delete $form->{$_} } qw(ndx lastndx nextsub); |
|
441 |
map { delete $form->{$_} } qw(ndx lastndx nextsub is_global);
|
|
433 | 442 |
|
434 | 443 |
if ($form->{update}) { |
435 | 444 |
&{ $form->{update} }; |
bin/mozilla/ir.pl | ||
---|---|---|
455 | 455 |
<td><input name="quodate" id="quodate" size="11" title="$myconfig{dateformat}" value="| . Q($form->{quodate}) . qq|"></td> |
456 | 456 |
<td><input type="button" name="b_quodate" id="trigger_quodate" value="?"></td> |
457 | 457 |
</tr> |
458 |
</table> |
|
458 |
<tr> |
|
459 |
<th align="right" nowrap>| . $locale->text('Project Number') . qq|</th> |
|
460 |
<td> |
|
461 |
<input name="globalprojectnumber" size="11" value="| . Q($form->{globalprojectnumber}) . qq|"> |
|
462 |
<input type="hidden" name="oldglobalprojectnumber" value="| . Q($form->{globalprojectnumber}) . qq|"> |
|
463 |
<input type="hidden" name="globalproject_id" value="| . Q($form->{globalproject_id}) . qq|"> |
|
464 |
</td:> |
|
465 |
</tr> |
|
466 |
</table> |
|
459 | 467 |
</td> |
460 | 468 |
</tr> |
461 | 469 |
</table> |
bin/mozilla/is.pl | ||
---|---|---|
741 | 741 |
<th align=right nowrap>| . $locale->text('Customer Order Number') . qq|</th> |
742 | 742 |
<td><input name=cusordnumber size=11 value="$form->{cusordnumber}"></td> |
743 | 743 |
</tr> |
744 |
<tr> |
|
745 |
<th align="right" nowrap>| . $locale->text('Project Number') . qq|</th> |
|
746 |
<td> |
|
747 |
<input name="globalprojectnumber" size="11" value="| . Q($form->{globalprojectnumber}) . qq|"> |
|
748 |
<input type="hidden" name="oldglobalprojectnumber" value="| . Q($form->{globalprojectnumber}) . qq|"> |
|
749 |
<input type="hidden" name="globalproject_id" value="| . Q($form->{globalproject_id}) . qq|"> |
|
750 |
</td> |
|
751 |
</tr> |
|
744 | 752 |
</table> |
745 | 753 |
</td> |
746 | 754 |
</tr> |
bin/mozilla/oe.pl | ||
---|---|---|
781 | 781 |
$openclosed |
782 | 782 |
$employee |
783 | 783 |
$ordnumber |
784 |
<tr> |
|
785 |
<th width="70%" align="right" nowrap>| . $locale->text('Project Number') . qq|</th> |
|
786 |
<td> |
|
787 |
<input name="globalprojectnumber" size="11" value="| . Q($form->{globalprojectnumber}) . qq|"> |
|
788 |
<input type="hidden" name="oldglobalprojectnumber" value="| . Q($form->{globalprojectnumber}) . qq|"> |
|
789 |
<input type="hidden" name="globalproject_id" value="| . Q($form->{globalproject_id}) . qq|"> |
|
790 |
</td> |
|
791 |
</tr> |
|
784 | 792 |
</table> |
785 | 793 |
</td> |
786 | 794 |
</tr> |
locale/de/cn | ||
---|---|---|
241 | 241 |
'post' => 'post', |
242 | 242 |
'post_as_new' => 'post_as_new', |
243 | 243 |
'prepare_credit_note' => 'prepare_credit_note', |
244 |
'preset_projectnumber' => 'preset_projectnumber', |
|
244 | 245 |
'preview' => 'preview', |
245 | 246 |
'print' => 'print', |
246 | 247 |
'print_and_post' => 'print_and_post', |
locale/de/dn | ||
---|---|---|
228 | 228 |
'order' => 'order', |
229 | 229 |
'part_selection_internal' => 'part_selection_internal', |
230 | 230 |
'post_as_new' => 'post_as_new', |
231 |
'preset_projectnumber' => 'preset_projectnumber', |
|
231 | 232 |
'print' => 'print', |
232 | 233 |
'print_dunning' => 'print_dunning', |
233 | 234 |
'print_form' => 'print_form', |
locale/de/ic | ||
---|---|---|
279 | 279 |
'parts_language_selection' => 'parts_language_selection', |
280 | 280 |
'parts_subtotal' => 'parts_subtotal', |
281 | 281 |
'post_as_new' => 'post_as_new', |
282 |
'preset_projectnumber' => 'preset_projectnumber', |
|
282 | 283 |
'price_row' => 'price_row', |
283 | 284 |
'print' => 'print', |
284 | 285 |
'print_form' => 'print_form', |
locale/de/io | ||
---|---|---|
162 | 162 |
'order' => 'order', |
163 | 163 |
'part_selection_internal' => 'part_selection_internal', |
164 | 164 |
'post_as_new' => 'post_as_new', |
165 |
'preset_projectnumber' => 'preset_projectnumber', |
|
165 | 166 |
'print' => 'print', |
166 | 167 |
'print_form' => 'print_form', |
167 | 168 |
'print_options' => 'print_options', |
locale/de/ir | ||
---|---|---|
236 | 236 |
'post_as_new' => 'post_as_new', |
237 | 237 |
'post_payment' => 'post_payment', |
238 | 238 |
'prepare_invoice' => 'prepare_invoice', |
239 |
'preset_projectnumber' => 'preset_projectnumber', |
|
239 | 240 |
'print' => 'print', |
240 | 241 |
'print_form' => 'print_form', |
241 | 242 |
'print_options' => 'print_options', |
locale/de/is | ||
---|---|---|
262 | 262 |
'post_as_new' => 'post_as_new', |
263 | 263 |
'post_payment' => 'post_payment', |
264 | 264 |
'prepare_invoice' => 'prepare_invoice', |
265 |
'preset_projectnumber' => 'preset_projectnumber', |
|
265 | 266 |
'preview' => 'preview', |
266 | 267 |
'print' => 'print', |
267 | 268 |
'print_and_post' => 'print_and_post', |
locale/de/oe | ||
---|---|---|
279 | 279 |
'poso' => 'poso', |
280 | 280 |
'post_as_new' => 'post_as_new', |
281 | 281 |
'prepare_order' => 'prepare_order', |
282 |
'preset_projectnumber' => 'preset_projectnumber', |
|
282 | 283 |
'print' => 'print', |
283 | 284 |
'print_form' => 'print_form', |
284 | 285 |
'print_options' => 'print_options', |
sql/Pg-upgrade2/globalprojectnumber_ap_ar_oe.sql | ||
---|---|---|
1 |
-- @tag: globalprojectnumber_ap_ar_oe |
|
2 |
-- @description: Neue Spalte für eine globale Projektnummer in Einkaufs- und Verkaufsbelegen |
|
3 |
-- @depends: release_2_4_1 |
|
4 |
ALTER TABLE ap ADD COLUMN globalproject_id integer; |
|
5 |
ALTER TABLE ap ADD FOREIGN KEY (globalproject_id) REFERENCES project (id); |
|
6 |
ALTER TABLE ar ADD COLUMN globalproject_id integer; |
|
7 |
ALTER TABLE ar ADD FOREIGN KEY (globalproject_id) REFERENCES project (id); |
|
8 |
ALTER TABLE oe ADD COLUMN globalproject_id integer; |
|
9 |
ALTER TABLE oe ADD FOREIGN KEY (globalproject_id) REFERENCES project (id); |
Auch abrufbar als: Unified diff
Globale Projektnummer in Einkaufs- und Verkaufsbelegen.