Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3879426c

Von Moritz Bunkus vor mehr als 15 Jahren hinzugefügt

  • ID 3879426c4db6c8a2ff8afa9a98992eeaede38a49
  • Vorgänger 19688fca
  • Nachfolger 6ac037ce

Die Berechnung des Fälligkeitsdatums anhand des momentan eingetragenen Rechnungsdatums durchführen, und nicht anhand des Serverdatums.

Fix für Bug 927.

Unterschiede anzeigen:

SL/Form.pm
1984 1984
sub get_duedate {
1985 1985
  $main::lxdebug->enter_sub();
1986 1986

  
1987
  my ($self, $myconfig) = @_;
1987
  my ($self, $myconfig, $reference_date) = @_;
1988 1988

  
1989
  my $dbh = $self->get_standard_dbh($myconfig);
1990
  my $query = qq|SELECT current_date + terms_netto FROM payment_terms WHERE id = ?|;
1991
  ($self->{duedate}) = selectrow_query($self, $dbh, $query, $self->{payment_id});
1989
  my $reference_date = $reference_date ? conv_dateq($reference_date) . '::DATE' : 'current_date';
1990

  
1991
  my $dbh            = $self->get_standard_dbh($myconfig);
1992
  my $query          = qq|SELECT ${reference_date} + terms_netto FROM payment_terms WHERE id = ?|;
1993
  my ($duedate)      = selectrow_query($self, $dbh, $query, $self->{payment_id});
1992 1994

  
1993 1995
  $main::lxdebug->leave_sub();
1996

  
1997
  return $duedate;
1994 1998
}
1995 1999

  
1996 2000
sub _get_contacts {
bin/mozilla/io.pl
1870 1870

  
1871 1871
  _check_io_auth();
1872 1872

  
1873
  $form->get_duedate(\%myconfig);
1873
  my $invdate = $form->{invdate} eq 'undefined' ? undef : $form->{invdate};
1874
  my $duedate = $form->get_duedate(\%myconfig, $invdate);
1874 1875

  
1875
  print $form->ajax_response_header() . $form->{duedate};
1876
  print $form->ajax_response_header() . $duedate;
1876 1877

  
1877 1878
  $lxdebug->leave_sub();
1878 1879
}
bin/mozilla/is.pl
529 529
  if ($form->{type} eq "credit_note") {
530 530
    $button1 = qq|
531 531
      <td nowrap><input name="invdate" id="invdate" size="11" title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\">
532
       <input type="button" name="invdate" id="trigger1" value="|
532
       <input type="button" name="invdate_button" id="trigger1" value="|
533 533
      . $locale->text('button') . qq|"></td>|;
534 534

  
535 535
    #write Trigger
......
540 540
  } else {
541 541
    $button1 = qq|
542 542
      <td nowrap><input name="invdate" id="invdate" size="11" title="$myconfig{dateformat}" value="$form->{invdate}" onBlur=\"check_right_date_format(this)\">
543
       <input type="button" name="invdate" id="trigger1" value="|
543
       <input type="button" name="invdate_button" id="trigger1" value="|
544 544
      . $locale->text('button') . qq|"></td>
545 545
      |;
546 546
    $button2 = qq|
547 547
      <td width="13"><input name="duedate" id="duedate" size="11" title="$myconfig{dateformat}" value="$form->{duedate}" onBlur=\"check_right_date_format(this)\">
548
       <input type="button" name="duedate" id="trigger2" value="|
548
       <input type="button" name="duedate_button" id="trigger2" value="|
549 549
      . $locale->text('button') . qq|"></td>
550 550
    |;
551 551
    $button3 = qq|
552 552
      <td width="13"><input name="deliverydate" id="deliverydate" size="11" title="$myconfig{dateformat}" value="$form->{deliverydate}" onBlur=\"check_right_date_format(this)\">
553
       <input type="button" name="deliverydate" id="trigger3" value="|
553
       <input type="button" name="deliverydate_button" id="trigger3" value="|
554 554
      . $locale->text('button') . qq|"></td>
555 555
    |;
556 556

  
......
911 911
	      <tr valign="top">
912 912
		<td>$notes</td>
913 913
		<td>$intnotes</td>
914
                <td><select name="payment_id" onChange="if (this.value) set_duedate(['payment_id__' + this.value],['duedate'])">$payment
914
                <td><select name="payment_id" onChange="if (this.value) set_duedate(['payment_id__' + this.value, 'invdate__' + invdate.value],['duedate'])">$payment
915 915
                </select></td>
916 916
	      </tr>
917 917
        $follow_ups_block

Auch abrufbar als: Unified diff