Message box after insert
Posted: 2020-04-03 12:23
Hello,
After adding the record, the message box (alert) does not appear. How to solve this problem?
After adding the record, the message box (alert) does not appear. How to solve this problem?
Code: Select all
function ttr_warehouse_ttr_after_insert($data, $memberInfo, &$args) {
$quantity = sqlValue("select `ttr_warehouse_ttr`.`quantity` from `ttr_warehouse_ttr` where id='{$data['id']}'");
if ($data['add_ttr'] == !null) {
$quantity = $quantity + $data['add_ttr'];
sql("update `ttr_warehouse_ttr` set `ttr_warehouse_ttr`.`quantity` = '{$quantity}' where id='{$data['id']}'", $eo);
sql("update `ttr_warehouse_ttr` set `ttr_warehouse_ttr`.`add_ttr` = NULL where id='{$data['id']}'", $eo);
?>
<script type="text/javascript">
$j(document).ready(function(){
alert('Added: <?php $quantity ?>');
});
</script>
<?php
}
return TRUE;
}