Hi Anne,

please see my comments inline:

On Dec 17, 2009, at 6:07 AM, [email protected] wrote:

> Hi
> 
> I need to have an invoice generated regularly, say once a month or perhaps on 
> demand, for all items ordered by each customer during that month "on 
> account". There doesn't seem to be any support for this at the moment (please 
> point me to it if I'm wrong).
> 
> I doubt I'm the only one that needs this, so I'd appreciate some advice as to 
> how to implement it so it is unlikely to adversely affect existing 
> functionality, and so it has a chance of being accepted into trunk.
> 

Yes, (unfortunately) this is a strongly used practice in Italy (and I guess 
Europe) as well: we like to complicate things that could be simpler.

> Main requirements are:
> 
> - orders can be fulfilled (i.e. shipped goods or supplied services) without 
> generating an invoice

This is already supported (will need some fine tuning): when you issue items to 
a sales shipment, the order is completed but the invoice is only generated when 
you change the status of the shipment to "picked"; so, if you don't change the 
status of the shipments you will have more than one shipment pending invoicing.

> - at a regular configurable interval, an invoice is generated for each 
> customer, containing all previously uninvoiced order items.
> 

This is not available, and should be easy to implement because the "create 
invoice" service already support the concept of an invoice containing more than 
one 'shipment'; also, the invoice PDF already support this (it will print the 
shipmentId at the beginning of each section).
The service you will have to use for this is "createInvoicesFromShipments" 
instead of "createInvoicesFromShipment" (the one that is currently used): you 
will have to pass to it the list of shipments you will put in the invoice.
The steps are the following:
1) retrieve a list of shipments over a date range (fromDate - thruDate) that 
needs to be invoiced
2) group them by customer (bill to party): every customer will have its own 
list of shipmentId to be invoiced
3) for each customer you call the createInvoicesFromShipments passing to it the 
list of shipmentIds

Then, it would be nice to find a cleaner way to trigger (or not) the invoice 
creation from shipment status... but we can think more about this.
This stuff could definitely go into the trunk, imo.

I hope it helps

Jacopo

> So a customer can order (and receive) 5 widgets on the 5th of the month, and 
> 4 gizmos on the 20th. On the 30th of the month, a single invoice is generated 
> which contains one item for 5 widgets and another item for 4 gizmos. This is 
> similar to staying in a hotel, where eating in the restaurant is charged to 
> your room, and you receive one invoice at the end of your stay listing all 
> your restaurant orders.
> 
> So far, I'm thinking of achieving this by:
> 
> - putting fulfilled orders into Sent status, without generating an invoice 
> (maybe I need to introduce a Sent status for order items?)
> - creating a service which gathers all order items for a customer that are in 
> Sent status, generates a single invoice for all of them, and sets their 
> status to Completed.
> 
> I am still going through the existing system, trying to work out the best 
> places and ways to achieve this.
> 
> If there's a better approach I should consider, or anything I need to watch 
> out for, I would greatly appreciate hearing about it!
> 
> Cheers,
> Anne.
> 
> -- 
> Coherent Software Australia Pty Ltd
> PO Box 2773
> Cheltenham Vic 3192
> Phone: (03) 9585 6788
> Fax: (03) 9585 1086
> Web: http://www.cohsoft.com.au/
> Email: [email protected]
> 
> Bonsai ERP, the all-inclusive ERP system
> http://www.bonsaierp.com.au/
> 

Reply via email to