Skip to content

Commit

Permalink
De-tab $insertString (only); $parent_file add "_"
Browse files Browse the repository at this point in the history
  • Loading branch information
lsthompson committed Jan 17, 2023
1 parent 2fa4eb1 commit 3960366
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions modules/addons/bpay_mgr/bpay_mgr.php
Original file line number Diff line number Diff line change
Expand Up @@ -2222,29 +2222,29 @@ function initialise_record_table(){

function insertInvoiceFunc($replace = false){
$insertString = '///////////////////////////////////////////////////////////////////////////
/// START: BPAY GENERATOR
///////////////////////////////////////////////////////////////////////////
if (file_exists(ROOTDIR."/modules/gateways/bpay.php")) {
require_once(ROOTDIR."/modules/gateways/bpay.php");
$output = BPAY_PDF($clientsdetails["id"],$invoicenum);
$pagecount = $pdf->getNumPages();
// for($i = 1; $i <= $pagecount; $i++){
$pdf->setPage(1);
if($output["mode"] == 1){
$pdf->Image(ROOTDIR."/modules/gateways/bpay/customers/".$clientsdetails["id"].".jpg",$output["Xaxis"],$output["Yaxis"],$output["size"]);
}else if($output["mode"] == 2){
$pdf->Image(ROOTDIR."/modules/gateways/bpay/invoices/".$invoicenum.".jpg",$output["Xaxis"],$output["Yaxis"],$output["size"]);
}
// }
}
///////////////////////////////////////////////////////////////////////////
/// END: BPAY GENERATOR
///////////////////////////////////////////////////////////////////////////';
/// START: BPAY GENERATOR
///////////////////////////////////////////////////////////////////////////
if (file_exists(ROOTDIR."/modules/gateways/bpay.php")) {
require_once(ROOTDIR."/modules/gateways/bpay.php");
$output = BPAY_PDF($clientsdetails["id"],$invoicenum);
$pagecount = $pdf->getNumPages();
// for($i = 1; $i <= $pagecount; $i++){
$pdf->setPage(1);
if($output["mode"] == 1){
$pdf->Image(ROOTDIR."/modules/gateways/bpay/customers/".$clientsdetails["id"].".jpg",$output["Xaxis"],$output["Yaxis"],$output["size"]);
}else if($output["mode"] == 2){
$pdf->Image(ROOTDIR."/modules/gateways/bpay/invoices/".$invoicenum.".jpg",$output["Xaxis"],$output["Yaxis"],$output["size"]);
}
// }
}
///////////////////////////////////////////////////////////////////////////
/// END: BPAY GENERATOR
///////////////////////////////////////////////////////////////////////////';

$template_name = db_access("getWHMCSTemplate");
$file = ROOTDIR."/templates/".$template_name."/invoicepdf.tpl";
$parentfile = ROOTDIR."/templates/invoicepdf.tpl";
$parent_file = ROOTDIR."/templates/invoicepdf.tpl";

$invoiceTemplateFile = file_get_contents($file);
if($replace == false){
Expand All @@ -2254,7 +2254,7 @@ function insertInvoiceFunc($replace = false){
return false; //bpay function exists dont continue
}else{
file_put_contents($file, $insertString, FILE_APPEND);
file_put_contents($parentfile, $file);
file_put_contents($parent_file, $file);
return true;
}
}else{
Expand Down

0 comments on commit 3960366

Please sign in to comment.