|
@@ -484,33 +484,47 @@ function render_card_list_group($details) {
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<?php
|
|
<?php
|
|
|
- if($location->email) {
|
|
|
|
|
- ?>
|
|
|
|
|
- <div class="row mb-1 align-items-center">
|
|
|
|
|
- <label class="col-sm-4 col-form-label col-form-label-sm" for="payment-required">
|
|
|
|
|
- Invoice Location
|
|
|
|
|
- </label>
|
|
|
|
|
- <div class="col-sm">
|
|
|
|
|
- <div class="custom-control custom-switch">
|
|
|
|
|
- <input class="custom-control-input" id="payment-required" name="payment_required" type="checkbox" value="1" />
|
|
|
|
|
- <label class="custom-control-label" for="payment-required"><?=htmlspecialchars(__("Send Invoice"))?></label>
|
|
|
|
|
|
|
+ if($customer->isBillingEnabled()) {
|
|
|
|
|
+
|
|
|
|
|
+ if(!$location->email) {
|
|
|
|
|
+ ?>
|
|
|
|
|
+ <div class="alert alert-warning">
|
|
|
|
|
+ <i class="fa fa-fw fa-exclamation-triangle"></i>
|
|
|
|
|
+ <?=htmlspecialchars(__("Billing is enabled for %s but this location does not have an email address set for the invoice to be sent to.", $customer->name))?>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <?php
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ ?>
|
|
|
|
|
+ <div class="row mb-1 align-items-center">
|
|
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm" for="payment-required">
|
|
|
|
|
+ Payment Required
|
|
|
|
|
+ </label>
|
|
|
|
|
+ <div class="col-sm">
|
|
|
|
|
+ <div class="custom-control custom-checkbox">
|
|
|
|
|
+ <input class="custom-control-input" id="payment-required" name="payment_required" type="checkbox" value="1" />
|
|
|
|
|
+ <label class="custom-control-label" for="payment-required"><?=htmlspecialchars(__("Send invoice to %s", $location->email))?></label>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
- <div class="row mb-1 align-items-center">
|
|
|
|
|
- <label class="col-sm-4 col-form-label col-form-label-sm" for="invoice-amount">
|
|
|
|
|
- Invoice Amount
|
|
|
|
|
- </label>
|
|
|
|
|
- <div class="col-sm">
|
|
|
|
|
- <div class="input-group input-group-sm">
|
|
|
|
|
- <div class="input-group-prepend">
|
|
|
|
|
- <span class="input-group-text">£</span>
|
|
|
|
|
|
|
+ <div class="row mb-1 align-items-center" hidden>
|
|
|
|
|
+ <label class="col-sm-4 col-form-label col-form-label-sm" for="invoice-amount">
|
|
|
|
|
+ Invoice Amount
|
|
|
|
|
+ </label>
|
|
|
|
|
+ <div class="col-sm">
|
|
|
|
|
+ <div class="input-group input-group-sm">
|
|
|
|
|
+ <div class="input-group-prepend">
|
|
|
|
|
+ <span class="input-group-text">£</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <input class="form-control" type="number" step="0.01" min="0" max="999.99" name="invoice_amount" id="invoice-amount" placeholder="Enter invoice amount" value="0.00" />
|
|
|
</div>
|
|
</div>
|
|
|
- <input class="form-control" type="number" step="0.01" min="0" max="999.99" name="invoice_amount" id="invoice-amount" placeholder="Enter invoice amount" value="0.00" />
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ <?php
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ ?>
|
|
|
|
|
|
|
|
<?php
|
|
<?php
|
|
|
}
|
|
}
|