Dear Admin Sir, i want to develop one small module. My Requirement is in Stock Journal Entry Total Consumption Qty and Total Production Qty must be same. if Not same then it will show the message and not save the voucher. Also in Production Side, Which ever Item in Production batch number will be automatic create. [batch number should be "Voucher No + Voucher Date"] Please help me sir.
Dear Sir, I have created that module and its works successfully but when we use Alternate Unit at that time its did't works. Please help me sir. Herewith I share my code. ;;-------------------------------------------------------------------------------------- ;; Company Level ;;-------------------------------------------------------------------------------------- [#Part : CMP Acc Feat Left] Add : Line : SSSModule1 [Line : SSSModule1] Fields : Medium Prompt, SSSModule1 ;;Logical Field Local : Field : Medium Prompt : Info : $$LocaleString:"Enable Module ?" Local : Field : Medium Prompt : Color : Blue Local : Field : Medium Prompt : Style : Normal Bold Space Top : 0.25 [Field : SSSModule1] Use : Logical Field Storage : SSSModule1 Color : Red Style : Normal Bold [System : UDF] SSSModule1 : Logical : 23 [System : Formula] Module1 : $SSSModule1:Company:##SVCurrentCompany VCS_VTYP Enable : $VCS_VTYPEnable:VoucherType:##SVVoucherType ;;--------------------------------------------------------------------------------- ;; Stock Journal Level ;;--------------------------------------------------------------------------------- ;;--------------------------------------------------------------------------------------------- ;; Voucher Type Level STOCK JOURNAL ;;--------------------------------------------------------------------------------------------- [#Part: VTYP BehaviourMain] Option: VTYP BehaviourMain1 : @@Module1 [!Part: VTYP BehaviourMain1] ;;Add : Line : After : VTYP PrintSave : VCS_VTYP Enable Add: Line: At End:VCS_VTYP Enable [Line: VCS_VTYP Enable] Fields : Long Prompt, VCS_VTYP Enable Local : Field : Long Prompt : Info : $$LocaleString:"Enable Quantity Control ?" Local : Field : Long Prompt : Color : Blue Local : Field : Long Prompt : Width : @@LongWidth Local : Field : Long Prompt : Inactive : NOT $$IsStockJrnl:$Parent Invisible : NOT @@Module1 ; AND NOT $$IsStockJrnl [Field: VCS_VTYP Enable] Use : Logical Field Storage : VCS_VTYP Enable Set always : Yes Color : Blue Set as : Yes Invisible : NOT @@Module1 Inactive : NOT $$IsStockJrnl:$Parent [System: UDF] VCS_VTYP Enable : Logical : 1500 ;;--------------------------------------------------------------------------------------------- ;;--------------------------------------------------------------------------------------------- [#Form: NRML StkJrnl] Option : NRML StkJrnl1 : @@Module1 AND @@VCS_VTYPEnable [!Form:NRML StkJrnl1] Control : Vishal : IF $$Total:VCHSTKJrnlBilledQty = $$Total:VCHBilledQty then No Else Yes ;Control : Vishal : IF $$Total:#VCHSTKJrnlBilledQty = $$Total:#VCHBilledQty then No else Yes ;$$Total:VCHBilledQty then No Else Yes [System: Formulas] Vishal : "Total Consumption and Total Production qty must be equal" [#Form: MFG StkJrnl] Option : MFG StkJrnl1 : @@Module1 AND @@VCS_VTYPEnable [!Form:MFG StkJrnl1] Control : Vishal : IF #MVCHBilledQty = #VCHBilledQtyTotal then No Else Yes [#Field: VCHSTKJrnl BilledQty] Format : "No Symbol" [*Field: VCHSTKJrnl BilledQty] Use : Qty Primary Field Width : @@VCHQtyWidth Set always : Yes Storage : Billed Qty Inactive : $$IsEnd:$StockItemName OR @@NOBaseUnits ; Collval : ##lvCompValues[#VCHMfgJrnlItemLineNo].vActualQty ; MfgrCollVal : ##lvByCoValues[#VCHMfgJrnlItemLineNo].vActualQty Style : Small ;; Note : Set is changed to Set the value from the batch allocation form, Indent condition not added to it. ; Set as : If (@@AsMfgJrnl AND NOT $$IsFieldEdited AND NOT @@HasBatchWise) Then ((@CollVal * #MVCHBilledQty)/@BaseQty) Else + ; If (@@HasBatchWise OR @@HasTrackingNo) Then $$CollQtyTotal:BatchAllocations:$BilledQty Else $$Value ;BaseQty : ##SVMVCHBOMCompBaseQty ;Notify : NegativeStock : ##VCFGNegativeStock AND @@InvoiceInCreate AND $$IsNegative@FinalStockTotal Option : QtyWithcmdUnit : ##ICFGStkCmdunit Key : Create Voucher ;; skip on condition is added to make the quantity field skip if batchwise is on ; Skip On : $$IsStockJrnl:##SVVoucherType AND ((@@HasBatchWise OR @@HasTrackingNo)) OR (##VCFGTrackCreditNote) Format : "No Symbol" ;;--------------------------------------------------------------------------------- ;; ITEM MASTER LEVEL ;;---------------------------------------------------------------------------------