Browse Source

added more to sign bill

= 3 years ago
parent
commit
2380394fb4

+ 1 - 0
app/Http/Controllers/PracticeManagementController.php

@@ -1374,6 +1374,7 @@ SELECT client.name_first, client.name_last,
        care_month.most_recent_cellular_weight_measurement_at,
        care_month.mcp_rm_generic_bill_id,
        bill.uid as mcp_rm_generic_bill_uid,
+       bill.generic_pro_id as mcp_rm_generic_bill_generic_pro_id,
        bill.generic_pro_expected_payment_amount as mcp_rm_generic_bill_expected_payment_amount 
 FROM care_month join client on care_month.client_id = client.id join note mrnote on client.most_recent_completed_mcp_note_id = mrnote.id
     left join bill  on care_month.mcp_rm_generic_bill_id = bill.id

+ 15 - 1
resources/views/app/practice-management/remote-monitoring-row-markup-by-pro-type.blade.php

@@ -220,7 +220,21 @@
                     <i class="fa fa-check"></i>
                     Yes 
                     @if($iPatient->mcp_rm_generic_bill_id)
-                    (Billed: ${{friendly_money($iPatient->mcp_rm_generic_bill_expected_payment_amount)}})
+                        (Billed: ${{friendly_money($iPatient->mcp_rm_generic_bill_expected_payment_amount)}})
+
+                        <div moe
+                                class="d-inline-block {{ $iPatient->mcp_rm_generic_bill_generic_pro_id !== $pro->id ? 'moe-disabled' : '' }}"
+                                title="{{ $iPatient->mcp_rm_generic_bill_generic_pro_id !== $pro->id ? 'Only the bill\'s pro can sign' : '' }}">
+                            <a class="text-nowrap" href="" show start>Sign</a>
+                            <form url="/api/bill/signAsGenericPro">
+                                <input type="hidden" name="uid" value="{{$iPatient->mcp_rm_generic_bill_uid}}">
+                                <p>Sign this bill?</p>
+                                <div class="mb-0">
+                                    <button class="btn btn-success btn-sm" submit>Sign</button>
+                                    <button class="btn btn-default border btn-sm" cancel>Cancel</button>
+                                </div>
+                            </form>
+                        </div>
                     @endif
                 </span>
             @else