Skip to content

Commit

Permalink
Do not show Send Invoice or Add Payment if Invoice Amount is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyq committed Oct 2, 2024
1 parent 6a55aba commit c352f6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
<div class="row">

<div class="col-8">
<?php if ($invoice_status == 'Draft') { ?>
<?php if ($invoice_status == 'Draft' && $invoice_amount != 0) { ?>
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">
<i class="fas fa-fw fa-paper-plane mr-2"></i>Send
</button>
Expand All @@ -176,7 +176,7 @@
</div>
<?php } ?>

<?php if ($invoice_status !== 'Paid' && $invoice_status !== 'Cancelled' && $invoice_status !== 'Draft') { ?>
<?php if ($invoice_status !== 'Paid' && $invoice_status !== 'Cancelled' && $invoice_status !== 'Draft' && $invoice_amount != 0) { ?>
<a class="btn btn-success" href="#" data-toggle="modal" data-target="#addPaymentModal">
<i class="fa fa-fw fa-credit-card mr-2"></i>Add Payment
</a>
Expand Down

0 comments on commit c352f6e

Please sign in to comment.