Allow empty tax category id (#4285) (#4288)

This commit is contained in:
jekkos
2025-07-29 23:59:23 +02:00
committed by GitHub
parent 9cd2f685ff
commit e08367aaae
4 changed files with 34 additions and 3 deletions

View File

@@ -635,10 +635,10 @@ class Items extends Secure_Controller
$item_data['reorder_level'] = 0;
}
$tax_category_id = intval($this->request->getPost('tax_category_id'));
$tax_category_id = $this->request->getPost('tax_category_id');
if (!isset($tax_category_id)) {
$item_data['tax_category_id'] = '';
$item_data['tax_category_id'] = null;
} else {
$item_data['tax_category_id'] = empty($this->request->getPost('tax_category_id')) ? null : intval($this->request->getPost('tax_category_id'));
}