Diversen nav mail Peter

This commit is contained in:
2018-08-05 10:48:53 +02:00
parent 16616f13d2
commit b0a866ba11
7 changed files with 129 additions and 6 deletions
@@ -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]);
}
}