<td width=5%> </td>
<th>| . $locale->text('From') . qq|</th>
$button1
- <th>| . $locale->text('To') . qq|</th>
+ <th>| . $locale->text('To (time)') . qq|</th>
$button2
</tr>
</table>
<tr>
<th>| . $locale->text('From') . qq|</th>
$button1
- <th>| . $locale->text('To') . qq|</th>
+ <th>| . $locale->text('To (time)') . qq|</th>
$button2
</tr>
</table>
<tr>
<th align=right nowrap>| . $locale->text('Part Number') . qq|</th>
<td><input name=partnumber size=20></td>
+ <th align=right nowrap>| . $locale->text('EAN') . qq|</th>
+ <td><input name=ean size=20></td>
</tr>
<tr>
<th align=right nowrap>|
<td colspan=3>
<table>
<tr>
- <td><input name=l_partnumber class=checkbox type=checkbox value=Y> |
+ <td><input name=l_partnumber class=checkbox type=checkbox value=Y checked> |
. $locale->text('Part Number') . qq|</td>
<td><input name=l_description class=checkbox type=checkbox value=Y checked> |
. $locale->text('Part Description') . qq|</td>
. $locale->text('Subtotal') . qq|</td>
<td><input name=l_soldtotal class=checkbox type=checkbox value=Y> |
. $locale->text('soldtotal') . qq|</td>
+ <td><input name=l_deliverydate class=checkbox type=checkbox value=Y> |
+ . $locale->text('deliverydate') . qq|</td>
</tr>
</table>
</td>
$callback .= "&partnumber=$form->{partnumber}";
$option .= $locale->text('Part Number') . qq| : $form->{partnumber}<br>|;
}
+ if ($form->{ean}) {
+ $callback .= "&partnumber=$form->{ean}";
+ $option .= $locale->text('EAN') . qq| : $form->{ean}<br>|;
+ }
if ($form->{partsgroup}) {
$callback .= "&partsgroup=$form->{partsgroup}";
$option .= $locale->text('Group') . qq| : $form->{partsgroup}<br>|;
}
@columns = $form->sort_columns(
- qw(number partnumber description partsgroup bin onhand rop unit listprice linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost priceupdate weight image drawing microfiche invnumber ordnumber quonumber name serialnumber soldtotal)
+ qw(number partnumber ean description partsgroup bin onhand rop unit listprice linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost priceupdate weight image drawing microfiche invnumber ordnumber quonumber name serialnumber soldtotal)
);
if ($form->{l_linetotal}) {
<input type=hidden name=ndxs_counter value="$form->{ndxs_counter}">
<input class=submit type=submit name=action value="|
- . $locale->text('choice') . qq|">|;
-
- if ($form->{menubar}) {
- require "$form->{path}/menu.pl";
- &menubar;
- }
+ . $locale->text('choice') . qq|">
- print qq|
</form>
</body>
if ($form->{transdateto}) {
$callback .= "&transdateto=$form->{transdateto}";
$option .= "\n<br>"
- . $locale->text('To')
+ . $locale->text('To (time)')
. " "
. $locale->date(\%myconfig, $form->{transdateto}, 1);
}
$option .= $locale->text('soldtotal') . qq| : $form->{soldtotal}<br>|;
}
+ if ($form->{l_deliverydate}) {
+ $callback .= "&deliverydate=$form->{deliverydate}";
+ }
+
@columns = $form->sort_columns(
- qw(partnumber description partsgroup bin onhand rop unit listprice linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost priceupdate weight image drawing microfiche invnumber ordnumber quonumber name serialnumber soldtotal)
+ qw(partnumber description partsgroup bin onhand rop unit listprice linetotallistprice sellprice linetotalsellprice lastcost linetotallastcost priceupdate weight image drawing microfiche invnumber ordnumber quonumber name serialnumber soldtotal deliverydate)
);
if ($form->{l_linetotal}) {
. $locale->text('soldtotal')
. qq|</a></th>|;
+ $column_header{deliverydate} =
+ qq|<th nowrap><a class=listheading href=$callback&sort=deliverydate&revers=$form->{revers}&lastsort=$form->{lastsort}>|
+ . $locale->text('deliverydate')
+ . qq|</a></th>|;
+
$form->header;
$colspan = $#column_index + 1;
. $form->format_amount(\%myconfig, $ref->{soldtotal}, '', " ")
. "</td>";
+ $column_data{deliverydate} = "<td>$ref->{deliverydate}</td>";
+
$i++;
$i %= 2;
print "<tr class=listrow$i>";
print qq|
<input class=submit type=submit name=action value="|
- . $locale->text('Add') . qq|">|;
+ . $locale->text('Add') . qq|">
- if ($form->{menubar}) {
- require "$form->{path}/menu.pl";
- &menubar;
- }
-
- print qq|
</form>
</body>
IC->get_part(\%myconfig, \%$form);
+ $form->{"original_partnumber"} = $form->{"partnumber"};
+
$form->{title} = $locale->text('Edit ' . ucfirst $form->{item});
&link_part;
}
$notes =
- qq|<textarea name=notes rows=$rows cols=60 wrap=soft>$form->{notes}</textarea>|;
+ qq|<textarea name=notes rows=$rows cols=45 wrap=soft>$form->{notes}</textarea>|;
if (($rows = $form->numtextrows($form->{description}, 40)) > 1) {
$description =
qq|<textarea name="description" rows=$rows cols=40 wrap=soft>$form->{description}</textarea>|;
qq|<input name=description size=40 value="$form->{description}">|;
}
+ $ean = qq|<input name=ean size=40 value="$form->{ean}">|;
+
foreach $item (split / /, $form->{taxaccounts}) {
$form->{"IC_tax_$item"} = ($form->{"IC_tax_$item"}) ? "checked" : "";
}
</tr>|;
- $form->{selectadr} = "<option></option>";
- if (@{ $form->{ADR} }) {
- foreach $item (@{ $form->{ADR} }) {
- if ($item->{id} == $form->{adr_id}) {
- $form->{selectadr} .=
- "<option value=$item->{id} selected>$item->{adr_code}\n";
- } else {
- $form->{selectadr} .=
- "<option value=$item->{id}>$item->{adr_code}\n";
- }
-
- }
- }
-
- $adr = qq|
- <tr>
- <th align=right>| . $locale->text('ADR') . qq|</th>
- <td><select name=adr_id>$form->{selectadr}</select></td>
- </tr>|;
-
-
# set option
foreach $item (qw(IC IC_income IC_expense)) {
if ($form->{$item}) {
<td>
<input name=weight size=10 value=$form->{weight}>
</td>
- <th>
-
- $form->{weightunit}
- <input type=hidden name=weightunit value=$form->{weightunit}>
- </th>
</tr>
</table>
</td>
$form->{weight}
<input type=hidden name=weight value=$form->{weight}>
</td>
- <th>
-
- $form->{weightunit}
- <input type=hidden name=weightunit value=$form->{weightunit}>
- </th>
</tr>
</table>
</td>
<td><input name=gv size=10 value=$form->{gv}></td>
</tr>
|;
- $aluok = $form->{alu} == 1 ? "checked" : "";
-
- $alu .= qq|
- <tr>
- <th align=right nowrap>|
- . $locale->text('Aluartikel') . qq|</th>
- <td><input class=checkbox type=checkbox name=alu value=1 $aluok></td>
- </tr>|;
-
$notdiscountableok = ($form->{not_discountable}) == 1 ? "checked" : "";
$notdiscountable .= qq|
<tr>
|;
$formel =
- qq|<ilayer><layer onmouseover="this.T_STICKY=true;this.T_STATIC=true;return escape('| . $locale->text('The formula needs the following syntax:<br>For regular article:<br>Variablename= Variable Unit;<br>Variablename2= Variable2 Unit2;<br>...<br>###<br>Variable + ( Variable2 / Variable )<br><b>Please be beware of the spaces in the formula</b><br><br>For alu article:<br>Length:<br>Weight/m:<br>Length ist total length of article and weight/m ist the weight pro meter') . qq|')"><textarea name=formel rows=4 cols=60 wrap=soft>$form->{formel}</textarea></layer><ilayer>|;
- $formel = "";
+ qq|<ilayer><layer onmouseover="this.T_STICKY=true;this.T_STATIC=true;return escape('| . $locale->text('The formula needs the following syntax:<br>For regular article:<br>Variablename= Variable Unit;<br>Variablename2= Variable2 Unit2;<br>...<br>###<br>Variable + ( Variable2 / Variable )<br><b>Please be beware of the spaces in the formula</b><br>') . qq|')"><textarea name=formel rows=4 cols=30 wrap=soft>$form->{formel}</textarea></layer><ilayer>|;
$imagelinks = qq|
<tr>
<td>
<input name=rowcount type=hidden value=$form->{rowcount}>
<input name=eur type=hidden value=$eur>
<input name=language_values type=hidden value="$form->{language_values}">
+<input name="original_partnumber" type="hidden" value="| . $form->quote($form->{"original_partnumber"}) . qq|">
<table width="100%">
<tr>
<table>
$buchungsgruppe
$linkaccounts
- $adr
</table>
</td>
<tr>
<th align="left">| . $locale->text('Notes') . qq|</th>
+ <th align="left">| . $locale->text('Formula') . qq|</th>
</tr>
<tr>
<td>
$notes
</td>
+ <td>
+ $formel
+ </td>
</tr>
<tr>
- <td colspan=2>
+ <th align="left"></th>
+ <th align="left">| . $locale->text('EAN-Code') . qq|</th>
+ </tr>
+ <tr>
+ <td>
<button type="button" onclick="parts_language_selection_window('language_values')">| . $locale->text('Set Language Values') . qq|</button>
</td>
+ <td>
+ $ean
+ </td>
</tr>
<tr>
<td colspan=2>
$notdiscountable
$vegv
$shop
- $alu
$obsolete
</table>
</td>
}
}
- if (!$form->{previousform}) {
- if ($form->{menubar}) {
- require "$form->{path}/menu.pl";
- &menubar;
- }
- }
-
print qq|
</form>
$column_data{total} = qq|<td align=right>$linetotal</td>|;
+ $column_data{deliverydate} = qq|<td align=right>$deliverydate</td>|;
+
print qq|
<tr>|;
sub save {
$lxdebug->enter_sub();
- # check if there is a part number
+ # check if there is a part number - commented out, cause there is an automatic allocation of numbers
# $form->isblank("partnumber", $locale->text(ucfirst $form->{item}." Part Number missing!"));
+ # check if there is a description
+ $form->isblank("description", $locale->text("Part Description missing!"));
+
if ($form->{obsolete}) {
$form->error(
$locale->text(
$lxdebug->enter_sub();
$form->{id} = 0;
+ if ($form->{"original_partnumber"} &&
+ ($form->{"partnumber"} eq $form->{"original_partnumber"})) {
+ $form->{partnumber} = "";
+ }
&save;
$lxdebug->leave_sub();