Subversion Repositories SmartDukaan

Rev

Rev 5386 | Blame | Compare with Previous | Last modification | View Log | RSS feed

$(function(){
        function hideSettlementUploadForms() {
                $('#hdfc, #ebs, #bluedart, #aramex, #delhivery').hide();
        }
        hideSettlementUploadForms();
        
        $('input[name="reportSource"]').click(function(){
                hideSettlementUploadForms();
                
                if($(this).val() == 'ebs') {
                        $('#ebs').show();
                }
                else if($(this).val() == 'bluedart') {
                        $('#bluedart').show();
                }
                else if($(this).val() == 'hdfc') {
                        $('#hdfc').show();
                }
                else if($(this).val() == 'aramex') {
                        $('#aramex').show();
                }
                else if($(this).val() == 'delhivery') {
                        $('#delhivery').show();
                }
        });
        
        $('select[name="settlementId"]').change(function(){
                var settlementId = parseInt($(this).val());
                
                if (settlementId > 0) {
                        $('#ebsSettlement').show();
                        
                } else {
                        $('#ebsSettlement').hide();
                }
        });
        
        $('.markorders').click(function(){
                
                if($(this).val() == 'markOrdersAsPaid') {
                        $('#uploadorders').show();
                }
                else if($(this).val() == 'markOrdersAsReturned') {
                        $('#uploadorders').show();
                }
        });
        
        $('.downloadtype').click(function(){
                $('#download').hide();
                $('#downloadbydate').hide();
                if($(this).val() == 'downloadbyvendor') {
                        $('#download').show();
                }
                else if($(this).val() == 'downloadbydate') {
                        $('#download').show();
                        $('#downloadbydate').show();
                }
        });
        
        $('#uploadorders').hide();
        $('#download').hide();
        $('#downloadbydate').hide();
});