projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Die Variablen "texnumber" (früher "steuernummer"), "co_ustid" und "duns" aus der...
[kivitendo-erp.git]
/
bin
/
mozilla
/
oe.pl
diff --git
a/bin/mozilla/oe.pl
b/bin/mozilla/oe.pl
index
20042ca
..
eb5772e
100644
(file)
--- a/
bin/mozilla/oe.pl
+++ b/
bin/mozilla/oe.pl
@@
-111,6
+111,8
@@
sub add {
sub edit {
$lxdebug->enter_sub();
sub edit {
$lxdebug->enter_sub();
+ $form->{simple_save} = 0;
+
set_headings("edit");
# editing without stuff to edit? try adding it first
set_headings("edit");
# editing without stuff to edit? try adding it first
@@
-286,8
+288,6
@@
sub prepare_order {
$form->{media} = "screen";
$form->{formname} = $form->{type} unless $form->{formname};
$form->{media} = "screen";
$form->{formname} = $form->{type} unless $form->{formname};
- map { $form->{$_} =~ s/\"/"/g }
- qw(ordnumber quonumber shippingpoint shipvia notes intnotes shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact);
my $i = 0;
foreach $ref (@{ $form->{form_details} }) {
$form->{rowcount} = ++$i;
my $i = 0;
foreach $ref (@{ $form->{form_details} }) {
$form->{rowcount} = ++$i;
@@
-332,6
+332,11
@@
sub form_header {
$checkedopen = ($form->{closed}) ? "" : "checked";
$checkedclosed = ($form->{closed}) ? "checked" : "";
$checkedopen = ($form->{closed}) ? "" : "checked";
$checkedclosed = ($form->{closed}) ? "checked" : "";
+ map { $form->{$_} =~ s/\"/"/g }
+ qw(ordnumber quonumber shippingpoint shipvia notes intnotes shiptoname
+ shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact
+ shiptophone shiptofax shiptodepartment_1 shiptodepartment_2);
+
# use JavaScript Calendar or not
$form->{jsscript} = $form->{jscalendar};
$jsscript = "";
# use JavaScript Calendar or not
$form->{jsscript} = $form->{jscalendar};
$jsscript = "";
@@
-534,26
+539,21
@@
sub form_header {
foreach $item (@{ $form->{TAXZONE} }) {
if ($item->{id} == $form->{taxzone_id}) {
$form->{selecttaxzone} .=
foreach $item (@{ $form->{TAXZONE} }) {
if ($item->{id} == $form->{taxzone_id}) {
$form->{selecttaxzone} .=
- "<option value=$item->{id} selected>$item->{description}</option>";
+ "<option value=$item->{id} selected>" . H($item->{description}) .
+ "</option>";
} else {
$form->{selecttaxzone} .=
} else {
$form->{selecttaxzone} .=
- "<option value=$item->{id}>
$item->{description}
</option>";
+ "<option value=$item->{id}>
" . H($item->{description}) . "
</option>";
}
}
} else {
$form->{selecttaxzone} =~ s/ selected//g;
if ($form->{taxzone_id} ne "") {
}
}
} else {
$form->{selecttaxzone} =~ s/ selected//g;
if ($form->{taxzone_id} ne "") {
- $form->{selecttaxzone} =~ s/value=$form->{taxzone_id}
/value=$form->{taxzone_id} selected
/;
+ $form->{selecttaxzone} =~ s/value=$form->{taxzone_id}
>/value=$form->{taxzone_id} selected>
/;
}
}
}
}
- if ($form->{rowcount} >0) {
- $form->{selecttaxzone} =~ /<option value=\d+ selected>.*?<\/option>/;
- $form->{selecttaxzone} = $&;
- }
-
-
$taxzone = qq|
<tr>
<th align=right>| . $locale->text('Steuersatz') . qq|</th>
$taxzone = qq|
<tr>
<th align=right>| . $locale->text('Steuersatz') . qq|</th>
@@
-828,6
+828,8
@@
$jsscript
<input type=hidden name=shiptocontact value="$form->{shiptocontact}">
<input type=hidden name=shiptophone value="$form->{shiptophone}">
<input type=hidden name=shiptofax value="$form->{shiptofax}">
<input type=hidden name=shiptocontact value="$form->{shiptocontact}">
<input type=hidden name=shiptophone value="$form->{shiptophone}">
<input type=hidden name=shiptofax value="$form->{shiptofax}">
+<input type=hidden name=shiptodepartment_1 value="$form->{shiptodepartment_1}">
+<input type=hidden name=shiptodepartment_2 value="$form->{shiptodepartment_2}">
<input type=hidden name=shiptoemail value="$form->{shiptoemail}">
<!-- email variables -->
<input type=hidden name=shiptoemail value="$form->{shiptoemail}">
<!-- email variables -->
@@
-1086,7
+1088,7
@@
sub form_footer {
<input class=submit type=submit name=action value="|
. $locale->text('Sales Order') . qq|">
<input class=submit type=submit name=action value="|
<input class=submit type=submit name=action value="|
. $locale->text('Sales Order') . qq|">
<input class=submit type=submit name=action value="|
- . $locale->text('Quotation') . qq|">
+ . $locale->text('
Request for
Quotation') . qq|">
|;
} else {
|;
} else {
@@
-1166,8
+1168,6
@@
sub update {
} else {
} else {
- $form->{"selected_unit_$i"} = $form->{"unit_$i"};
-
if ( $form->{type} eq 'purchase_order'
|| $form->{type} eq 'request_quotation') {
IR->retrieve_item(\%myconfig, \%$form);
if ( $form->{type} eq 'purchase_order'
|| $form->{type} eq 'request_quotation') {
IR->retrieve_item(\%myconfig, \%$form);
@@
-1962,10
+1962,12
@@
sub save_and_close {
}
# get new number in sequence if no number is given or if saveasnew was requested
}
# get new number in sequence if no number is given or if saveasnew was requested
- if (!$form->{$ordumber} || $form->{saveasnew}) {
+ if (!$form->{$ord
n
umber} || $form->{saveasnew}) {
$form->{$ordnumber} = $form->update_defaults(\%myconfig, $numberfld);
}
$form->{$ordnumber} = $form->update_defaults(\%myconfig, $numberfld);
}
+ relink_accounts();
+
$form->redirect(
$form->{label} . " $form->{$ordnumber} " . $locale->text('saved!'))
if (OE->save(\%myconfig, \%$form));
$form->redirect(
$form->{label} . " $form->{$ordnumber} " . $locale->text('saved!'))
if (OE->save(\%myconfig, \%$form));
@@
-2038,6
+2040,7
@@
sub save {
$form->{$ordnumber} = $form->update_defaults(\%myconfig, $numberfld)
unless $form->{$ordnumber};
$form->{$ordnumber} = $form->update_defaults(\%myconfig, $numberfld)
unless $form->{$ordnumber};
+ relink_accounts();
OE->save(\%myconfig, \%$form);
$form->{simple_save} = 1;
OE->save(\%myconfig, \%$form);
$form->{simple_save} = 1;
@@
-2163,6
+2166,7
@@
sub invoice {
# if not it's most likely a collective order, which can't be saved back
# so they just have to be closed
if (($form->{ordnumber} ne '') || ($form->{quonumber} ne '')) {
# if not it's most likely a collective order, which can't be saved back
# so they just have to be closed
if (($form->{ordnumber} ne '') || ($form->{quonumber} ne '')) {
+ relink_accounts();
OE->save(\%myconfig, \%$form);
} else {
OE->close_orders(\%myconfig, \%$form);
OE->save(\%myconfig, \%$form);
} else {
OE->close_orders(\%myconfig, \%$form);
@@
-2387,6
+2391,8
@@
sub create_backorder {
} qw(sellprice discount);
}
} qw(sellprice discount);
}
+ relink_accounts();
+
OE->save(\%myconfig, \%$form);
# rebuild rows for invoice
OE->save(\%myconfig, \%$form);
# rebuild rows for invoice
@@
-2428,6
+2434,7
@@
sub purchase_order {
if ( $form->{type} eq 'sales_quotation'
|| $form->{type} eq 'request_quotation') {
$form->{closed} = 1;
if ( $form->{type} eq 'sales_quotation'
|| $form->{type} eq 'request_quotation') {
$form->{closed} = 1;
+ relink_accounts();
OE->save(\%myconfig, \%$form);
}
OE->save(\%myconfig, \%$form);
}
@@
-2448,6
+2455,7
@@
sub sales_order {
if ( $form->{type} eq 'sales_quotation'
|| $form->{type} eq 'request_quotation') {
$form->{closed} = 1;
if ( $form->{type} eq 'sales_quotation'
|| $form->{type} eq 'request_quotation') {
$form->{closed} = 1;
+ relink_accounts();
OE->save(\%myconfig, \%$form);
}
OE->save(\%myconfig, \%$form);
}
@@
-2681,6
+2689,8
@@
sub display_ship_receive {
<input type=hidden name=shiptophone value="$form->{shiptophone}">
<input type=hidden name=shiptofax value="$form->{shiptofax}">
<input type=hidden name=shiptoemail value="$form->{shiptoemail}">
<input type=hidden name=shiptophone value="$form->{shiptophone}">
<input type=hidden name=shiptofax value="$form->{shiptofax}">
<input type=hidden name=shiptoemail value="$form->{shiptoemail}">
+<input type=hidden name=shiptodepartment_1 value="$form->{shiptodepartment_1}">
+<input type=hidden name=shiptodepartment_2 value="$form->{shiptodepartment_2}">
<!-- email variables -->
<input type=hidden name=message value="$form->{message}">
<!-- email variables -->
<input type=hidden name=message value="$form->{message}">