Skip to content

Commit

Permalink
fixes for in-house dispensing
Browse files Browse the repository at this point in the history
  • Loading branch information
sunsetsystems committed Oct 27, 2010
1 parent ec5bed3 commit 2c5abc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions library/classes/Prescription.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ function prescriptions_factory($patient_id,
}

function get_dispensation_count() {
if (empty($this->id)) return 0;
$refills_row = sqlQuery("SELECT count(*) AS count FROM drug_sales " .
"WHERE prescription_id = '" . $this->id . "' AND quantity > 0");
return $refills_row['count'];
Expand Down
2 changes: 1 addition & 1 deletion templates/prescription/general_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<td COLSPAN="1" class="text" ALIGN="right" VALIGN="MIDDLE" >&nbsp; {xl t='in-house'}</td>
<td COLSPAN="2" ALIGN="LEFT" VALIGN="MIDDLE" >
<select name="drug_id" onchange="drugselected(this)">
{html_options values=$DRUG_ARRAY_VALUES output=$DRUG_ARRAY_OUTPUT}
{html_options values=$DRUG_ARRAY_VALUES output=$DRUG_ARRAY_OUTPUT selected=$prescription->get_drug_id()}
</select>
</td>
</tr>
Expand Down

0 comments on commit 2c5abc2

Please sign in to comment.