<?php
// this code is directly placed in ledgerdetails while adding or altering

// in that file we will be writing conditions for example
function ValidateParam($ledger_main_ledgerhead,$param_1){

if($ledger_main_ledgerhead == "Duties & Taxes" and $param_1 !== ''){
    // check if it s a valid nuber and convert it to floatval
    
    if ((int)$param_1 == $param_1) {
        //is an integer
        return floatval($param_1);
    }
    
}
}
?>