Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 487d4f1f

Von Stephan Köhler vor etwa 19 Jahren hinzugefügt

  • ID 487d4f1f6ccd3e22c05469f679bf5d0685914611
  • Vorgänger 2794f75f
  • Nachfolger 0fec73d2

Merge von 833,836-838 aus unstable: Lieferdatum in Rechnungen
-833
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.
-836
Aenderung von write_trigger zusammen mit einem Aufruf im alten Format
hat einen Javascript-Fehler beim Waren erfassen erzeugt.
Fixed.
-837
Export des Lieferdatums fuer gedruckte Rechnungen.
Die Variable ist <%deliverydate%>.
Anbei Rechnungen mit Lieferdatum in tex und html.
(Sollte sich jemand anschauen der weiss wie die auszusehen haben)
-838
Doku Update zu r837

Unterschiede anzeigen:

SL/Form.pm
$main::lxdebug->leave_sub();
}
# write Trigger JavaScript-Code ($qty = 1 - only one Trigger)
# write Trigger JavaScript-Code ($qty = quantity of Triggers)
# changed it to accept an arbitrary number of triggers - sschoeling
sub write_trigger {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $qty,
$inputField_1, $align_1, $button_1,
$inputField_2, $align_2, $button_2)
= @_;
my $self = shift;
my $myconfig = shift;
my $qty = shift;
# set dateform for jsscript
# default
......
}
}
$trigger_1 = qq|
while ($#_ >= 2) {
push @triggers, qq|
Calendar.setup(
{
inputField : "$inputField_1",
inputField : "|.(shift).qq|",
ifFormat :"$ifFormat",
align : "$align_1",
button : "$button_1"
align : "|.(shift).qq|",
button : "|.(shift).qq|"
}
);
|;
if ($qty == 2) {
$trigger_2 = qq|
Calendar.setup(
{
inputField : "$inputField_2",
ifFormat :"$ifFormat",
align : "$align_2",
button : "$button_2"
}
);
|;
}
$jsscript = qq|
<script type="text/javascript">
<!--
$trigger_1
$trigger_2
//-->
<!--|.join("", @triggers).qq|//-->
</script>
|;
SL/IS.pm
# set values which could be empty to 0
$form->{terms} *= 1;
$form->{taxincluded} *= 1;
my $datepaid = ($form->{paid}) ? qq|'$form->{datepaid}'| : "NULL";
my $duedate = ($form->{duedate}) ? qq|'$form->{duedate}'| : "NULL";
my $datepaid = ($form->{paid}) ? qq|'$form->{datepaid}'| : "NULL";
my $duedate = ($form->{duedate}) ? qq|'$form->{duedate}'| : "NULL";
my $deliverydate = ($form->{deliverydate}) ? qq|'$form->{deliverydate}'| : "NULL";
# fill in subject if there is none
$form->{subject} = qq|$form->{label} $form->{invnumber}|
......
paid = $form->{paid},
datepaid = $datepaid,
duedate = $duedate,
deliverydate = $deliverydate,
invoice = '1',
shippingpoint = '$form->{shippingpoint}',
shipvia = '$form->{shipvia}',
......
# retrieve invoice
$query = qq|SELECT a.invnumber, a.ordnumber, a.quonumber, a.cusordnumber,
a.transdate AS invdate, a.paid,
a.transdate AS invdate, a.deliverydate, a.paid,
a.shippingpoint, a.shipvia, a.terms, a.notes, a.intnotes,
a.duedate, a.taxincluded, a.curr AS currency,
a.employee_id, e.name AS employee
SL/OE.pm
($form->{currency}) = split /:/, $form->{currencies};
# set reqdate if this is an invoice->order conversion. If someone knows a better check to ensure
# we come from invoices, feel free.
$form->{reqdate} = $form->{deliverydate} if ($form->{deliverydate} and $form->{callback} =~ /action=ar_transactions/);
if ($form->{id} or @ids) {
# retrieve order for single id
bin/mozilla/ic.pl
#write Trigger
$jsscript =
Form->write_trigger(\%myconfig, "1", "priceupdate", "BL", "trigger1", "",
"", "");
Form->write_trigger(\%myconfig, "1", "priceupdate", "BL", "trigger1");
} else {
# without JavaScript Calendar
bin/mozilla/io.pl
}
map { $form->{$_} = $locale->date(\%myconfig, $form->{$_}, 1) }
("${inv}date", "${due}date", "shippingdate");
("${inv}date", "${due}date", "shippingdate", "deliverydate");
@a = qw(name street zipcode city country);
......
push @a,
qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptoemail shippingpoint shipvia company address signature employee contact department_1 department_2);
push @a, ("${inv}date", "${due}date", email, cc, bcc);
push @a, ("${inv}date", "${due}date", "deliverydate", email, cc, bcc);
$form->format_string(@a);
bin/mozilla/is.pl
<td width="4"><input type=button name=duedate id="trigger2" value=|
. $locale->text('button') . qq|></td></td>
|;
$button3 = qq|
<td width="13"><input name=deliverydate id=deliverydate size=11 title="$myconfig{dateformat}" value=$form->{deliverydate}></td>
<td width="4"><input type=button name=deliverydate id="trigger3" value=|
. $locale->text('button') . qq|></td></td>
|;
#write Trigger
$jsscript =
Form->write_trigger(\%myconfig, "2", "invdate", "BL", "trigger1",
"duedate", "BL", "trigger2");
Form->write_trigger(\%myconfig, "3", "invdate", "BL", "trigger1",
"duedate", "BL", "trigger2",
"deliverydate", "BL", "trigger3");
} else {
# without JavaScript Calendar
......
<th align=right>| . $locale->text('Due Date') . qq|</th>
$button2
</tr>
<tr>
<th align=right>| . $locale->text('Delivery Date') . qq|</th>
$button3
</tr>
<tr>
<th align=right nowrap>| . $locale->text('Order Number') . qq|</th>
<td><input name=ordnumber size=11 value="$form->{ordnumber}"></td>
bin/mozilla/oe.pl
$form->isblank("ordnumber", $locale->text('Order Number missing!')) if ( +{ map { $form->{"ordnumber_$_"}, 1 } ( 1 .. $form->{rowcount}-1 ) }->{''} );
$form->isblank("transdate", $locale->text('Order Date missing!')) if ( +{ map { $form->{"transdate_$_"}, 1 } ( 1 .. $form->{rowcount}-1 ) }->{''} );
# also copy deliverydate from the order
$form->{deliverydate} = $form->{reqdate} if $form->{reqdate};
} else {
$form->isblank("quonumber", $locale->text('Quotation Number missing!'));
$form->isblank("transdate", $locale->text('Quotation Date missing!'));
doc/latex-template-variablen.html
<td>Angebotsnummer</td>
</tr>
<tr>
<td><code>shippingdate</code></td>
<td><code>deliverydate</code></td>
<td>Lieferdatum</td>
</tr>
<tr>
sql/Pg-upgrade-2.1.1-2.1.2.sql
--
-- add unqiue constraint to project
ALTER TABLE project ADD constraint project_projectnumber_key UNIQUE(projectnumber);
--
-- add column deliverydate to ar
ALTER TABLE ar ADD COLUMN deliverydate date;
update defaults set version = '2.1.2';
sql/lx-office.sql
"paid" numeric (15,5),
"datepaid" date,
"duedate" date,
"deliverydate" date,
"invoice" boolean DEFAULT 'f',
"shippingpoint" text,
"terms" smallint DEFAULT 0,
templates/German-invoice.html
<th align=right>Nummer</th><td>&nbsp;</td><td><%invnumber%></td></tr>
</tr>
<tr>
<th align=right>Lieferdatum</th><td>&nbsp;</td><td><%deliverydate%></td></tr>
</tr>
<!--
<tr>
<th align=right>Clerk:</th><td>&nbsp;</td><td><%username%></td>
templates/German-invoice.tex
\begin{tabular}[t]{l@{\hspace{0.3cm}}l}
\textbf{Datum} & <%invdate%> \\
\textbf{Nummer} & <%invnumber%> \\
\textbf{Lieferdatum} & <%deliverydate%> \\
\end{tabular}
\vspace{1cm}

Auch abrufbar als: Unified diff