Topic: Workflow adjustment to sales_order_ui.inc

In sales_order_ui.inc the reference number input is placed in table_section(1) and I beleive workflow is better if it is placed at the end of table_section(4). Because...

When entering an invoice and tabbing through the fields with a keyboard. If you enter a custom reference in table_section(1) then tab through to table_section(4) and enter a date it will update the reference number to the next sequencial number causing you to go back to table_section(1) to replace the value again.

I suggest removing this line from line 361

ref_row(_("Reference").':', 'ref', _('Reference number unique for this document type'), null, '', $order->trans_type, array('date'=> @$_POST['OrderDate']));

and place it here around 458

    else
    {
        label_row($date_text, $order->document_date);
        hidden('OrderDate', $order->document_date);
    }
    
    ref_row(_("Reference").':', 'ref', _('Reference number unique for this document type'), null, '', $order->trans_type, array('date'=> @$_POST['OrderDate']));

    end_outer_table(1); // outer table

    if ($change_prices != 0) {
        foreach ($order->line_items as $line_no=>$item) {
            $line = &$order->line_items[$line_no];
            $line->price = get_kit_price($line->stock_id, $order->customer_currency,
                $order->sales_type, $order->price_factor, get_post('OrderDate'));
        }
        $Ajax->activate('items_table');
    }

Let me know if this will cause trouble that I am unaware I am trying it now.

Re: Workflow adjustment to sales_order_ui.inc

Update, I have used it this way for a week with no problems. It works much better.

Re: Workflow adjustment to sales_order_ui.inc

It actually looks nice in just 2 lines instead of 3 line header table.

@joe: Want to add it into the core or does it go against intuition (needing to be first seen) and / or familiarity hitherto?

Post's attachments

SalesUI_fix.zip 74.8 kb, 4 downloads since 2018-01-17 

You don't have the permssions to download the attachments of this post.