Skip to content

Commit

Permalink
Module needs to add feature to payment screen (openemr#6878)
Browse files Browse the repository at this point in the history
* Module needs to add feature to payment screen

* forgot to import the class.
  • Loading branch information
juggernautsei authored Sep 24, 2023
1 parent 658135c commit 58d1ec4
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 12 deletions.
26 changes: 14 additions & 12 deletions interface/patient_file/front_payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use OpenEMR\Common\Csrf\CsrfUtils;
use OpenEMR\Common\Twig\TwigContainer;
use OpenEMR\Core\Header;
use OpenEMR\Events\Billing\Payments\PostFrontPayment;
use OpenEMR\OeUI\OemrUI;
use OpenEMR\PaymentProcessing\Sphere\SpherePayment;
use OpenEMR\Services\FacilityService;
Expand Down Expand Up @@ -1229,17 +1230,17 @@ function make_insurance() {
<table class="table" id="table_display">
<thead>
<tr class="table-active" id="tr_head">
<th class="font-weight-bold" width="70"><?php echo xlt('DOS'); ?></td>
<th class="font-weight-bold" width="65"><?php echo xlt('Encounter'); ?></td>
<th class="font-weight-bold text-center" id="td_head_total_charge" width="80"><?php echo xlt('Total Charge'); ?></td>
<th class="font-weight-bold text-center" id="td_head_rep_doc" style='display:none' width="70"><?php echo xlt('Report/ Form'); ?></td>
<th class="font-weight-bold text-center" id="td_head_description" style='display:none' width="200"><?php echo xlt('Description'); ?></td>
<th class="font-weight-bold text-center" id="td_head_insurance_payment" width="80"><?php echo xlt('Insurance Payment'); ?></td>
<th class="font-weight-bold text-center" id="td_head_patient_payment" width="80"><?php echo xlt('Patient Payment'); ?></td>
<th class="font-weight-bold text-center" id="td_head_patient_co_pay" width="55"><?php echo xlt('Co Pay Paid'); ?></td>
<th class="font-weight-bold text-center" id="td_head_co_pay" width="55"><?php echo xlt('Required Co Pay'); ?></td>
<th class="font-weight-bold text-center" id="td_head_insurance_balance" width="80"><?php echo xlt('Insurance Balance'); ?></td>
<th class="font-weight-bold text-center" id="td_head_patient_balance" width="80"><?php echo xlt('Patient Balance'); ?></td>
<th class="font-weight-bold" width="70"><?php echo xlt('DOS'); ?></th>
<th class="font-weight-bold" width="65"><?php echo xlt('Encounter'); ?></th>
<th class="font-weight-bold text-center" id="td_head_total_charge" width="80"><?php echo xlt('Total Charge'); ?></th>
<th class="font-weight-bold text-center" id="td_head_rep_doc" style='display:none' width="70"><?php echo xlt('Report/ Form'); ?></th>
<th class="font-weight-bold text-center" id="td_head_description" style='display:none' width="200"><?php echo xlt('Description'); ?></th>
<th class="font-weight-bold text-center" id="td_head_insurance_payment" width="80"><?php echo xlt('Insurance Payment'); ?></th>
<th class="font-weight-bold text-center" id="td_head_patient_payment" width="80"><?php echo xlt('Patient Payment'); ?></th>
<th class="font-weight-bold text-center" id="td_head_patient_co_pay" width="55"><?php echo xlt('Co Pay Paid'); ?></th>
<th class="font-weight-bold text-center" id="td_head_co_pay" width="55"><?php echo xlt('Required Co Pay'); ?></th>
<th class="font-weight-bold text-center" id="td_head_insurance_balance" width="80"><?php echo xlt('Insurance Balance'); ?></th>
<th class="font-weight-bold text-center" id="td_head_patient_balance" width="80"><?php echo xlt('Patient Balance'); ?></th>
<th class="font-weight-bold text-center" width="50"><?php echo xlt('Paying'); ?></th>
</tr>
</thead>
Expand Down Expand Up @@ -1426,7 +1427,7 @@ function make_insurance() {
</fieldset>
<div class="form-group">
<div class="col-sm-12 text-left position-override">
<div class="form-group" role="group">
<div class="form-group" role="group" id="button-group">
<button type='submit' class="btn btn-primary btn-save" name='form_save' value='<?php echo xla('Generate Invoice');?>'><?php echo xlt('Generate Invoice');?></button>
<?php if (!empty($GLOBALS['cc_front_payments']) && $GLOBALS['payment_gateway'] != 'InHouse') {
if ($GLOBALS['payment_gateway'] == 'Sphere') {
Expand Down Expand Up @@ -1886,4 +1887,5 @@ function posDialog() {
} // forms else close
?>
</body>
<?php $ed->dispatch(new PostFrontPayment(), PostFrontPayment::ACTION_POST_FRONT_PAYMENT, 10); ?>
</html>
22 changes: 22 additions & 0 deletions src/Events/Billing/Payments/PostFrontPayment.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

/*
* @package openemr
* @link https://www.open-emr.org
* @author Sherwin Gaddis <[email protected]>
* @copyright (c) 2023
* @https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
*/

namespace OpenEMR\Events\Billing\Payments;

use Symfony\Contracts\EventDispatcher\Event;

class PostFrontPayment extends Event
{
const ACTION_POST_FRONT_PAYMENT = 'billing.payment.action.post.front.payment';
public function __construct()
{
//Do something epic here
}
}

0 comments on commit 58d1ec4

Please sign in to comment.