! -> Note
$ -> Affected files
+19-Jan-2009 Joe Hunt
+! Changed direct sales document line descriptions to be editable (via edit link)
+$ /sales/sales_order_entry.php
+ /includes/cart_class.inc
+ /includes/ui/sales_order_ui.inc
+! Fixed so the printed documents can handle multiple lines of description
+$ /reporting/rep107.php
+ /reporting/rep109.php
+ /reporting/rep110.php
+
17-Jan-2009 Joe Hunt
! Changed all smaller forms and tables to be uniform. Copyright notes.
$ All files with small forms and tables.
else
$DisplayDiscount = number_format2($myrow2["discount_percent"]*100,user_percent_dec()) . "%";
$rep->TextCol(0, 1, $myrow2['stock_id'], -2);
- $rep->TextCol(1, 2, $myrow2['StockDescription'], -2);
+ $oldrow = $rep->row;
+ $rep->TextColLines(1, 2, $myrow2['StockDescription'], -2);
+ $newrow = $rep->row;
+ $rep->row = $oldrow;
$rep->TextCol(2, 3, $DisplayQty, -2);
$rep->TextCol(3, 4, $myrow2['units'], -2);
$rep->TextCol(4, 5, $DisplayPrice, -2);
$rep->TextCol(5, 6, $DisplayDiscount, -2);
$rep->TextCol(6, 7, $DisplayNet, -2);
- $rep->NewLine(1);
+ $rep->row = $newrow;
+ //$rep->NewLine(1);
if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))
$rep->Header2($myrow, $branch, $sales_order, $baccount,$j);
}
$DisplaySubTot = number_format2($SubTotal,$dec);
$DisplayFreight = number_format2($sign*$myrow["ov_freight"],$dec);
- $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
+ $rep->row = $rep->bottomMargin + (15 * $rep->lineHeight);
$linetype = true;
$doctype = $j;
if ($rep->currency != $myrow['curr_code'])
else
$DisplayDiscount = number_format2($myrow2["discount_percent"]*100,user_percent_dec()) . "%";
$rep->TextCol(0, 1, $myrow2['stk_code'], -2);
- $rep->TextCol(1, 2, $myrow2['description'], -2);
+ $oldrow = $rep->row;
+ $rep->TextColLines(1, 2, $myrow2['description'], -2);
+ $newrow = $rep->row;
+ $rep->row = $oldrow;
$rep->TextCol(2, 3, $DisplayQty, -2);
$rep->TextCol(3, 4, $myrow2['units'], -2);
$rep->TextCol(4, 5, $DisplayPrice, -2);
$rep->TextCol(5, 6, $DisplayDiscount, -2);
$rep->TextCol(6, 7, $DisplayNet, -2);
- $rep->NewLine(1);
+ $rep->row = $newrow;
+ //$rep->NewLine(1);
if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))
$rep->Header2($myrow, $branch, $myrow, $baccount, 9);
}
else
$DisplayDiscount = number_format2($myrow2["discount_percent"]*100,user_percent_dec()) . "%";
$rep->TextCol(0, 1, $myrow2['stock_id'], -2);
- $rep->TextCol(1, 2, $myrow2['StockDescription'], -2);
+ $oldrow = $rep->row;
+ $rep->TextColLines(1, 2, $myrow2['StockDescription'], -2);
+ $newrow = $rep->row;
+ $rep->row = $oldrow;
$rep->TextCol(2, 3, $DisplayQty, -2);
$rep->TextCol(3, 4, $myrow2['units'], -2);
$rep->TextCol(4, 5, $DisplayPrice, -2);
$rep->TextCol(5, 6, $DisplayDiscount, -2);
$rep->TextCol(6, 7, $DisplayNet, -2);
- $rep->NewLine(1);
+ $rep->row = $newrow;
+ //$rep->NewLine(1);
if ($rep->row < $rep->bottomMargin + (15 * $rep->lineHeight))
$rep->Header2($myrow, $branch, $sales_order,'',13);
}
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
/* Definition of the cart class
this class can hold all the information for:
return 0;
}
- function update_cart_item($line_no, $qty, $price, $disc)
+ function update_cart_item($line_no, $qty, $price, $disc, $description="")
{
+ if ($description != "")
+ $this->line_items[$line_no]->item_description = $description;
$this->line_items[$line_no]->quantity = $qty;
$this->line_items[$line_no]->qty_dispatched = $qty;
$this->line_items[$line_no]->price = $price;
view_stock_status_cell($stock_item->stock_id);
- label_cell($stock_item->item_description, "nowrap" );
+ //label_cell($stock_item->item_description, "nowrap" );
+ label_cell($stock_item->item_description );
qty_cell($stock_item->qty_dispatched, false, get_qty_dec($stock_item->stock_id));
if ($order->trans_no!=0)
$_POST['qty'] = number_format2($order->line_items[$id]->qty_dispatched, $dec);
$_POST['price'] = price_format($order->line_items[$id]->price);
$_POST['Disc'] = percent_format($order->line_items[$id]->discount_percent*100);
+ $_POST['item_description'] = $order->line_items[$id]->item_description;
$units = $order->line_items[$id]->units;
hidden('stock_id', $_POST['stock_id']);
label_cell($_POST['stock_id']);
- label_cell($order->line_items[$line_no]->item_description, "nowrap");
+ text_cells(null,'item_description', null, 45, 150);
+ //label_cell($order->line_items[$line_no]->item_description, "nowrap");
$Ajax->activate('items_table');
}
else // prepare new line
function handle_update_item()
{
if ($_POST['UpdateItem'] != '' && check_item_data()) {
+ //alert("description=".$_POST['item_description']);
+ //$_SESSION['items']->line_items[$_POST['LineNo']]->item_description = $_POST['item_description'];
$_SESSION['Items']->update_cart_item($_POST['LineNo'],
input_num('qty'), input_num('price'),
- input_num('Disc') / 100 );
+ input_num('Disc') / 100, $_POST['item_description'] );
}
line_start_focus();
}