diff --git a/src/delete-sale.php b/src/delete-sale.php new file mode 100644 index 00000000..484f7508 --- /dev/null +++ b/src/delete-sale.php @@ -0,0 +1,26 @@ +prepare($sql); + $types = str_repeat('i', count($saleIds)); + $stmt->bind_param($types, ...$saleIds); + if ($stmt->execute()) { + // If the deletion is successful, return a success response + echo 'success'; + } else { + // If an error occurs, return an error response + echo 'error'; + } +} else { + // If account IDs are not provided, return an error response + echo 'error'; +} +?> \ No newline at end of file diff --git a/src/sales.php b/src/sales.php index b78aafe9..dd5713b4 100644 --- a/src/sales.php +++ b/src/sales.php @@ -21,6 +21,7 @@ + @@ -48,12 +49,11 @@

- - - + +
@@ -62,6 +62,7 @@ + @@ -83,7 +84,8 @@ while($row = $result->fetch_assoc()) { echo ' - + + @@ -97,7 +99,7 @@ - +
Date Time Processed by
'.$row['transaction_date'].' '.$row['transaction_time'].' '.$row['full_name'].'
Total Sales:1000.000.00
@@ -109,44 +111,27 @@ - - - - -