resend invoice

This commit is contained in:
Ibnu Maksum
2023-10-20 13:57:12 +07:00
parent 7ebf95f4be
commit d95e4d1d84
5 changed files with 43 additions and 34 deletions

View File

@ -142,11 +142,15 @@ switch ($action) {
$d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
$ui->assign('in', $d);
if(!empty($routes['3'])){
r2(U . 'prepaid/view/'.$id, 'e', "Success send to customer");
if(!empty($routes['3']) && $routes['3']=='send'){
$c = ORM::for_table('tbl_customers')->where('username', $d['username'])->find_one();
if($c){
Message::sendInvoice($c, $d);
r2(U . 'prepaid/view/'.$id, 's', "Success send to customer");
}
r2(U . 'prepaid/view/'.$id, 'd', "Customer not found");
}
$ui->assign('_title', 'View Invoice');
$ui->assign('date', Lang::dateAndTimeFormat($d['recharged_on'],$d['recharged_time']));
$ui->display('invoice.tpl');
break;