Subversion Repositories SmartDukaan

Rev

Rev 10864 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed


function selectWarehouseForPOCreation() {
        $('#warehouse-selector-po-creation').show();
        $.colorbox({
                inline : true,
        width : "325px",
        height : "175px",
        opacity : "0.30",
        overlayClose :  true,
        escKey :        true,
        href : "#warehouse-selector-po-creation",
        onClosed : function() {
            $("#warehouse-selector-po-creation").hide();
            $('#warehouse-selection-error').html("");
        }
        });
        event.preventDefault();
        return false;
}

function selectWarehouseForListingPO() {
        $('#warehouse-selector-po-recieve').show();
        $.colorbox({
                inline : true,
        width : "325px",
        height : "175px",
        opacity : "0.30",
        overlayClose :  true,
        escKey :        true,
        href : "#warehouse-selector-po-recieve",
        onClosed : function() {
            $("#warehouse-selector-po-recieve").hide();
            $('#warehouse-selection-error').html("");
        }
        });
        event.preventDefault();
        return false;
}

function openPOCreationPage() {
        $.colorbox.close();
        warehouseId = $("#warehouse-selector-po-creation input[name='warehouse']:checked").val();
        if(warehouseId != 'undefined') {
                this.location.href = "/inventory/purchase-order/new?warehouseId="+warehouseId;
        } else {
                $('#warehouse-selection-error').html("<span>Please select warehouse</span>");
        }
}

function showOpenPOpage() {
        $.colorbox.close();
        warehouseId = $("#warehouse-selector-po-recieve input[name='warehouse']:checked").val();
        if(warehouseId != 'undefined') {
                this.location.href = "/inventory/purchase-order?warehouseId="+warehouseId;
        } else {
                $('#warehouse-selection-error').html("<span>Please select warehouse</span>");
        }
}