コード例 #1
0
ファイル: clientsservices.php プロジェクト: billyprice1/whmcs
     $paymentmethod = $data['paymentmethod'];
     $tax = $data['tax'];
     $notes = $data['notes'];
     $regdate = fromMySQLDate($regdate);
     $nextduedate = fromMySQLDate($nextduedate);
 }
 echo "<h2>" . $managetitle . "</h2>";
 $predefaddons = array();
 $result = select_query("tbladdons", "", "", "weight` ASC,`name", "ASC");
 while ($data = mysql_fetch_array($result)) {
     $preid = $data['id'];
     $name = $data['name'];
     $predefaddons[$preid] = $name;
 }
 $tbl = new WHMCS_Table();
 $tbl->add($aInt->lang("fields", "product"), $frm->hidden("oldserviceid", $id) . $frm->dropdown("id", $servicesarr, $id), 1);
 $tbl->add($aInt->lang("fields", "regdate"), $frm->date("regdate", $regdate));
 $tbl->add($aInt->lang("fields", "setupfee"), $frm->text("setupfee", $setupfee, "10"));
 $tbl->add($aInt->lang("addons", "predefinedaddon"), $frm->dropdown("addonid", $predefaddons, $addonid, "", "", true));
 $tbl->add($aInt->lang("global", "recurring"), $frm->text("recurring", $recurring, "10") . ($aid == "add" ? " " . $frm->checkbox("defaultpricing", $aInt->lang("addons", "usedefault"), true) : ""));
 $tbl->add($aInt->lang("addons", "customname"), $frm->text("name", $customname, "40"));
 $tbl->add($aInt->lang("fields", "billingcycle"), $aInt->cyclesDropDown($billingcycle, "", "Free"));
 $tbl->add($aInt->lang("fields", "status"), $aInt->productStatusDropDown($status));
 $tbl->add($aInt->lang("fields", "nextduedate"), $frm->date("nextduedate", $nextduedate));
 $tbl->add($aInt->lang("fields", "paymentmethod"), paymentMethodsSelection());
 $tbl->add($aInt->lang("addons", "taxaddon"), $frm->checkbox("tax", "", $tax));
 $tbl->add($aInt->lang("fields", "adminnotes"), $frm->textarea("notes", $notes, "4", "100%"), 1);
 echo $tbl->output();
 if ($aid == "add") {
     echo "<p align=\"center\"><input type=\"checkbox\" name=\"geninvoice\" id=\"geninvoice\" checked /> <label for=\"geninvoice\">" . $aInt->lang("addons", "geninvoice") . "</a></p>";
 }
コード例 #2
0
ファイル: viewinvoice.php プロジェクト: billyprice1/whmcs
            }
        }
        redir("id=" . $invoiceid);
    }
    $smartyvalues['manualapplycredit'] = true;
    $smartyvalues['totalcredit'] = formatCurrency($creditbal) . generate_token("form");
    if (!$creditamount) {
        $creditamount = $balance <= $creditbal ? $balance : $creditbal;
    }
    $smartyvalues['creditamount'] = $creditamount;
}
$outputvars = $invoice->getOutput();
$smartyvalues = array_merge($smartyvalues, $outputvars);
$invoiceitems = $invoice->getLineItems();
$smartyvalues['invoiceitems'] = $invoiceitems;
$transactions = $invoice->getTransactions();
$smartyvalues['transactions'] = $transactions;
$paymentbutton = $invoice->getData("status") == "Unpaid" && 0 < $invoice->getData("balance") ? $invoice->getPaymentLink() : "";
$smartyvalues['paymentbutton'] = $paymentbutton;
$smartyvalues['offlinepaid'] = $whmcs->get_req_var("offlinepaid");
if ($whmcs->get_config("AllowCustomerChangeInvoiceGateway")) {
    $smartyvalues['allowchangegateway'] = true;
    $gateways = new WHMCS_Gateways();
    $availablegateways = $gateways->getAvailableGateways($invoiceid);
    $frm = new WHMCS_Form();
    $gatewaydropdown = generate_token("form") . $frm->dropdown("gateway", $availablegateways, $invoice->getData("paymentmodule"), "submit()");
    $smartyvalues['gatewaydropdown'] = $gatewaydropdown;
} else {
    $smartyvalues['allowchangegateway'] = false;
}
outputClientArea("viewinvoice", true);