I have a problem with TSM_Crafting.

I'm really bad at programming, and in an attempt to modify the line 229 in TradeSkillMaster_Crafting.lua for my personnal use, I realised I couldn't find how to make the "Use lower of price sources" checkbox only check the min price of a craft (min(craft market price,craft minimum ah price)), without checking the min price of its mats.

First problem as a consequence:

Let's say you have a crafted item with market price = 1599, minimum item price = 1265, mats market price = 1200 and minimum mats price defined by someone at ... 600 g.
I set up dropdowns in Crafting : market value for mats and craft / minimum price as secondary sources and I tick "Use lower of price sources". The profit is then : 1265-600 = 665; the craft is queued.
But what if the minimum item price was set up by someone at 800g ? Crafting will think " min(1599,800) - min(1200,600) " which is "800-600" which is 200; the craft is queued.
Crafting is now queuing a price that has a crafting cost of 1200 (the mats market price, a more realistic price) and will want to sell it at 800g. I'm loosing money (depending on how auctioning is set up but essentially it will result in a loss).
Another exemple :
If the craft market price appears to drop to 1100g (same other pricing as on the beginning), Crafting will think the profit is " min(1100,1265) - min(1200,600) " which is "1100-600" which is 500. Actually, the price would be more like 1100-1200=-100, which is also loss.

To sum up I encounter a problem since the min. mats crafting cost is used by the checkbox "Use lower of price sources".

Second problem :

The second problem is the workaround : to avoid this we have to check each craft before crafting one, removing from the queue each item with "minimum craft cost" < "mats market cost", which can be really long when browsing through all the glyphs, and other crafts.

Resolution :
I see 2 solutions for my problem.
1)Modifying the code to make "lowestPriceSource" only check the min price of a craft, and without caring about the min price of its mats. (this is where I need some help)
2)Updating TSM_Crafting like on this pic I made on paint : (in that case that would mean the devs would agree adding this will be useful for the community... so better stick with 1 for the moment).


...Unless I missed a point.

Sorry for the bad English.