Alternative items in production

I do not quite understand why the alternative item functionality is only available for sales not for production. Consider the following scenario: Cream typically is bought in small volumes at around $3.00 per KG. A large order of a special product might allow us to buy larger volumes at say $2.00 per KG. The price of the standard cream should not be change for the costing of standard jobs because when the large job ceases, the small jobs need to pay for themselves.
An easy solution would be the use of an alternative item with an independent price, but of course the the two items can be used interchangeably on the shopfloor.
A small mod in one of the ProdUpd… classes (e.g. ProdUpdStartup.updateBOMConsumption()) activates alternative items for production. It functions by checking the availablility of the BOMItems when starting the job. Depending on the configuration it might be more appropriatly placed in another of ther ProdUpd… classes.
 
void updateBOMConsumption()
{
    […]
    Container                   c; //bw
    ItemId                      altItemId;    //bw
    InventDim                   altInventDim; //bw
    ;
    […]
    while(loop)
        {
            prodBOM = recListProdBOM.peek();
            if(!prodBOM.RecId)
            {
                loop = recListProdBOM.next();
                continue;
            }
            prodBOM.selectForUpdate(true);
//bw start
//Changed on 30 Apr 2007 by TW
/* Description:
Allow for alternative ingredients
*/
           //only if not yet consumed and no specific dimension has been assigned
           if(prodBOM.QtyInventCalc == prodBOM.RemainInventPhysical
              && (!prodBom.InventDimId || prodBom.InventDimId == InventDim::inventDimIdBlank()))
           {
                // use standard method to find an alternative item for the desired qty.
                c = InventTable::findAlternativeItem(prodBom.ItemId,prodBom.InventDim(),prodBom.QtyInventCalc);
                if (c)
                {
                    altItemId = conpeek(c,1);
                    altInventDim = conpeek(c,2);
                    prodBom.ItemId = altItemId;
                    if (altInventDim)
                        prodBom.InventDimId = altInventDim.inventDimId;
                    else
                        prodBom.InventDimId = InventDim::inventDimIdBlank();
                }
            }
//bw end
            prodBOMCalc = ProdBOMCalc::newBOMCalcData(BOMCalcData,
                                                      prodBOM,
                                                      consumpProposal,
                                                      prodParmStartUp.BOMAutoConsump,
                                                      !prodBOM.ConstantReleased,
                                                      NoYes::No,
                                                      true);
           […]
}
 
Advertisements

3 thoughts on “Alternative items in production

    • Hi Eric

      I’m sorry about this. As you might have seen, the posting is from 2007 so likely using Axapta 4.0.
      I’m have never revisited the posting for more currents Versions.

      Regards
      Thomas

      • Hi, Thomas
        Thanks a lot for your kindly response! I just want to get something about Production Alternative Item. Tried every solution which I got from internet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s