Diversen nav mail Peter
This commit is contained in:
@@ -44,4 +44,17 @@ class vatController extends MY_Controller {
|
||||
$vatrate = $this->input->post( 'vatrate' );
|
||||
Vat::whereId( $vatID )->update( ['vatrate' => $vatrate] );
|
||||
}
|
||||
|
||||
public function removeVat( $vatID )
|
||||
{
|
||||
$removeVat = new RemoveVat($vatID);
|
||||
|
||||
$allowRemove = $removeVat->getRemoveAllowed();
|
||||
|
||||
if( $allowRemove === FALSE ) return $this->json( ['result'=>FALSE]);
|
||||
|
||||
Vat::whereId($vatID)->delete();
|
||||
|
||||
$this->json( ['result'=>TRUE]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user