app/Services/BillingServices.php
/**
     * Update billing code status for passed bill ID
     * @param $request
     * @param $id
     */
Update billing code status for passed bill ID
@param $request
@param $id
Update billing code status for passed bill ID @param $request @param $id
public static function updateBillingCode($request, $id)
    {
        $billing = Billing::findOrFail($id);
        if ($request->payment_amount == 0) {
            return;
        }
        $billingStatusCode = self::getBillingStatusCode(
            $request->payable_amount,
            $request->payment_amount
        );
        $billing->status_code = $billingStatusCode;
        $billing->save();
    }
public static function updateBillingCode ( $ request , $ id ) { $ billing = Billing :: findOrFail ( $ id ) ; if ( $ request -> payment_amount == 0 ) { return ; } $ billingStatusCode = self :: getBillingStatusCode ( $ request -> payable_amount , $ request -> payment_amount ) ; $ billing -> status_code = $ billingStatusCode ; $ billing -> save ( ) ; }
Update billing code status for passed bill ID
 @param $request
 @param $id
Update billing code status for passed bill ID @param $request @param $id
// do not update billing table if there is no payment being made and leave the entry as is