Esempio n. 1
0
	  
	  <div class="control-group">
	    <label class="control-label" for="available">Available Quantity</label>
	    <div class="controls">
	      <input type="text" id="available" readonly="readonly" value="<?php 
echo $a;
?>
" />
	    </div>
	  </div>
	  
	  <div class="control-group">
	    <label class="control-label" for="unit_cost">Unit Cost</label>
	    <div class="controls">
	      <input type="text" id="unit_cost" name="unit_cost" readonly="readonly" value="<?php 
echo DhsHelper::formatPrice($unit_cost);
?>
" />
	    </div>
	  </div>	  
	  
	  <div class="control-group">
	    <label class="control-label" for="quantity">Quantity to Return</label>
	    <div class="controls">
	      <select id="quantity" name="quantity">
	      		<option>Select Quantity</option>
	      		<?php 
for ($i = $a; $i > 0; $i--) {
    ?>
	      			<option><?php 
    echo $i;
    ?>
</td>
	              <td><?php 
    echo DhsHelper::formatPrice($row['subtotal']);
    ?>
</td>
	              <td><?php 
    echo DhsHelper::formatDate($row['mfg_date']);
    ?>
</td>
	              <td><?php 
    echo DhsHelper::formatDate($row['expiry_date']);
    ?>
</td>
	              <td><?php 
    echo DhsHelper::formatPrice($row['total']);
    ?>
</td>
	              <td>
	              	<?php 
    if ($a > 0) {
        ?>
	              	<a href="<?php 
        echo DHS_ROOT;
        ?>
index.php?view=return_stock&menu=medicine&medicine_id=<?php 
        echo $row['medicine_id'];
        ?>
&inventory_id=<?php 
        echo $row['inventory_id'];
        ?>
Esempio n. 3
0
                	<a href="#" class="cust_delete" data-source-id="<?php 
    echo $record['bill_id'];
    ?>
">
                        <i class="icon-remove"></i>
                	</a>
                </td>
            </tr>
	<?php 
}
?>
</table>
	
<div class="well well-small">
	<strong>Total Sales: Rs. <?php 
echo DhsHelper::formatPrice($con, $total);
?>
</strong>
</div>	

<?php 
if ($count > 0) {
    ?>
 <div class="pagination text-center">
	<ul>
	    <?php 
    for ($i = 0; $i < $paginationCount; $i++) {
        ?>
	        <li class="<?php 
        echo $page_id == $i ? 'active' : 'disabled';
        ?>
   
  <div class="control-group">
    <label class="control-label" for="discount">Discount:</label>
    <div class="controls">
      <input type="text" id="discount" name="discount" placeholder="Discount" value="<?php 
echo DhsHelper::formatPrice($record['discount']);
?>
"  readonly="readonly" />Rs.
  	</div>
  </div>
  
  <div class="control-group">
    <label class="control-label" for="total">Total:</label>
    <div class="controls">
	    <input type="text" id="total" name="total" placeholder="Total" value="<?php 
echo DhsHelper::formatPrice($record['total']);
?>
" readonly="readonly">Rs.
	  </div>
	</div>
  
  <div class="control-group">
    <label class="control-label" for="mfg_date">Manufactured Date:</label>
    <div class="controls">
      <input type="text" id="mfg_date" name="mfg_date" placeholder="Manufactured Date" value="<?php 
echo DhsHelper::formatDate($record['mfg_date']);
?>
" readonly="readonly" />
  	</div>
  </div>
  
		
		<div class="control-group">
		    <label class="control-label" for="discount">Discount:</label>
		    <div class="controls">
		      <input type="text" name="discount" required="" value="<?php 
echo DhsHelper::formatPrice($inventory['discount']);
?>
">
		    </div>
		</div>
		
		<div class="control-group">
		    <label class="control-label" for="total">Total:</label>
		    <div class="controls">
		      <input type="text" name="total" required="" value="<?php 
echo DhsHelper::formatPrice($inventory['total']);
?>
" readonly="readonly">
		    </div>
		</div>
		
		<div class="control-group">
		    <label class="control-label" for="mfg_date">Manufacturing Date:</label>
		    <div class="controls">
		    	<div class="input-append dhs-datetimepicker" style="margin-bottom: 0;">
			    	<input data-format="yyyy-MM-dd" type="text" name="mfg_date" id="mfg_date" required="" value="<?php 
echo $inventory['mfg_date'];
?>
"></input>
				    <span class="add-on">
				      <i data-time-icon="icon-time" data-date-icon="icon-calendar">
Esempio n. 6
0
		<td><?php 
    echo $row['doctor_name'];
    ?>
</td>
		<td><?php 
    echo $row['mobile'];
    ?>
</td>
		
		<td>
			<?php 
    $sql = "select sum(`total`) as income, `doctor_name`, `store_key` from `cust_inventory` group by `doctor_name` having `store_key` = '{$store_key}' and `doctor_name` = " . "'" . $row['doctor_name'] . "'";
    //echo $sql;
    $inc = mysqli_query($con, $sql);
    $income = mysqli_fetch_array($inc);
    echo DhsHelper::formatPrice($income['income']);
    ?>
		</td>
		<td>
			<a href="index.php?view=doctor_registration&menu=user&doctor_id=<?php 
    echo $row['doctor_id'];
    ?>
">
				<i class="icon-edit"></i>
			</a>
			<a href="index.php?view=manage_doctor&action=delete_doctor&doctor_id=<?php 
    echo $row['doctor_id'];
    ?>
"  onclick="javascript:void(0)"> 
				<i class="icon-remove"></i>
			</a>
Esempio n. 7
0
 public function inventory_details($request)
 {
     $compulsory = array('storeid', 'medicine_id');
     $data = self::processRequestData($request, $compulsory, array());
     if (!is_array($data)) {
         return array('success_code' => '404', 'result' => $data);
     }
     $store_key = $data['storeid'];
     $medicine_id = $data['medicine_id'];
     $result = mysqli_query($con, "select medicine.medicine_name, inventory.* from `medicine` inner join\n\t\t\t\t(select * from inventory where `store_key` = '{$store_key}' and status = 30 and medicine_id = {$medicine_id}) as inventory \n\t\t\t\ton (medicine.`medicine_id` = inventory.`medicine_id`)");
     $inventory = array();
     while ($row = mysqli_fetch_array($result)) {
         $barcode = $row['barcode'];
         $sql = 'SELECT ';
         $sql .= '( ';
         $sql .= "(select COALESCE(`quantity`, 0) from `inventory` where `barcode` = {$barcode} and status = " . DHS_DISTRIBUTOR_INVENTORY_STATUS_VERIFIED . ") ";
         $sql .= " - ";
         $sql .= "(select COALESCE(sum(`quantity`), 0) as quantity from `cust_inventory` where `barcode` = {$barcode}) ";
         $sql .= ' - ';
         $sql .= "(select COALESCE(sum(`quantity`), 0) as quantity from `return_stock` where `barcode` = {$barcode} and status <> 0) ";
         $sql .= ') as remaining';
         $res = mysqli_query($con, $sql);
         $rem = mysqli_fetch_array($res);
         $i['available_quantity'] = $rem['remaining'];
         $i['medicine_name'] = $row['medicine_name'];
         $i['barcode'] = $row['barcode'];
         $i['unit_cost'] = DhsHelper::formatPrice($row['unit_cost']);
         $i['subtotal'] = DhsHelper::formatPrice($row['subtotal']);
         $i['mfg_date'] = DhsHelper::formatDate($row['mfg_date']);
         $i['expiry_date'] = DhsHelper::formatDate($row['expiry_date']);
         $i['total'] = DhsHelper::formatPrice($row['total']);
         $i['medicine_id'] = $row['medicine_id'];
         $i['distributor_id'] = $row['distributor_id'];
         $i['inventory_id'] = $row['inventory_id'];
         $inventory[] = $i;
     }
     return array('success_code' => '200', 'result' => $inventory);
 }
Esempio n. 8
0
    $que = $que1 . $que2;
    $arr = array();
    /* execute multi query */
    if (mysqli_multi_query($con, $que)) {
        do {
            /* store first result set */
            if ($result = mysqli_store_result($con)) {
                while ($row = mysqli_fetch_row($result)) {
                    $arr[] = $row[0];
                }
                mysqli_free_result($result);
            }
        } while (mysqli_next_result($con));
    }
    echo ' TOTAL : ' . DhsHelper::formatPrice($con, $arr[0] == null ? 0 : $arr[0]);
    echo '<br/>TODAY : ' . DhsHelper::formatPrice($con, $arr[1] == null ? 0 : $arr[1]);
    ?>
                        </div>
                    </div>	
                </div>
                    </a>
            </div>
        
        <div class="span2" style="background-color: #6B00B2;">
             <a class="enabled" href="<?php 
    echo DHS_ROOT;
    ?>
index.php?view=paid_bills&menu=distributor">
                <div class="thumbnail text-center admin-dashboard-stats-box" style="height:150px; color:#fff">
                    <div style="margin-top:5px;">
                        <strong><span style="font-size:1.25em;"> Vendor</span></strong><hr/>
Esempio n. 9
0
		<div class="row-fluid">
			<div class="span8" style="text-align: right;">Tax</div>
			<div class="span4" style="text-align: right;"><?php 
echo ' Rs.' . DhsHelper::formatPrice($con, $billing[3]);
?>
</div>
		</div>
		
		<div class="row-fluid">
			<div class="span8" style="text-align: right;">Discount</div>
			<div class="span4" style="text-align: right;"><?php 
echo ' Rs.' . DhsHelper::formatPrice($con, $billing[4]);
?>
</div>
		</div>
		
		<hr style="margin:0px; margin-bottom:10px;">
		
		<div class="row-fluid">
			<div class="span8" style="text-align: right;">Total</div>
			<div class="span4" style="text-align: right;"><?php 
echo ' Rs.' . DhsHelper::formatPrice($con, $billing[5]);
?>
</div>
		</div>
	</div>
</div>

	
</body>
</html>
Esempio n. 10
0
    ?>
</td>
				<td><?php 
    echo $record['quantity'];
    ?>
</td>
				<td><?php 
    echo DhsHelper::formatPrice($record['purchased_price']);
    ?>
</td>
				<td><?php 
    echo DhsHelper::formatPrice($record['returning_total']);
    ?>
</td>
				<td><?php 
    echo DhsHelper::formatPrice($record['loss']);
    ?>
</td>
				<td><?php 
    echo $record['return_date'];
    ?>
</td>
				<td><?php 
    echo $users_list[$record['returned_by']];
    ?>
</td>
			</tr>
			<?php 
}
?>
		</tbody>
Esempio n. 11
0
		<div class="row-fluid">
			<div class="span8" style="text-align: right;">Tax</div>
			<div class="span4" style="text-align: right;"><?php 
echo DhsHelper::formatPrice($billing[3]) . ' Rs';
?>
</div>
		</div>
		
		<div class="row-fluid">
			<div class="span8" style="text-align: right;">Discount</div>
			<div class="span4" style="text-align: right;"><?php 
echo DhsHelper::formatPrice($billing[4]) . ' Rs';
?>
</div>
		</div>
		
		<hr style="margin:0px; margin-bottom:10px;">
		
		<div class="row-fluid">
			<div class="span8" style="text-align: right;">Total</div>
			<div class="span4" style="text-align: right;"><?php 
echo DhsHelper::formatPrice($billing[5]) . ' Rs';
?>
</div>
		</div>
	</div>
</div>

	
</body>
</html>
Esempio n. 12
0
    echo DhsHelper::formatPrice($con, $row['salary']);
    ?>
</td>
				<td><?php 
    echo $row['month'];
    ?>
</td>
				<td><?php 
    echo $row['year'];
    ?>
</td>
				<td><?php 
    echo $row['present_days'];
    ?>
</td>
				<td><?php 
    echo $row['absent_days'];
    ?>
</td>
				<td><?php 
    echo DhsHelper::formatPrice($con, $row['actual_payment']);
    ?>
</td>
			</tr>
			<?php 
}
?>
		</tbody>
	</table>
</fieldset>