예제 #1
0
파일: Taxes.php 프로젝트: askzap/ultimate
 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;
}