! -> Note
$ -> Affected files
+24-Nov-2008 Joe Hunt
+! Preparing for graphic Links
+$ config.php
+ /includes/ui/ui_input.inc
+ /sales/sales_order_entry.php
+ /sales/includes/ui/sales_order_ui.inc
+ /themes/aqua/images/ok.gif
+ /themes/cool/images/ok.gif
+ /themes/default/images/ok.gif
+# Small layout bug in header2.inc
+$ /reporting/includes/header2.inc
+# Small layout bug in report bank statement
+$ /reporting/rep601.php
+# Restriction on links
+$ /sales/inquiry/customer_inquiry.php
+
22-Nov-2008 Joe Hunt
+ Preparing for Graphic Links final.Optimized.
$ config.php
{
define("ICON_EDIT", "edit.gif");
define("ICON_DELETE", "delete.gif");
- define("ICON_ADD", "add.png");
+ define("ICON_ADD", "ok.gif");
+ define("ICON_UPDATE", "ok.gif");
+ define("ICON_OK", "ok.gif");
+ define("ICON_CANCEL", "delete.gif");
define("ICON_GL", "gl.png");
define("ICON_PRINT", "print.png");
define("ICON_PDF", "pdf.gif");
." name=\"$name\" id=\"$name\" value=\"$value\""
.($title ? " title='$title'" : '')
."><span>$value</span>"
- .($icon ? "<img src='$path_to_root/themes/default/images/$icon'>" : '')
+ .($icon ? "<img src='$path_to_root/themes/".user_theme()."/images/$icon'>" : '')
."</button>\n";
if ($echo)
echo $submit_str;
$col += $width;
if ($doctype == 9)
$this->TextWrap($col, $this->row, $width, sql2date($myrow['delivery_date']), 'C');
- else if ($doctype != 8 && isset($myrow['due_date']))
+ else if ($doctype != 8 && $doctype != 11 && isset($myrow['due_date']))
$this->TextWrap($col, $this->row, $width, sql2date($myrow['due_date']), 'C');
$this->row = $iline5 - $this->lineHeight - 1;
$rep->TextCol(0, 3, $act);
$rep->TextCol(3, 5, _('Opening Balance'));
if ($prev_balance > 0.0)
- $rep->TextCol(6, 7, number_format2(abs($prev_balance), $dec));
+ $rep->TextCol(5, 6, number_format2(abs($prev_balance), $dec));
else
- $rep->TextCol(7, 8, number_format2(abs($prev_balance), $dec));
+ $rep->TextCol(6, 7, number_format2(abs($prev_balance), $dec));
$rep->Font();
$total = $prev_balance;
$rep->NewLine(2);
$rep->Font('bold');
$rep->TextCol(3, 5, _("Ending Balance"));
if ($total > 0.0)
- $rep->TextCol(6, 7, number_format2(abs($total), $dec));
+ $rep->TextCol(5, 6, number_format2(abs($total), $dec));
else
- $rep->TextCol(7, 8, number_format2(abs($total), $dec));
+ $rep->TextCol(6, 7, number_format2(abs($total), $dec));
$rep->Font();
$rep->Line($rep->row - $rep->lineHeight + 4);
$rep->NewLine(2, 1);
{
edit_button_cell("Edit$line_no", _("Edit"),
_('Edit document line'));
- edit_button_cell("Delete$line_no", _("Delete"),
+ delete_button_cell("Delete$line_no", _("Delete"),
_('Remove line from document'));
}
end_row();
if ($id!=-1)
{
- edit_button_cell('UpdateItem', _("Update"),
- _('Confirm changes'));
- edit_button_cell('CancelItemChanges', _("Cancel"),
- _('Cancel changes'));
+ button_cell('UpdateItem', _("Update"),
+ _('Confirm changes'), ICON_UPDATE);
+ button_cell('CancelItemChanges', _("Cancel"),
+ _('Cancel changes'), ICON_CANCEL);
hidden('LineNo', $line_no);
set_focus('qty');
}
function credit_link($row)
{
- return $row['type'] == 10 ?
+ return $row['type'] == 10 && $row["TotalAmount"] - $row["Allocated"] > 0 ?
pager_link(_("Credit This"),
"/sales/customer_credit_invoice.php?InvoiceNumber=".
$row['trans_no'], ICON_CREDIT)
switch($row['type']) {
case 10:
- $str = "/sales/customer_invoice.php?ModifyInvoice=".$row['trans_no'];
+ if (get_voided_entry(10, $row["trans_no"]) === false && $row['Allocated'] == 0)
+ $str = "/sales/customer_invoice.php?ModifyInvoice=".$row['trans_no'];
break;
case 11:
- if ($row['order_']==0) // free-hand credit note
- $str = "/sales/credit_note_entry.php?ModifyCredit=".$row['trans_no'];
- else // credit invoice
- $str = "/sales/customer_credit_invoice.php?ModifyCredit=".$row['trans_no'];
+ if (get_voided_entry(11, $row["trans_no"]) === false && $row['Allocated'] == 0) // 2008-11-19 Joe Hunt
+ {
+ if ($row['order_']==0) // free-hand credit note
+ $str = "/sales/credit_note_entry.php?ModifyCredit=".$row['trans_no'];
+ else // credit invoice
+ $str = "/sales/customer_credit_invoice.php?ModifyCredit=".$row['trans_no'];
+ }
break;
case 13:
- $str = "/sales/customer_delivery.php?ModifyDelivery=".$row['trans_no'];
+ if (get_voided_entry(13, $row["trans_no"]) === false)
+ $str = "/sales/customer_delivery.php?ModifyDelivery=".$row['trans_no'];
break;
}
- return pager_link(_('Edit'), $str, ICON_EDIT);
+ if ($str != "")
+ return pager_link(_('Edit'), $str, ICON_EDIT);
+ return '';
}
function prt_link($row)
{
- if ($row['type'] != 12) // customer payment printout not defined yet.
+ if ($row['type'] != 12 && $row['type'] != 2) // customer payment or bank deposit printout not defined yet.
return print_document_link($row['trans_no'], _("Print"), true, $row['type'], ICON_PRINT);
}
if ($_SESSION['Items']->trans_no == 0) {
submit_center_first('ProcessOrder', $porder,
- _('Check entered data and save document'), true, 'confirm.png');
+ _('Check entered data and save document'), true, ICON_OK);
} else {
submit_center_first('ProcessOrder', $corder,
- _('Validate changes and update document'), true, 'confirm.png');
+ _('Validate changes and update document'), true, ICON_OK);
}
submit_center_last('CancelOrder', $cancelorder,
_('Cancels document entry or removes sales order when editing an old document'),
- true, 'escape.png');
+ true, ICON_CANCEL);
} else {
display_error($customer_error);
}