using this, [#Line: EI ColumnOne] Add: Option: Disc EI ColumnOne: @@IsSales Add: Option: Disc EI ColumnOne: @@IsPurchase [!Line: Disc EI ColumnOne] Local: Field: VCH DiscTitle: Set as: "Disc Amt" Local: Field: Default : Style : Normal Bold [#Line: VCHBATCH ColumnOne] Add: Option: Disc EI ColumnName: @@IsSales Add: Option: Disc EI ColumnName: @@IsPurchase [!Line: Disc EI ColumnName] Local: Field: VCH DiscTitle: Info: "Disc Amt" [#Field: MPSDiscountTitle] Set as: "Discount Amt" [System: Formula] CalcedAmt: ($Rate * $BilledQty) - $BatchDiscount NrmlAmount: ($BilledQty * $Rate) - $BatchDiscount [# Field: EXPINV DiscTitle] Info : $$LocaleString:"Disc." Border : Thin Left Align : Centre Width : 5 Style : Small Invisible : If (@@IsJobOrderOut OR @@IsJobOrderIn OR (@@IsSales And (@@AcctsInvoice OR @@AcctsInvoiceMfgr))) Then Yes Else (NOT @@WithDiscount OR (NOT @@InvWithRate AND NOT @@InvWithAmt)) [#Field: VCH Discount] Delete: Format Add: Format: "Nopercent,NoZero" [#Field: VCHBATCH Discount] Delete: Format Add: Format: "Nopercent,NoZero" [#Field: VCH Value] Resetval: if (@@NoBaseUnits OR $$IsEmpty:BilledQty) then $$Value else (($Rate * $BilledQty) - $Discount) [#Field: EXPINV Discount] Use : Number Field Align : Right Style : Small Set as : $Discount Width : 5 Border : Thin Left Format : "NoZero,NoPercentage" Invisible : If (@@IsJobOrderOut OR @@IsJobOrderIn OR (@@IsSales And (@@AcctsInvoice OR @@AcctsInvoiceMfgr))) Then Yes Else (NOT @@WithDiscount OR (NOT @@InvWithRate AND NOT @@InvWithAmt))
instead all this formula just creat ledger discount-1, dis-2 under indirect exp group. while entring invoice after tax entry u can give 2 dis.
hahahahaha.....Rony, do you know where this indirect expense goes then?...it will go into P&L and will show your profit less by that amount which is wrong..right? In first look the code seems correct...i didn't checked though Thanks! http://www.aaradhyaasolutions.in
if you will give discount in invoice automatically sell will go less and it also effect P&L. Are u asking that even discount given but want effect P&L ?
Exactly, making discount ledger under indirect expenses takes double effect on your profit. 1. reduce sales values 2. shows discount ledger as a expense in your P&L which reduces net profit Support Team, www.aaradhyaasolutions.in
One thing I can't understand. Suppose sales amount is rs. 100 in 1st dis rs 10, second rs 5 means net sale is 85. Now if u go through my suggestion sales will be 100 and in P&L dis will reduce the profit by 15 means rs. 85/-. Now what is the diff in both ?