query("select * from tmp_cartbayar where IP='".getRealIpAddr()."' and ID = '".$_REQUEST["id"]."' and KDDOKTER = '".$dokter."' and JENIS = '".$jenis."'"); if($sql->numRows() > 0){ execute("update tmp_cartbayar set QTY=QTY+1 where IP='".getRealIpAddr()."' and ID='".$_REQUEST["id"]."' and KDDOKTER = '".$dokter."' and JENIS = '".$jenis."'"); }else{ $tarif = getTarif($_REQUEST['kode']); execute('insert into tmp_cartbayar set KODETARIF = "'.$_REQUEST['kode'].'", IP = "'.getRealIpAddr().'", ID = "'.$_REQUEST['id'].'", QTY=1, poly ='.$_REQUEST['poly'].',KDDOKTER = "'.$dokter.'",UNIT="'.$_SESSION['KDUNIT'].'", TARIF = "'.$tarif['tarif'] * $faktor.'", DISCOUNT="0", TOTTARIF="'.$tarif['tarif'] * $faktor.'", JASA_SARANA = "'.$tarif['jasa_sarana'] * $faktor.'", JASA_PELAYANAN = "'.$tarif['jasa_pelayanan'] * $faktor.'", JENIS = "'.$jenis.'"'); } ?>