Plugin: Alt OrderLine

From iDempiere en


Continuation

  • This project is a separate plugin and continuation of Plugin:_Alternative_Output.
    • To be able to group items arbitrarily and have control over their output display on screen and in printout.
  • This plugin here has additional CONSOLIDATE and CONSOLIDATE_SAME_LINE output control.
  • Again, what is vital is that this is a pure separate non impact to core or design entanglement, i.e. it allows more plugins to work on the same core as long as every plugin follows the same practice. It is a Java and OSGi concept of Object-Oriented to have separation of concern and loosely coupled.

Release Status

  • This is a beta release but good for production because it has no impact to any data values in database nor corrupt any processing.
  • It is beta only pending it to become more fine working and complete.
  • So users are welcome to try it and provide feedback to improve further.

How To Use

  • From Plugin repo, run the SQL script Alt_OrderLineView.sql to create the alternative printout view in your Database.
  • Pack In the Alt_OrderLine.zip to your System admin.
  • Install the plugin AltOrderLine_3.1.0.<timestamp>.jar via your Felix OSGi console.
  • Setup any product under a new BOM in the Parts and BOM menu as shown below.
  • Prepare a Sales Order and see the effects.
  • Print Preview out the Sales Order to see the effects. (Set your Document Type for Standard Order to the new Print Format - Order Header AS)
  • You can still return to normal use while this plugin is running as if nothing changed.

Uninstalling

  • To uninstall, simply stop or uninstall the plugin jar in your Felix Console.
  • Go to Window-Tab and remove the last tab - Alt OrderLine
  • Go to PrintFormat and remove Order Header AS and Order Line AS
  • However remember that the plugin has no backward impact and thus very compatible and safe to use.

Tab Model

SOrderLineAlt.png
AltCONSOLIDATE.png
AltConsolidated.png
AltCONSOLIDATESAMELINE.png
AltConsolidatedSameLine.png
  • The extra tab model, C_ALT_OrderLine has minimal overlay of C_OrderLine fields merely for output model.
  • C_ALT_OrderLine parent key is C_Order_ID, and it correlates with C_OrderLine_ID for easier View handling during printformat.
  • PrintFormats of Standard Order is copied over as optional PrintFormat, is compatible with simple JOIN to C_Alt_OrderLine.

CONSOLIDATE for Readability

  • Hash # character in BOM parent Document Note box, to effect any group of products.
  • HEADER#CONSOLIDATE will take any similar product lines into one with its qty value summed up
  • HEADER#CONSOLIDATE_SAME_LINE will group only those that have same qtys.
  • HEADER# is mandatory and will pull BOM Parent label as first line of output. You can leave it blank if unneeded.
  • #DETAIL_NO_PRICE and #DETAIL_OWN_PRICE still working as other plugin.
  • Example of #CONSOLIDATE_SAME_LINE:
    • Cable A1 - Qty=100 meters
    • Cable A1 - Qty=100 meters
  • Will result in:
    • 2 X Cable A1 - Qty=100 meters
  • If set to #CONSOLIDATE will result in:
    • Cable A1 - Qty=200 meters

Screenshots of Examples

  • See screen above of normal OrderLine tab showing source that has two lines of similar products and similar qtys (2 sets of Seeders at qty=5)
  • They will be used to quickly test the plugin as shown on screens below.
  • First the setting is to #CONSOLIDATE#, then Prepare the Sales Order.
  • Note the output has both lines merged with the qty = 10
  • Next we change to #CONSOLIDATE_SAME_LINE, and Prepare the same Sales Order again.
  • Note that now the alternative orderline has maintained the qty = 5 but description is '2 X <product>'
  • All real data such as prices and totals remain untouched. It is only display that is affected.

Easy Source

  • I have made the source code as pushed to bitbucket well described so that any coder can change it easily.
  • Note that the ALT tab only affects Name, PriceEntered and QtyOrdered.
  • Also note that during BOM Parent setting, only the first record need be registered to give effect. This setup is not strict and inclusive rather than exclusive. After some playing around the user should be very efficient and quick is doing any variant required.

2Pack

AltPrintFormat.png
AltPrintFormatSameLine.png
AltPrintFormatDetailNoPrice.png
  • 2Pack is embedded in alt.orderline plugin jar
  • After auto Pack In, under System Admin, the PackOut window can be reused to modify and pack out again.

Print Format

  • Now a PrintFormat option for Sales Order Window is set for Document Type 'Standard Order'
  • It is a copy of the Order Template but referring to a new View that access the Alt table.
  • In this example is tested with three cases:
      1. CONSOLIDATE of same products to single line with HEADER# grouping label
      2. CONSOLIDATE_SAME_LINE of same line/qty X 2
      3. DETAIL_NO_PRICE to supress group children pricing and retain only parent grandtotal
    • More order lines are added, one above and one below, to see if structural integrity is maintained
  • User can also switch back to old PrintFormat from the pull down menu.
  • This finally proved that all cases can be handled with no impact to core.

One more idea

  • Note that the Alt_Orderline tab in Sales Order can be easily and conveniently replaced by the AltOrder_LineView directly and even give a more exact preview before print preview. This will save time because the user can change the HEADER# changes and press Prepare and right away see the print preview output!
  • This concept can be applied to any other Window. It is matter of creating a new extra tab and use its JOIN design to the view table that its respective PrintFormat refers to.
  • Perhaps one day with enough usage, we can abstract this completely to a configurator without coding further.

If you want to provide additional comments, please use the Discussion page.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.