Revision d52e2ffc
Von Thomas Kasulke vor mehr als 17 Jahren hinzugefügt
bin/mozilla/oe.pl | ||
---|---|---|
157 | 157 |
|
158 | 158 |
sub order_links { |
159 | 159 |
$lxdebug->enter_sub(); |
160 |
|
|
161 | 160 |
# get customer/vendor |
162 | 161 |
$form->all_vc(\%myconfig, $form->{vc}, |
163 | 162 |
($form->{vc} eq 'customer') ? "AR" : "AP"); |
... | ... | |
231 | 230 |
|
232 | 231 |
} |
233 | 232 |
$form->{cp_id} = $cp_id; |
233 |
|
|
234 | 234 |
if ($payment_id) { |
235 | 235 |
$form->{payment_id} = $payment_id; |
236 | 236 |
} |
... | ... | |
334 | 334 |
$form->{jsscript} = $form->{jscalendar}; |
335 | 335 |
$jsscript = ""; |
336 | 336 |
|
337 |
$payment = qq|<option value=""></option>|; |
|
338 |
foreach $item (@{ $form->{payment_terms} }) { |
|
339 |
if ($form->{payment_id} eq $item->{id}) { |
|
340 |
$payment .= qq|<option value="$item->{id}" selected>$item->{description}</option>|; |
|
341 |
} else { |
|
342 |
$payment .= qq|<option value="$item->{id}">$item->{description}</option>|; |
|
343 |
} |
|
344 |
} |
|
345 | 337 |
if ($form->{jsscript}) { |
346 | 338 |
|
347 | 339 |
# with JavaScript Calendar |
... | ... | |
418 | 410 |
"old_id" => \@old_project_ids }, |
419 | 411 |
"employees" => "ALL_SALESMEN", |
420 | 412 |
"taxzones" => "ALL_TAXZONES", |
413 |
"payments" => "ALL_PAYMENTS", |
|
421 | 414 |
"currencies" => "ALL_CURRENCIES"); |
422 | 415 |
($form->{vc} eq "customer" |
423 | 416 |
? $form->get_lists("customers" => "ALL_CUSTOMERS") |
... | ... | |
453 | 446 |
</td><input type=hidden name="select$form->{vc}" value="| . |
454 | 447 |
Q($form->{"select$form->{vc}"}) . qq|">|; |
455 | 448 |
|
449 |
%labels = (); |
|
450 |
@values = (""); |
|
451 |
foreach my $item (@{ $form->{"ALL_PAYMENTS"} }) { |
|
452 |
push(@values, $item->{"id"}); |
|
453 |
$labels{$item->{"id"}} = $item->{"description"}; |
|
454 |
} |
|
455 |
|
|
456 |
$payments = qq| |
|
457 |
<th align="right">| . $locale->text('Payment Terms') . qq|</th> |
|
458 |
<td>| . |
|
459 |
NTI($cgi->popup_menu('-name' => 'payment_id', '-values' => \@values, |
|
460 |
'-labels' => \%labels, '-default' => $form->{payment_id})) |
|
461 |
. qq|</td>|; |
|
462 |
|
|
456 | 463 |
%labels = (); |
457 | 464 |
@values = (""); |
458 | 465 |
foreach my $item (@{ $form->{"ALL_SHIPTO"} }) { |
... | ... | |
1008 | 1015 |
<td>$notes</td> |
1009 | 1016 |
<td>$intnotes</td> |
1010 | 1017 |
</tr> |
1011 |
<th align=right>| . $locale->text('Payment Terms') . qq|</th>
|
|
1012 |
<td><select name=payment_id>$payment
|
|
1013 |
</select></td>
|
|
1014 |
</table>
|
|
1018 |
<tr>
|
|
1019 |
$payments
|
|
1020 |
</tr>
|
|
1021 |
</table>
|
|
1015 | 1022 |
</td> |
1016 | 1023 |
<td align=right width=100%> |
1017 | 1024 |
$taxincluded |
... | ... | |
1184 | 1191 |
map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } |
1185 | 1192 |
qw(exchangerate creditlimit creditremaining); |
1186 | 1193 |
$form->{update} = 1; |
1187 |
|
|
1194 |
|
|
1195 |
if($form->{payment_id}) { |
|
1196 |
$payment_id = $form->{payment_id}; |
|
1197 |
} |
|
1198 |
|
|
1188 | 1199 |
&check_name($form->{vc}); |
1189 |
|
|
1200 |
|
|
1201 |
if($form->{payment_id} eq "") { |
|
1202 |
$form->{payment_id} = $payment_id; |
|
1203 |
} |
|
1204 |
|
|
1190 | 1205 |
$buysell = 'buy'; |
1191 | 1206 |
$buysell = 'sell' if ($form->{vc} eq 'vendor'); |
1192 | 1207 |
$form->{exchangerate} = $exchangerate |
... | ... | |
1922 | 1937 |
if ($form->{currency} ne $form->{defaultcurrency}); |
1923 | 1938 |
|
1924 | 1939 |
&validate_items; |
1925 |
|
|
1940 |
|
|
1941 |
if($form->{payment_id}) { |
|
1942 |
$payment_id = $form->{payment_id}; |
|
1943 |
} |
|
1944 |
|
|
1926 | 1945 |
# if the name changed get new values |
1927 | 1946 |
if (&check_name($form->{vc})) { |
1947 |
if($form->{payment_id} eq "") { |
|
1948 |
$form->{payment_id} = $payment_id; |
|
1949 |
} |
|
1928 | 1950 |
&update; |
1929 | 1951 |
exit; |
1930 | 1952 |
} |
... | ... | |
2006 | 2028 |
if ($form->{currency} ne $form->{defaultcurrency}); |
2007 | 2029 |
|
2008 | 2030 |
&validate_items; |
2009 |
|
|
2031 |
|
|
2032 |
if($form->{payment_id}) { |
|
2033 |
$payment_id = $form->{payment_id}; |
|
2034 |
} |
|
2035 |
|
|
2010 | 2036 |
# if the name changed get new values |
2011 | 2037 |
if (&check_name($form->{vc})) { |
2038 |
if($form->{payment_id} eq "") { |
|
2039 |
$form->{payment_id} = $payment_id; |
|
2040 |
} |
|
2012 | 2041 |
&update; |
2013 | 2042 |
exit; |
2014 | 2043 |
} |
... | ... | |
2161 | 2190 |
$form->{ordnumber} = ""; |
2162 | 2191 |
$form->{quodate} = $form->{transdate}; |
2163 | 2192 |
} |
2164 |
|
|
2193 |
|
|
2194 |
if($form->{payment_id}) { |
|
2195 |
$payment_id = $form->{payment_id}; |
|
2196 |
} |
|
2197 |
|
|
2165 | 2198 |
# if the name changed get new values |
2166 | 2199 |
if (&check_name($form->{vc})) { |
2200 |
if($form->{payment_id} eq "") { |
|
2201 |
$form->{payment_id} = $payment_id; |
|
2202 |
} |
|
2167 | 2203 |
&update; |
2168 | 2204 |
exit; |
2169 | 2205 |
} |
Auch abrufbar als: Unified diff
Neues PopupMenu für Zahlungsbedingungen eingefügt und Änderungen an deren Varibale abgefangen.