Revision 15682dc4
Von Moritz Bunkus vor fast 18 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
475 | 475 |
$form->get_employee($dbh); |
476 | 476 |
} |
477 | 477 |
|
478 |
$form->{contact_id} = $form->{cp_id}; |
|
479 |
$form->{contact_id} *= 1; |
|
480 | 478 |
$form->{payment_id} *= 1; |
481 | 479 |
$form->{language_id} *= 1; |
482 | 480 |
$form->{taxzone_id} *= 1; |
... | ... | |
1010 | 1008 |
delivery_vendor_id = $form->{delivery_vendor_id}, |
1011 | 1009 |
employee_id = $form->{employee_id}, |
1012 | 1010 |
storno = '$form->{storno}', |
1013 |
cp_id = $form->{contact_id}
|
|
1011 |
cp_id = | . conv_i($form->{"cp_id"}, 'NULL') . qq|
|
|
1014 | 1012 |
WHERE id = $form->{id} |
1015 | 1013 |
|; |
1016 | 1014 |
$dbh->do($query) || $form->dberror($query); |
... | ... | |
1775 | 1773 |
} |
1776 | 1774 |
$sth->finish; |
1777 | 1775 |
|
1778 |
$form->get_contacts($dbh, $form->{customer_id}); |
|
1779 |
$form->{cp_id} *= 1; |
|
1780 |
|
|
1781 |
# get contact if selected |
|
1782 |
if ($form->{cp_id}) { |
|
1783 |
$form->get_contact($dbh, $form->{cp_id}); |
|
1784 |
} |
|
1785 |
|
|
1786 | 1776 |
# get shipto if we did not converted an order or invoice |
1787 | 1777 |
if (!$form->{shipto}) { |
1788 | 1778 |
map { delete $form->{$_} } |
... | ... | |
1813 | 1803 |
} |
1814 | 1804 |
$sth->finish; |
1815 | 1805 |
|
1816 |
# get shipping addresses |
|
1817 |
$query = qq|SELECT s.shipto_id,s.shiptoname,s.shiptodepartment_1 |
|
1818 |
FROM shipto s |
|
1819 |
WHERE s.trans_id = $form->{customer_id}|; |
|
1820 |
$sth = $dbh->prepare($query); |
|
1821 |
$sth->execute || $form->dberror($query); |
|
1822 |
|
|
1823 |
my $customertax = (); |
|
1824 |
while ($ref = $sth->fetchrow_hashref(NAME_lc)) { |
|
1825 |
push(@{ $form->{SHIPTO} }, $ref); |
|
1826 |
} |
|
1827 |
$sth->finish; |
|
1828 |
|
|
1829 | 1806 |
# setup last accounts used for this customer |
1830 | 1807 |
if (!$form->{id} && $form->{type} !~ /_(order|quotation)/) { |
1831 | 1808 |
$query = qq|SELECT c.accno, c.description, c.link, c.category |
Auch abrufbar als: Unified diff
Drop-Down-Auswahlboxen für Ansprechpartner und Lieferadresse bei jedem Maskenaufbau aus der Datenbank aufbauen. Für den HTML-Code wird jetzt das CGI-Modul verwendet.