accounting workflows
This commit is contained in:
@@ -30,10 +30,8 @@
|
||||
|
||||
if (!empty($_FILES['product_image']['name'])) {
|
||||
if ($id > 0) {
|
||||
$sql = "SELECT `product_image` FROM md_product WHERE company_id = :company_id AND id = :id";
|
||||
$sth = $pdo2->prepare($sql);
|
||||
$sth->execute([':company_id' => $company_id, ':id' => $id]);
|
||||
$uploader->cleanup($sth->fetchColumn(), '');
|
||||
$product = new ProductManager($pdo2, $company_id);
|
||||
$uploader->cleanup($product->getProductImage($id), '');
|
||||
}
|
||||
|
||||
$errors = $uploader->upload('product_image');
|
||||
|
||||
Reference in New Issue
Block a user