Skip to content

Commit

Permalink
formatcurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsandbots committed Nov 24, 2020
1 parent b785161 commit 2ccfd22
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 22 deletions.
4 changes: 2 additions & 2 deletions add_sale.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
<div class="form-group">
<div class="input-group">
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">Find It</button>
<button type="submit" class="btn btn-primary">Search</button>
</span>
<input type="text" id="sug_input" class="form-control" name="title" placeholder="Search by Product Name">
<input type="text" id="sug_input" class="form-control" name="title" placeholder="Product Name">
</div>
<div id="result" class="list-group"></div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions add_sale_by_sku.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
<div class="form-group">
<div class="input-group">
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">Find It</button>
<button type="submit" class="btn btn-primary">Search</button>
</span>
<input type="text" id="sug_sku_input" class="form-control" name="sku" placeholder="Search by Product SKU">
<input type="text" id="sug_sku_input" class="form-control" name="sku" placeholder="Product SKU">
</div>
<div id="result" class="list-group"></div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion daily_sales.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<td class="text-center"><?php echo count_id();?></td>
<td><?php echo remove_junk($sale['name']); ?></td>
<td class="text-center"><?php echo (int)$sale['qty']; ?></td>
<td class="text-center"><?php echo remove_junk($sale['total_saleing_price']); ?></td>
<td class="text-center"><?php echo formatcurrency($sale['total_saleing_price'], $CURRENCY_CODE); ?></td>
<td class="text-center"><?php echo $sale['date']; ?></td>
</tr>
<?php endforeach;?>
Expand Down
2 changes: 1 addition & 1 deletion monthly_sales.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<td class="text-center"><?php echo count_id();?></td>
<td><?php echo remove_junk($sale['name']); ?></td>
<td class="text-center"><?php echo (int)$sale['qty']; ?></td>
<td class="text-center"><?php echo remove_junk($sale['total_saleing_price']); ?></td>
<td class="text-center"><?php echo formatcurrency($sale['total_saleing_price'], $CURRENCY_CODE); ?></td>
<td class="text-center"><?php echo $sale['date']; ?></td>
</tr>
<?php endforeach;?>
Expand Down
8 changes: 4 additions & 4 deletions sale_report_process.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@
<tr>
<td class=""><?php echo remove_junk($result['date']);?></td>
<td class="text-center"><?php echo remove_junk(ucfirst($result['name']));?></td>
<td class="text-right"><?php echo remove_junk($result['buy_price']);?></td>
<td class="text-right"><?php echo remove_junk($result['sale_price']);?></td>
<td class="text-right"><?php echo remove_junk($result['total_sales']);?></td>
<td class="text-right"><?php echo remove_junk($result['total_saleing_price']);?></td>
<td class="text-right"><?php echo formatcurrency($result['buy_price'], $CURRENCY_CODE);?></td>
<td class="text-right"><?php echo formatcurrency($result['sale_price'], $CURRENCY_CODE);?></td>
<td class="text-right"><?php echo formatcurrency($result['total_sales'], $CURRENCY_CODE);?></td>
<td class="text-right"><?php echo formatcurrency($result['total_saleing_price'], $CURRENCY_CODE);?></td>
</tr>
<?php endforeach; ?>
</tbody>
Expand Down
13 changes: 2 additions & 11 deletions sales.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<span>All Sales</span>
</strong>
<div class="pull-right">
<a href="add_sale.php" class="btn btn-primary">Add sale</a>
<a href="add_sale.php" class="btn btn-primary">Add Sale</a>
</div>
</div>
<div class="panel-body">
Expand All @@ -39,7 +39,6 @@
<table class="table table-bordered table-striped">
<thead>
<tr>
<th class="text-center" style="width: 50px;">#</th>
<th class="text-center" style="width: 15%;">Order</th>
<th> Product name </th>
<th class="text-center" style="width: 15%;"> Quantity</th>
Expand All @@ -55,11 +54,10 @@
<?php foreach ($sales as $sale):?>

<tr>
<td class="text-center"><?php echo count_id();?></td>
<td class="text-center"><?php echo (int)$sale['order_id']; ?></td>
<td><?php echo remove_junk($sale['name']); ?></td>
<td class="text-center"><?php echo (int)$sale['qty']; ?></td>
<td class="text-center"><?php echo remove_junk($sale['price']); ?></td>
<td class="text-center"><?php echo formatcurrency($sale['price'], $CURRENCY_CODE); ?></td>
<td class="text-center"><?php echo $sale['date']; ?></td>
<td class="text-center">
<div class="btn-group">
Expand All @@ -82,13 +80,6 @@
</div>
</div>

<?php
// print "<pre>";
// print_r($sales);
// print "</pre>\n";

?>

</div>
</div>
<?php include_once 'layouts/footer.php'; ?>
2 changes: 1 addition & 1 deletion sales_by_order.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
<td class="text-center"><?php echo $sale['sku']; ?></td>
<td class="text-center"><?php echo $sale['location']; ?></td>
<td class="text-center"><?php echo (int)$sale['qty']; ?></td>
<td class="text-center"><?php echo remove_junk($sale['price']); ?></td>
<td class="text-center"><?php echo formatcurrency($sale['price'], $CURRENCY_CODE); ?></td>
<td class="text-center">
<div class="btn-group">
<a href="edit_sale.php?id=<?php echo (int)$sale['id'];?>" class="btn btn-warning btn-xs" title="Edit" data-toggle="tooltip">
Expand Down

0 comments on commit 2ccfd22

Please sign in to comment.