(function (paw, utils) {
    function InventoryFixedAssetsService() {
        this.settings = {
            createApiUrl: undefined,
            updateApiUrl: undefined,
            removeApiUrl: undefined,
            confirmApiUrl: undefined,
            deleteInventoryApiUrl: undefined,
            fillApiUrl: undefined,
            statusApiUrl: undefined,
            moveToRegisterApiUrl: undefined,
            checkEmptyActivationDatesApiUrl: undefined
        };
    }

    InventoryFixedAssetsService.prototype.setup = function (settings) {
        paw.lang.append(settings, this.settings);
    };

    InventoryFixedAssetsService.prototype.create = function (data) {
        return utils.async.post(this.settings.createApiUrl, data);
    };

    InventoryFixedAssetsService.prototype.update = function (data) {
        return utils.async.post(this.settings.updateApiUrl, data);
    };

    InventoryFixedAssetsService.prototype.remove = function (data) {
        return utils.async.post(this.settings.removeApiUrl, data);
    };

    InventoryFixedAssetsService.prototype.confirm = function (qid) {
        return utils.async.post(this.settings.confirmApiUrl + qparams({
            qid: qid
        }), null);
    };

    InventoryFixedAssetsService.prototype.fetchStatus = function (qid) {
        return utils.async.get(this.settings.statusApiUrl + qparams({
            qid: qid
        }));
    };

    InventoryFixedAssetsService.prototype.fill = function (qid) {
        return utils.async.post(this.settings.fillApiUrl + qparams({
            qid: qid
        }));
    };

    InventoryFixedAssetsService.prototype.checkEmptyActivationDates = function (qid) {
        return utils.async.get(this.settings.checkEmptyActivationDatesApiUrl + qparams({
            qid: qid
        }));
    };

    InventoryFixedAssetsService.prototype.moveToRegister = function (dto) {
        return utils.async.post(this.settings.moveToRegisterApiUrl, dto);
    };

    InventoryFixedAssetsService.prototype.fillFaFromInventory = function (qid, deptCostDrv) {
        return utils.async.post(this.settings.fillFaFromInventoryApiUrl + qparams({
            qid: qid,
            deptCostDrv: deptCostDrv
        }));
    };

    InventoryFixedAssetsService.prototype.deleteInventory = function (qid) {
        return utils.async.post(this.settings.deleteInventoryApiUrl + qparams({
            qid: qid
        }));
    }; 

    paw.view.inventoryFixedAssets.inventoryFixedAssetsService = new InventoryFixedAssetsService();
})(paw, paw.utils);