Jump to content

Bidi

Member
  • Posts

    17
  • Joined

  • Last visited

Everything posted by Bidi

  1. Hello, I was thinking someone have this allready and the way i see nobody dose, so i can make this one hook/module in 1 day but now i dont have the right time for. The think is we dont use invoices from whmcs as a fiscal cuz is a mess, we make them sepratly on SmartBIll Romanians know about it and they use it two. The think with addfunds vat is Add Funds ar not refundable so charging vat si 100% must buy . I know what WHMCS calculates a amount of money payed in advance is not 100% usable so you cant charge VAT in this way you make mess with invoices and fiscals + if someone pay 10$ spend 5$ and ask the rest refund is ok but us for add funds we dont do refunds so is 100% usable. Whmcs should learn thinks from this and go with the same idee "Add Funds" not refundable so you can apply VAT and dont make mess I`m not english to explain right now it should be
  2. Hello Guys and Happy New Year! Since today my company become VAT Payee so we activated tax rules on ower WHMCS, all ok, till one customer used add funds and added 10$ into hes account to buy a domain name with 10 + VAT 19%, so the customer was pissed off 🙂 why again have to make payment for the 1.9$ VAT and not added when he added 10$ funds. And hes right, ower prices on the websites ar excluded VAT. So i`m looking for a solution, when customer whants to add funds, vat to be edded to the invoice. I know, lots of you will say, whoo the customer pays 2 times the VAT, no they dont. The think is customer dose not pay VAT twice explain in short. Addfunds 10$ + 19% VAT = 11.90 Total customer pays, the entire amount 11.90 added to customer account as credit. Customer buys sompting on the website price is 10 + 19% VAT = 11.90 🙂 so not twice. If it adds only the 10$ into the customer account then yes it pay twice, but calculation and system should work like i mentioned, because at the end of the year you have to report year close and money entered into your bank account should be same invoice made. If you charge customer 10$ and he spends only 5$+VAT, me as company i will be in trouble. Where is VAT for hes 10$ charge ? Why you providing customer invoice for only the 5$+VAT amount when you changed hem 10$ and into your bank account is 10$ ? So anyone can help me ?
  3. Hello guys, i know this its old but i have the same issue 😞 and i whant somehow to fix this. Dose anyone founded a solution for this ?
  4. Hello guys, I`m looking for a solution to delete a product from customers. I have some product witch we dont sell any more and we whant to clean/delete them from ower WHMCS even from the product and even from customers. I was looking for some modules but i didnt found one, dose anyone have any ideea how can i make this ? a module or true phpmyadmin ? If i make this manualy, one by one, i think it will takes me around 3-6 mo 🙂 Thank you.
  5. Change image url with the one belong, brian! he can help us with a php code whmcs for templates/blend/images/logo.png to get it right from templateurl, i know there was sompting like $themeurl 🙂 i dont remember but this is the only problem url of the logo, i`m on a coffe making this just for make it nice . I added the same logo of whmcs on top of my code div 🙂 <img src="templates/blend/images/logo.png" id="logoul">
  6. <?php # Stats Info Bar for v8 Blend # Written by brian! use WHMCS\Database\Capsule; use WHMCS\Billing\Invoice; use Carbon\Carbon; function admin_v8_infobar_hook($vars) { if ($vars['template'] == "blend") { $pendingstatuslist = Capsule::table('tblorderstatuses')->where('showpending','1')->pluck('title'); $pendingorders = Capsule::table('tblorders')->whereIn('status',$pendingstatuslist)->count(); $overdueinvoices = Invoice::overdue()->count(); $awaitingreplylist = Capsule::table('tblticketstatuses')->where('showawaiting','1')->pluck('title'); $ticketsawaiting = Capsule::table('tbltickets')->whereIn('status',$awaitingreplylist)->where('merged_ticket_id','0')->count(); $current_time = Carbon::now()->translatedFormat("l, j F Y, H:i"); $headerreturn = ' <style> #infostats { float: right; padding: 15px; position: absolute; width: 83%; max-height: 20px; text-align: right; } #infostats2 { width: 50%; float: right;color: #fff; color: #fff; font-size: .8em; margin: 0; } #logoul { width: 125px; float:left; margin-top: -6px; margin-left: 20px; } @media screen and (max-width: 1300px) { #infostats { width: 100%; position: relative; padding-top: 10px; padding-bottom: 25px; background-color: #1a4d80; text-align: center; } #infostats2 { width: 100%; color: #fff; color: #fff; font-size: .8em; margin: 0; } #logoul { display: none; } } </style> <div id="infostats"> <a href="index.php" class="logo" title="Home"> <img src="templates/blend/images/logo.png" id="logoul"> </a> <div id="infostats2"style=""> <a href="orders.php?status=Pending" style="color: #fff;"><span style="font-weight: 700; color: #fc0;">'.$pendingorders.'</span> '.AdminLang::trans('stats.pendingorders').'</a> | <a href="invoices.php?status=Overdue" style="color: #fff;"><span style="font-weight: 700; color: #fc0;">'.$overdueinvoices.'</span> '.AdminLang::trans('stats.overdueinvoices').'</a> | <a href="supporttickets.php" style="color: #fff;"><span style="font-weight: 700; color: #fc0;">'.$ticketsawaiting.'</span> '.AdminLang::trans('stats.ticketsawaitingreply').'</a> </div> </div>'; return $headerreturn; } } add_hook("AdminAreaHeaderOutput",1,"admin_v8_infobar_hook"); Done now 🙂 is working for me om mobile, tablet, laptop, pc ...etc
  7. Yes but i whant to fix it 🙂 so i try to fix it now, i hope i can 🙂
  8. I sow now, i will edit my post, i fix it now 🙂
  9. Hello, Brian! frist thank you, this was a nightmare for me not having this. I optimize it a bit for mobile ...etc for those who need it. <style> #infostats { float: right; padding: 15px; position: absolute; width: 83%; max-height: 20px; text-align: right; } @media screen and (max-width: 500px) { #infostats { width: 100%; position: relative; padding-top: 10px; padding-bottom: 25px; background-color: #1a4d80; text-align: center; } } </style> <div id="infostats"> <div style="color: #fff; font-size: .8em; margin: 0;"> <a href="orders.php?status=Pending" style="color: #fff;"><span style="font-weight: 700; color: #fc0;">'.$pendingorders.'</span> '.AdminLang::trans('stats.pendingorders').'</a> | <a href="invoices.php?status=Overdue" style="color: #fff;"><span style="font-weight: 700; color: #fc0;">'.$overdueinvoices.'</span> '.AdminLang::trans('stats.overdueinvoices').'</a> | <a href="supporttickets.php" style="color: #fff;"><span style="font-weight: 700; color: #fc0;">'.$ticketsawaiting.'</span> '.AdminLang::trans('stats.ticketsawaitingreply').'</a> </div> </div>
  10. Yes. Field Name: smsphone|Telefon Notificari SMS Checked Show on Order Form, the same with smsnotification and nothink.
  11. Hy there, i got 1 custom field in the database named smsphone and smsnotification what do i whant is when someone is placing an order (new account) or creating an account is to be able to insert phone no and select yes or no if he whants to get sms notifications. smsphone = phone no witch will add when register, seprate from the "original field telephone" smsnotification = the option he chose yes or no and insert/update them in the tblclients > smsphone & smsnotification Thank you
  12. I fixed the problem was the code writed in wrong way, but i got one more think i made one like. function hook_smsinvoicereminder($vars) { $invoiceid = $vars['invoiceid']; include($_SERVER['DOCUMENT_ROOT'].'/rwsfunctions.php'); include($_SERVER['DOCUMENT_ROOT'].'/rwsconfig.php'); $rid = full_query("SELECT userid,duedate,total FROM tblinvoices WHERE id='".$invoiceid."'"); $did = mysql_fetch_array($rid); $clientid = $did["userid"]; $rcr = full_query("SELECT credit,smsphone,smsinvoicereminder FROM tblclients WHERE id = '".$clientid."'"); $dcr = mysql_fetch_array($rcr); if($dcr["smsinvoicereminder"]=="1" && $dcr["credit"]>=$amountinvoicereminder){ $phone = $dcr["smsphone"]; $dd = $did["duedate"]; $d = explode("-", $dd); $duedate = $d['2']." ".$d['1']." ".$d['0']; $total = $did["total"]; $message = "Va reamintim ca termenul de plata al facturii nr: ".$invoiceid.", in valoare de ".$total." Euro, este ".$duedate.". ".$brand; if(strlen($phone)=="10"){ $command = "addcredit"; $adminuser = $adminuser; $values["clientid"] = $clientid; $values["description"] = "Trimitere SMS catre ".$phone; $values["amount"] = 0-$amountinvoicereminder; $results = localAPI($command,$values,$adminuser); if($results["result"]=="success"){ sendsms($sid,$password,$phone,$message); }else{ $res = $results["message"]; } }else{ $res = "Telefon Invalid"; } } } add_hook("InvoicePaymentReminder", 1, "hook_smsinvoicereminder"); and when the cron runs it dosent send the sms notification do i have to create or make sompting alse ?
  13. Hy there cand someone help me why is this one not working ? from admin area if i use Create Add Funds Invoice it works but it ads the amount to the customer directly <?php function hook_smsinvoicecreated($vars) { $invoiceid = $vars['invoiceid']; include("../rwsfunctions.php"); include("../rwsconfig.php"); $rid = full_query("SELECT userid,duedate,total FROM tblinvoices WHERE id='".$invoiceid."'"); $did = mysql_fetch_array($rid); $clientid = $did['userid']; $rcr = full_query("SELECT credit,smsphone,smsinvoicecreated FROM tblclients WHERE id = '".$clientid."'"); $dcr = mysql_fetch_array($rcr); if ($dcr['smsinvoicecreated'] == "1" && "0.05" <= $dcr['credit']) { $phone = $dcr['smsphone']; $dd = $did['duedate']; $d = explode("-", $dd); $duedate = $d['2']." ".$d['1']." ".$d['0']; $total = $did['total']; $message = "Va informam ca a fost emisa in contul dvs o noua factura cu nr: ".$invoiceid.", total ".$total." Euro, data scadenta ".$duedate.". ".$brand; if (strlen($phone) == "10") { $command = "addcredit"; $adminuser = $adminuser; $values['clientid'] = $clientid; $values['description'] = "Trimitere SMS catre ".$phone; $values['amount'] = 0 - $amountinvoicecreated; $results = localAPI($command,$values,$adminuser); if ($results['result'] == "success") { sendsms($sid, $password, $phone, $message); } else { $res = $results['message']; } } else { $res = "Telefon Invalid"; } } } add_hook("InvoiceCreated", 2, "hook_smsinvoicecreated"); ?>
  14. Hy there guys, i try to make a hook to notice my customers who whants to get sms notice to theyr phone when a new invoice is generating. (When cron job runs ....etc) My problem is is not working and i dont understand why if i use the Add Funds Invoice or my customer add funds from hes area it works but when the cron runs at midnight not do i jump over sompting ? <?php function hook_smsinvoicecreated($vars) { $invoiceid = $vars['invoiceid']; include("../rwsfunctions.php"); include("../rwsconfig.php"); $rid = full_query("SELECT userid,duedate,total FROM tblinvoices WHERE id='".$invoiceid."'"); $did = mysql_fetch_array($rid); $clientid = $did['userid']; $rcr = full_query("SELECT credit,smsphone,smsinvoicecreated FROM tblclients WHERE id = '".$clientid."'"); $dcr = mysql_fetch_array($rcr); if ($dcr['smsinvoicecreated'] == "1" && "0.05" <= $dcr['credit']) { $phone = $dcr['smsphone']; $dd = $did['duedate']; $d = explode("-", $dd); $duedate = $d['2']." ".$d['1']." ".$d['0']; $total = $did['total']; $message = "Va informam ca a fost emisa in contul dvs o noua factura cu nr: ".$invoiceid.", total ".$total." Euro, data scadenta ".$duedate.". ".$brand; if (strlen($phone) == "10") { $command = "addcredit"; $adminuser = $adminuser; $values['clientid'] = $clientid; $values['description'] = "Trimitere SMS catre ".$phone; $values['amount'] = "0" - $amountinvoicecreated; $results = localAPI($command, $values, $adminuser); if ($results['result'] == "success") { sendsms($sid, $password, $phone, $message); } else { $res = $results['message']; } } else { $res = "Telefon Invalid"; } } } add_hook("InvoiceCreated", 2, "hook_smsinvoicecreated"); ?>
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated