Topic: Recurrent Sales Orders

I have looked at the template option, but don't think that will work.  We manufacture a product that all of our customers order annually.  In QB we'd been opening an old order and copying it so that we didn't have to enter every line item every year.  Is there any way to do that in FA with Sales Orders?  We're almost ready to go live with this, but have a few snags to iron out yet.  Thanks!

Re: Recurrent Sales Orders

Sounds like FA does exactly what you want.
make a template for the client from a sales order / invoice. Then Template delivery or invoice depending on your sales flow.

Do it like this
make a sales order, direct delivery, or direct invoice then--> open 'sales order inquiry' and set 'tmpl' checkbox

After that anytime you want to recreate it do Template Delivery or Template Invoice

You can also make it recurrent and it will remind you to create it at a years time but I dont like how the UI Select only has the order number in the drop down list and not the customer or branch so I usually don't do this since it takes time to reference.

3 (edited by jeskremer 04/22/2024 05:27:46 pm)

Re: Recurrent Sales Orders

Yes and no.  Every customer orders different items.  Every year, the customers adjust the quantities of their items.  If I use the template option, I would have to have a template for every customer that does repeat business for me rather than just being able to duplicate and edit a prior Sales Order.

As an example, we sell diplomas and graduation products.  They order annually, but every customer orders different styles, colors, etc.

Re: Recurrent Sales Orders

Ok So it does what you want but with the extra step "create template" and you want to copy a new order right away right?

the "Cart" of an order can be copied by adding the order # to the url like so

https://{your-url}/sales/sales_order_entry.php?NewDelivery=0 (this is the direct delivery url)
Change the 0 to the order with the cart you want to copy.

'NewDelivery' is for direct deliveries
'NewInvoice' is for direct invoice

If I wanted to make this a super easy single click I would add a copy link to the table of the page you like to look at past orders like the Customer Transaction Inquiry

Re: Recurrent Sales Orders

Ok so how I just did it is like this...

edit in file "/sales/inquiry/customer_inquiry.php"

add this copy function around the other link functions like "edit link"

function copy_link($row)
{
    global $page_nested;

    if ($page_nested)
        return '';
  if ($row['type'] == ST_CUSTDELIVERY)
    return pager_link(_('Copy Delivery'), "/sales/sales_order_entry.php?NewDelivery=" 
      .$row['order_'], ICON_DOC);
  else if ($row['type'] == ST_SALESINVOICE)
    return pager_link(_("Copy Invoice") ,
    "/sales/sales_order_entry.php?NewInvoice=". $row['order_'], ICON_DOC);
}

then add "array('insert'=>true, 'fun'=>'copy_link')," $cols array at the bottom of the page my finished $cols looks like this

$cols = array(
    _("Type") => array('fun'=>'systype_name', 'ord'=>''),
    _("#") => array('fun'=>'trans_view', 'ord'=>'', 'align'=>'right'),
    _("Order") => array('fun'=>'order_view', 'align'=>'right'), 
    _("Reference"), 
    _("Date") => array('name'=>'tran_date', 'type'=>'date', 'ord'=>'desc'),
    _("Due Date") => array('type'=>'date', 'fun'=>'due_date'),
    _("Customer") => array('ord'=>''), 
    _("Branch") => array('ord'=>''), 
    _("Currency") => array('align'=>'center'),
    _("Amount") => array('align'=>'right', 'fun'=>'fmt_amount'), 
    _("Balance") => array('align'=>'right', 'type'=>'amount'),
        array('insert'=>true, 'fun'=>'gl_view'),
        array('insert'=>true, 'fun'=>'edit_link'),
        array('insert'=>true, 'fun'=>'copy_link'),
        array('insert'=>true, 'fun'=>'credit_link'),
        array('insert'=>true, 'fun'=>'prt_link')
    );

@apmuthu and @joe
this is a simple change and would probably be handy for many people. I would consider adding it to core if you dont think it clutters the table to much.

Re: Recurrent Sales Orders

Oh, awesome.  Thank you!  I was getting ready to find a programmer.  I'll give it a try.

Re: Recurrent Sales Orders

@joe: appears to be a useful feature. Care to place it in the core with an toggle flag in the per company options?

Re: Recurrent Sales Orders

Will do.

Joe

Re: Recurrent Sales Orders

This has been implemented as a new feature. Pushed to stable repo. Not needed to be an extra flag in company setup. It will be official from minor 2.4.19.

You can download the files /sales/inquiry/customer_inquiry.php and /lang/new_language_template/empty.po and replace on your server and it will work immediately.

Thanks @trafficpest for proposing this. Very good!

Joe

Re: Recurrent Sales Orders

I did try this and it works great for Direct Invoice.  What would you recommend adjusting to replicate a Sales Order?

Re: Recurrent Sales Orders

It will auto create a new sales order for you.
It works on delivery or invoice both will make an new order for you.
Im guessing you get a order and schedule a delivery?