Revision b3721e4e
Von Sven Schöling vor fast 19 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
412 | 412 |
$main::lxdebug->leave_sub(); |
413 | 413 |
} |
414 | 414 |
|
415 |
# write Trigger JavaScript-Code ($qty = 1 - only one Trigger) |
|
415 |
# write Trigger JavaScript-Code ($qty = quantity of Triggers) |
|
416 |
# changed it to accept an arbitrary number of triggers - sschoeling |
|
416 | 417 |
sub write_trigger { |
417 | 418 |
$main::lxdebug->enter_sub(); |
418 | 419 |
|
419 |
my ($self, $myconfig, $qty, |
|
420 |
$inputField_1, $align_1, $button_1, |
|
421 |
$inputField_2, $align_2, $button_2) |
|
422 |
= @_; |
|
420 |
my $self = shift; |
|
421 |
my $myconfig = shift; |
|
422 |
my $qty = shift; |
|
423 | 423 |
|
424 | 424 |
# set dateform for jsscript |
425 | 425 |
# default |
... | ... | |
448 | 448 |
} |
449 | 449 |
} |
450 | 450 |
|
451 |
$trigger_1 = qq| |
|
451 |
while ($#_ >= 2) { |
|
452 |
push @triggers, qq| |
|
452 | 453 |
Calendar.setup( |
453 | 454 |
{ |
454 |
inputField : "$inputField_1",
|
|
455 |
inputField : "|.(shift).qq|",
|
|
455 | 456 |
ifFormat :"$ifFormat", |
456 |
align : "$align_1",
|
|
457 |
button : "$button_1"
|
|
457 |
align : "|.(shift).qq|",
|
|
458 |
button : "|.(shift).qq|"
|
|
458 | 459 |
} |
459 | 460 |
); |
460 | 461 |
|; |
461 |
|
|
462 |
if ($qty == 2) { |
|
463 |
$trigger_2 = qq| |
|
464 |
Calendar.setup( |
|
465 |
{ |
|
466 |
inputField : "$inputField_2", |
|
467 |
ifFormat :"$ifFormat", |
|
468 |
align : "$align_2", |
|
469 |
button : "$button_2" |
|
470 |
} |
|
471 |
); |
|
472 |
|; |
|
473 | 462 |
} |
474 | 463 |
$jsscript = qq| |
475 | 464 |
<script type="text/javascript"> |
476 |
<!-- |
|
477 |
$trigger_1 |
|
478 |
$trigger_2 |
|
479 |
//--> |
|
465 |
<!--|.join("", @triggers).qq|//--> |
|
480 | 466 |
</script> |
481 | 467 |
|; |
482 | 468 |
|
SL/IS.pm | ||
---|---|---|
803 | 803 |
# set values which could be empty to 0 |
804 | 804 |
$form->{terms} *= 1; |
805 | 805 |
$form->{taxincluded} *= 1; |
806 |
my $datepaid = ($form->{paid}) ? qq|'$form->{datepaid}'| : "NULL"; |
|
807 |
my $duedate = ($form->{duedate}) ? qq|'$form->{duedate}'| : "NULL"; |
|
806 |
my $datepaid = ($form->{paid}) ? qq|'$form->{datepaid}'| : "NULL"; |
|
807 |
my $duedate = ($form->{duedate}) ? qq|'$form->{duedate}'| : "NULL"; |
|
808 |
my $deliverydate = ($form->{deliverydate}) ? qq|'$form->{deliverydate}'| : "NULL"; |
|
808 | 809 |
|
809 | 810 |
# fill in subject if there is none |
810 | 811 |
$form->{subject} = qq|$form->{label} $form->{invnumber}| |
... | ... | |
837 | 838 |
paid = $form->{paid}, |
838 | 839 |
datepaid = $datepaid, |
839 | 840 |
duedate = $duedate, |
841 |
deliverydate = $deliverydate, |
|
840 | 842 |
invoice = '1', |
841 | 843 |
shippingpoint = '$form->{shippingpoint}', |
842 | 844 |
shipvia = '$form->{shipvia}', |
... | ... | |
1162 | 1164 |
|
1163 | 1165 |
# retrieve invoice |
1164 | 1166 |
$query = qq|SELECT a.invnumber, a.ordnumber, a.quonumber, a.cusordnumber, |
1165 |
a.transdate AS invdate, a.paid, |
|
1167 |
a.transdate AS invdate, a.deliverydate, a.paid,
|
|
1166 | 1168 |
a.shippingpoint, a.shipvia, a.terms, a.notes, a.intnotes, |
1167 | 1169 |
a.duedate, a.taxincluded, a.curr AS currency, |
1168 | 1170 |
a.employee_id, e.name AS employee |
SL/OE.pm | ||
---|---|---|
633 | 633 |
|
634 | 634 |
($form->{currency}) = split /:/, $form->{currencies}; |
635 | 635 |
|
636 |
# set reqdate if this is an invoice->order conversion. If someone knows a better check to ensure |
|
637 |
# we come from invoices, feel free. |
|
638 |
$form->{reqdate} = $form->{deliverydate} if ($form->{deliverydate} and $form->{callback} =~ /action=ar_transactions/); |
|
639 |
|
|
636 | 640 |
if ($form->{id} or @ids) { |
637 | 641 |
|
638 | 642 |
# retrieve order for single id |
bin/mozilla/is.pl | ||
---|---|---|
334 | 334 |
<td width="4"><input type=button name=duedate id="trigger2" value=| |
335 | 335 |
. $locale->text('button') . qq|></td></td> |
336 | 336 |
|; |
337 |
$button3 = qq| |
|
338 |
<td width="13"><input name=deliverydate id=deliverydate size=11 title="$myconfig{dateformat}" value=$form->{deliverydate}></td> |
|
339 |
<td width="4"><input type=button name=deliverydate id="trigger3" value=| |
|
340 |
. $locale->text('button') . qq|></td></td> |
|
341 |
|; |
|
337 | 342 |
|
338 | 343 |
#write Trigger |
339 | 344 |
$jsscript = |
340 |
Form->write_trigger(\%myconfig, "2", "invdate", "BL", "trigger1", |
|
341 |
"duedate", "BL", "trigger2"); |
|
345 |
Form->write_trigger(\%myconfig, "3", "invdate", "BL", "trigger1", |
|
346 |
"duedate", "BL", "trigger2", |
|
347 |
"deliverydate", "BL", "trigger3"); |
|
342 | 348 |
} else { |
343 | 349 |
|
344 | 350 |
# without JavaScript Calendar |
... | ... | |
470 | 476 |
<th align=right>| . $locale->text('Due Date') . qq|</th> |
471 | 477 |
$button2 |
472 | 478 |
</tr> |
479 |
<tr> |
|
480 |
<th align=right>| . $locale->text('Delivery Date') . qq|</th> |
|
481 |
$button3 |
|
482 |
</tr> |
|
473 | 483 |
<tr> |
474 | 484 |
<th align=right nowrap>| . $locale->text('Order Number') . qq|</th> |
475 | 485 |
<td><input name=ordnumber size=11 value="$form->{ordnumber}"></td> |
bin/mozilla/oe.pl | ||
---|---|---|
1809 | 1809 |
$form->isblank("ordnumber", $locale->text('Order Number missing!')) if ( +{ map { $form->{"ordnumber_$_"}, 1 } ( 1 .. $form->{rowcount}-1 ) }->{''} ); |
1810 | 1810 |
$form->isblank("transdate", $locale->text('Order Date missing!')) if ( +{ map { $form->{"transdate_$_"}, 1 } ( 1 .. $form->{rowcount}-1 ) }->{''} ); |
1811 | 1811 |
|
1812 |
# also copy deliverydate from the order |
|
1813 |
$form->{deliverydate} = $form->{reqdate} if $form->{reqdate}; |
|
1812 | 1814 |
} else { |
1813 | 1815 |
$form->isblank("quonumber", $locale->text('Quotation Number missing!')); |
1814 | 1816 |
$form->isblank("transdate", $locale->text('Quotation Date missing!')); |
sql/Pg-upgrade-2.1.1-2.1.2.sql | ||
---|---|---|
321 | 321 |
-- |
322 | 322 |
-- add unqiue constraint to project |
323 | 323 |
ALTER TABLE project ADD constraint project_projectnumber_key UNIQUE(projectnumber); |
324 |
-- |
|
325 |
-- add column deliverydate to ar |
|
326 |
ALTER TABLE ar ADD COLUMN deliverydate date; |
|
324 | 327 |
|
325 | 328 |
update defaults set version = '2.1.2'; |
sql/lx-office.sql | ||
---|---|---|
285 | 285 |
"paid" numeric (15,5), |
286 | 286 |
"datepaid" date, |
287 | 287 |
"duedate" date, |
288 |
"deliverydate" date, |
|
288 | 289 |
"invoice" boolean DEFAULT 'f', |
289 | 290 |
"shippingpoint" text, |
290 | 291 |
"terms" smallint DEFAULT 0, |
Auch abrufbar als: Unified diff
Lieferdatum in Rechnungen.
Lieferdatum wird nicht auf automatisch gesetzt und ist zur Zeit auch nicht vom Programm erfordert.
Es wird bei der Konvertierung von und in Auftraege beibehalten.