コード例 #1
0
     echo "showprice_{$prescriptions_nr} :" . $_POST['showprice_' . $prescriptions_nr] . "<br>";
 }
 $price = $_POST['showprice_' . $prescriptions_nr];
 //echo $_POST['price_'.$prescriptions_nr];
 if ($debug) {
     echo 'times per day: ' . $_POST['times_per_day_' . $prescriptions_nr] . '<br>';
 }
 if ($debug) {
     echo 'days: ' . $_POST['days_' . $prescriptions_nr] . '<br>';
 }
 if ($debug) {
     echo 'unit_price: ' . $_GET['unit_price'] . '<br>';
 }
 // <=== This is the selected pricelist!!!
 if ($dosageOld != $dosageNew) {
     $insurance_obj->trackChanges('billing', $new_bill_number, 'prescription', $prescriptions_nr, 'change', $dosageOld, $dosageNew, 'dosage', $comment, $user);
 }
 if ($timesPerDayOld != $timesPerDayNew) {
     $insurance_obj->trackChanges('billing', $new_bill_number, 'prescription', $prescriptions_nr, 'change', $timesPerDayOld, $timesPerDayNew, 'times per day', $comment, $user);
 }
 if ($daysOld != $daysNew) {
     $insurance_obj->trackChanges('billing', $new_bill_number, 'prescription', $prescriptions_nr, 'change', $daysOld, $daysNew, 'days', $comment, $user);
 }
 $bill_obj->StorePrescriptionItemToBill($pid, $prescriptions_nr, $new_bill_number, $_POST['insurance_' . $prescriptions_nr], $_GET['unit_price']);
 $bill_obj->UpdateBillNumberNewPrescription($prescriptions_nr, $new_bill_number);
 //$bill_obj->deduct_from_stock($prescriptions_nr,$_POST['dosage_'.$prescriptions_nr]);
 if ($debug) {
     echo "Prescription: allocate2insurance(" . $new_bill_number . ", " . $_POST['showprice_' . $prescriptions_nr] . "," . $_POST['insurance'] . ");";
 }
 if ($_POST['insurance'] != -1) {
     $insurance_obj->allocatePrescriptionsToinsurance($new_bill_number, $prescriptions_nr, $_POST['showprice_' . $prescriptions_nr], $_POST['insurance']);