I get the below error when I try saving CLASS 1 below. The second class that is the problem is also below. I obviously don't understand objects or apex well, so any help would be greatly appreciated.
Error: Compile Error: Method does not exist or incorrect signature: [Decimal].getSmallQtyPenalty(Decimal, SOBJECT:Mfg_Run_Charges_Rate__c) at line 27 column 42
CLASS 1:
public class MOChargeRate{
public static decimal getMOChargeR(boolean noWin,
boolean MOWinDie,
boolean punchWin,
boolean dblWin,
boolean furnBlank,
boolean furnPrePrint,
decimal wrkPerMQty,
decimal wrkQty,
List<Mfg_Run_Charges_Rate__c> mfgRCR){
decimal MOCharge = 0.0;
decimal punchChgAmt = 0.0;
decimal winPenalty = 1;
decimal punchUpchg = 0;
decimal furnPenalty = 1;
decimal smallQtyPenalty = 1;
for (Mfg_Run_Charges_Rate__c MO : mfgRCR){
if (wrkQty < 50000){
if (MO.Pricing_Code__c == 'MO'){
if (MOWinDie){
if (furnBlank){
if (MO.Window__c == 'Special Window' &2& (MO.Furnished__c == 'Blank' || MO.Furnished__c == 'Both')){
smallQtyPenalty =smallQtyPenalty.getSmallQtyPenalty(wrkQty, MO );
winPenalty = MO.Window_Penalty__c;
break;
}
}
}
}
}
}
return MOCharge;
)
SECOND CLASS:
public class smallQtyPenalty{
public static decimal getSmallQtyPenalty(decimal qty,
Mfg_Run_Charges_Rate__c m){
decimal smQtyPnlty;
if (qty >= m.Small_Qty_1_Min__c && qty <= m.Small_Qty_1_Max__c){
smQtyPnlty = m.Small_Qty_1_Penalty__c;
} else if (qty >= m.Small_Qty_2_Min__c && qty <= m.Small_Qty_2_Max__c){
smQtyPnlty = m.Small_Qty_2_Penalty__c;
} else if (qty >= m.Small_Qty_3_Min__c && qty <= m.Small_Qty_3_Max__c){
smQtyPnlty = m.Small_Qty_3_Penalty__c;
} else if (qty >= m.Small_Qty_4_Min__c && qty <= m.Small_Qty_4_Max__c){
smQtyPnlty = m.Small_Qty_4_Penalty__c;
}
return smQtyPnlty;
}
}