? qq|'$form->{"deliverydate_$i"}'|
: "NULL";
- # get pricegroup_id and save ist
- ($null, my $pricegroup_id) = split /--/, $form->{"sellprice_drag_$i"};
+ # get pricegroup_id and save it
+ ($null, my $pricegroup_id) = split /--/, $form->{"sellprice_pg_$i"};
$pricegroup_id *= 1;
my $subtotal = $form->{"subtotal_$i"} * 1;
my $dbh = $form->dbconnect($myconfig);
+ $form->{"PRICES"} = {};
+
my $i = 1;
my $id = 0;
my $dimension_units = AM->retrieve_units($myconfig, $form, "dimension");
my $service_units = AM->retrieve_units($myconfig, $form, "service");
my $all_units = AM->retrieve_units($myconfig, $form);
while (($form->{"id_$i"}) or ($form->{"new_id_$i"})) {
+ $form->{"PRICES"}{$i} = [];
$id = $form->{"id_$i"};
}
($price, $selectedpricegroup_id) = split /--/,
- $form->{"sellprice_drag_$i"};
+ $form->{"sellprice_pg_$i"};
$pricegroup_old = $form->{"pricegroup_old_$i"};
$form->{"new_pricegroup_$i"} = $selectedpricegroup_id;
and ($pkr->{price} == $form->{"sellprice_$i"})) {
# $pkr->{price} = $form->{"sellprice_$i"};
- } else {
+ } else {
$pkr->{price} = $form->{"sellprice_$i"};
}
}
($form->{"reqdate_$i"}) ? qq|'$form->{"reqdate_$i"}'| : "NULL";
# get pricegroup_id and save ist
- ($null, my $pricegroup_id) = split /--/, $form->{"sellprice_drag_$i"};
+ ($null, my $pricegroup_id) = split /--/, $form->{"sellprice_pg_$i"};
$pricegroup_id *= 1;
$subtotal = $form->{"subtotal_$i"} * 1;
or (($form->{level} =~ /Sales/) and ($form->{type} =~ /invoice/))
or (($form->{level} eq undef) and ($form->{type} =~ /invoice/))
or ($form->{type} =~ /sales_order/)) {
- push @column_index, qw(sellprice_drag);
+ push @column_index, qw(sellprice_pg);
}
push @column_index, qw(sellprice);
qq|<th align=left nowrap width=15 class=listheading>|
. $locale->text('Price')
. qq|</th>|;
- $column_data{sellprice_drag} =
+ $column_data{sellprice_pg} =
qq|<th align=left nowrap width=15 class=listheading>|
. $locale->text('Pricegroup')
. qq|</th>|;
$is_assigned ? $form->{"unit_$i"} : undef))
. "</td>";
- # build in dragdrop for pricesgroups
+ # build in drop down list for pricesgroups
if ($form->{"prices_$i"}) {
if ($form->{"new_pricegroup_$i"} != $form->{"old_pricegroup_$i"}) {
$price_tmp = $form->format_amount(\%myconfig, $form->{"price_new_$i"}, $decimalplaces);
$price_tmp = $form->format_amount(\%myconfig, $form->{"sellprice_$i"}, $decimalplaces);
}
- $column_data{sellprice_drag} =
- qq|<td align=right><select name="sellprice_drag_$i">$form->{"prices_$i"}</select></td>|;
+ $column_data{sellprice_pg} =
+ qq|<td align=right><select name="sellprice_pg_$i">$form->{"prices_$i"}</select></td>|;
$column_data{sellprice} =
qq|<td><input name="sellprice_$i" size=10 value=$price_tmp></td>|;
} else {
# for last row and report
- # set pricegroup dragdrop from report menu
+ # set pricegroup drop down list from report menu
if ($form->{"sellprice_$i"} != 0) {
$prices =
qq|<option value="$form->{"sellprice_$i"}--$form->{"pricegroup_id_$i"}" selected>$form->{"pricegroup_$i"}</option>\n|;
$form->{"pricegroup_old_$i"} = $form->{"pricegroup_id_$i"};
- $column_data{sellprice_drag} =
- qq|<td align=right><select name="sellprice_drag_$i">$prices</select></td>|;
+ $column_data{sellprice_pg} =
+ qq|<td align=right><select name="sellprice_pg_$i">$prices</select></td>|;
} else {
# for last row
- $column_data{sellprice_drag} =
- qq|<td align=right><input name="sellprice_$i" size=9 value=|
- . $form->format_amount(\%myconfig, $form->{"prices_$i"},
- $decimalplaces)
- . qq|></td>|;
+ $column_data{sellprice_pg} = qq|<td align=right> </td>|;
}
$column_data{sellprice} =
# build html-code for pricegroups in variable $form->{prices_$j}
sub set_pricegroup {
- my $rowcount = shift;
$lxdebug->enter_sub();
+ my $rowcount = shift;
+ $lxdebug->dump(0, "holy luja!", $form->{PRICES});
for $j (1 .. $rowcount) {
my $pricegroup_old = $form->{"pricegroup_old_$i"};
+ $lxdebug->message(0, "klaus1 for j $j");
if ($form->{PRICES}{$j}) {
+ $lxdebug->message(0, "klaus2");
$len = 0;
- $prices = '';
+ $prices = '<option value="--">' . $locale->text("none (pricegroup)") . '</option>';
$price = 0;
foreach $item (@{ $form->{PRICES}{$j} }) {
$pricegroup_id = $item->{pricegroup_id};
$pricegroup = $item->{pricegroup};
- # build dragdrop for pricegroups
+ # build drop down list for pricegroups
$prices .=
qq|<option value="$price--$pricegroup_id"$item->{selected}>$pricegroup</option>\n|;
if ($pricegroup_id == 0) {
$form->{"price_new_$j"} = $form->{"sellprice_$j"};
}
- if ($len > 1) {
- $form->{"prices_$j"} = $prices;
- }
}
+ $form->{"prices_$j"} = $prices;
}
}
$lxdebug->leave_sub();
'list' => 'auflisten',
'localhost' => 'lokaler Rechner',
'month' => 'monatliche Abgabe',
+ 'none (pricegroup)' => 'keine',
'number' => 'Nummer',
'posted!' => 'gebucht',
'prices updated!' => ' Preise aktualisiert!',
'button' => '?',
'ea' => 'St.',
'emailed to' => 'gemailt an',
+ 'none (pricegroup)' => 'keine',
'posted!' => 'gebucht',
'sent' => 'gesendet',
'sent to printer' => 'an Drucker geschickt',
'eMail Send?' => 'eMail-Versand?',
'eMail?' => 'eMail?',
'emailed to' => 'gemailt an',
+ 'none (pricegroup)' => 'keine',
'sent' => 'gesendet',
'sent to printer' => 'an Drucker geschickt',
};
'ea' => 'St.',
'emailed to' => 'gemailt an',
'list' => 'auflisten',
+ 'none (pricegroup)' => 'keine',
'number' => 'Nummer',
'prices updated!' => ' Preise aktualisiert!',
'sent' => 'gesendet',
'What type of item is this?' => 'Was ist dieser Artikel?',
'Zipcode' => 'PLZ',
'emailed to' => 'gemailt an',
+ 'none (pricegroup)' => 'keine',
'sent' => 'gesendet',
'sent to printer' => 'an Drucker geschickt',
};
'button' => '?',
'ea' => 'St.',
'emailed to' => 'gemailt an',
+ 'none (pricegroup)' => 'keine',
'posted!' => 'gebucht',
'sent' => 'gesendet',
'sent to printer' => 'an Drucker geschickt',
'button' => '?',
'ea' => 'St.',
'emailed to' => 'gemailt an',
+ 'none (pricegroup)' => 'keine',
'posted!' => 'gebucht',
'sent' => 'gesendet',
'sent to printer' => 'an Drucker geschickt',
'days' => 'Tage',
'ea' => 'St.',
'emailed to' => 'gemailt an',
+ 'none (pricegroup)' => 'keine',
'saved!' => 'gespeichert',
'sent' => 'gesendet',
'sent to printer' => 'an Drucker geschickt',