Пример #1
0
 public function delete($id)
 {
     $data = array();
     $status = Response::STATUS_NOT_FOUND;
     if (fn_delete_tax($id)) {
         $status = Response::STATUS_NO_CONTENT;
     }
     return array('status' => $status, 'data' => $data);
 }
Пример #2
0
 public function delete($id)
 {
     $data = array();
     $status = Response::STATUS_NOT_FOUND;
     if (fn_delete_tax($id)) {
         $status = Response::STATUS_OK;
         $data['message'] = 'Ok';
     }
     return array('status' => $status, 'data' => $data);
 }
Пример #3
0
/**
 * Delete taxes
 *
 * @param array $tax_ids IDs of the taxes to be removed.
 * @return boolean true
 */
function fn_delete_taxes($tax_ids)
{
    /**
     * Delete taxes (running before fn_delete_taxes() function)
     *
     * @param array $tax_ids Taxes identifier
     */
    fn_set_hook('delete_taxes_pre', $tax_ids);
    foreach ((array) $tax_ids as $v) {
        fn_delete_tax($v);
    }
    return true;
}