Jump to content

Mas-J

Regular Collector
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Mas-J

  • Rank
    Newbie
  1. I need to add Restitution (one time) item with minus value if there's subscription that didn't meet the SLA from last month on the Invoice generate on the next month. I know it should need manual admin intervention. Is there any idea where I should implement it ? Use the billiable item or maybe is there any suggestion ?
  2. Thanks for the suggestion, but I can't use this method since my Invoice format Tags is not follow the incremental invoice ID. @Kian Do you mean Snapshoot invoice number = Store Client Data Snapshot ? In my code, I'm using variable from invoice number and when I see the table invoice_mod which is save the data of the invoice, I didn' see the value of it. Would you elaborate your suggestion, thank you. I've try some workaround, when I add payment to make the invoice become Paid. I added the transacion ID as same as the Virtual Account number. So, I change the variable when the Invoice Paid using {$transaction.transid|substr:9} instead of {$invoicenum} Why I substr to 9 ? Because to prevent our Admin if they forgot to input the transaction ID. Instead of show zero value it will show some variable of Custom Client Fields without the proforma invoice number. This is not solved at all, still need manual input from admin but can be used as workaround for now. Here's my code if you want to see, check the line substr($trans['transid'],9) on invoicepdf.tpl and {$transaction.transid|substr:9} on viewinvoice.tpl : invoicepdf.tpl #Start - Payment Method $pdf->SetFont($pdfFont,'',9); $paymethhtml = '<table width:"100%" bgcolor="#ccc" cellspacing="1" cellpadding="2" border="0"> <tr height="30" bgcolor="#efefef" style="font-weight:bold;text-align:left;"> <td width="100%" colspan="2" align="left"> <h3 class="panel-title"><strong>Special Notes and Instructions</strong></h3> </td> </tr>'; $paymethhtml .= ' <tr bgcolor="#fff"> <td width="15%" align="left">Bank</td> <td width="85%" align="left">: BCA KCP Permata Buana</td> </tr>'; if ($status == 'Paid') { $paymethhtml .= ' <tr bgcolor="#fff"> <td width="15%" align="left">A/C Number</td> <td width="85%" align="left">: '.$clientsdetails["customfields2"].''.substr($clientsdetails["customfields1"],3).''. substr($trans['transid'],9) .'</td> </tr>'; } else { $paymethhtml .= ' <tr bgcolor="#fff"> <td width="15%" align="left">A/C</td> <td width="85%" align="left">: '.$clientsdetails["customfields2"].''.substr($clientsdetails["customfields1"],3).''.$invoicenum.'</td> </tr>'; } $paymethhtml .= ' <tr bgcolor="#fff"> <td width="15%" align="left">Account Name</td> <td width="85%" align="left">: '.$clientsdetails["companyname"].'</td> </tr> </table>'; $pdf->writeHTML($paymethhtml, true, false, false, false, ''); #End - Payment Method viewinvoice.tpl <!--Start - How to Payment--> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"><strong>Special Notes and Instructions</strong></h3> </div> <div class="panel-body"> <div class="table-responsive"> <table class="table table-condensed" width="100%"> <thead> <tr> <td>Bank</td> <td>: BCA KCP Permata Buana</td> </tr> </thead> {if $status eq "Paid"} <tr> <td>A/C</td> <td>: {$clientsdetails["customfields2"]}{$clientsdetails["customfields1"]|substr:3}{$transaction.transid|substr:9}</td> </tr> {else} <tr> <td>A/C</td> <td>: {$clientsdetails["customfields2"]}{$clientsdetails["customfields1"]|substr:3}{$invoicenum}</td> </tr> {/if} <tr> <td>Account Name</td> <td>: {$clientsdetails.companyname}</td> </tr> </table> </div> </div> </div> <!--End - How to Payment--> Any suggestion will be appreciated 🙂
  3. That's my pain, actually I've create custom invoicing module with modulesgarden but it has been over 2 years and still buggy and can't be implemented until now where the one of the feature is adding some notes about proforma invoice number after the invoice Paid. With that I can show the Virtual Account number which is previously as Proforma Invoice Number. I'm still find some workaround about this, maybe one of the member in here have a solution 🙂 Btw, thanks for the sharing.
  4. Dear All, I want display some fix virtual account for payment when client view invoice & on PDF. This Virtual Account is consist of 5 digits our Bank Unique Number + 4 digits customer code from Custom Client fields + 7 digits Proforma Invoice Number I've succesfully create the custom code in viewinvoice.tpl & invoicepdf.tpl under template folder. The result is fine if the status still Unpaid because the Proforma Invoice number show as is. But when this Invoice has been Paid the Invoice Number value from Database is change with sequential Invoice Number, so the custom code that I created didn't show the previous Invoice Number which is a Proforma Invoice Number. Is there any idea how to get the Proforma Invoice Number after Invoice has been Paid ? Here's my code: invoicepdf.tpl #Start - Payment Method $pdf->SetFont($pdfFont,'',9); $paymethhtml = '<table width:"100%" bgcolor="#ccc" cellspacing="1" cellpadding="2" border="0"> <tr height="30" bgcolor="#efefef" style="font-weight:bold;text-align:left;"> <td width="100%" colspan="2" align="left"> <h3 class="panel-title"><strong>Special Notes and Instructions</strong></h3> </td> </tr>'; $paymethhtml .= ' <tr bgcolor="#fff"> <td width="15%" align="left">Bank</td> <td width="85%" align="left">: BCA KCP Permata Buana</td> </tr>'; if ($status == 'Paid') { $paymethhtml .= ' <tr bgcolor="#fff"> <td width="15%" align="left">A/C Number</td> <td width="85%" align="left">: '.$clientsdetails["customfields2"].''.substr($clientsdetails["customfields1"],3).''.$invoicenum.'</td> </tr>'; } else { $paymethhtml .= ' <tr bgcolor="#fff"> <td width="15%" align="left">A/C</td> <td width="85%" align="left">: '.$clientsdetails["customfields2"].''.substr($clientsdetails["customfields1"],3).''.$invoicenum.'</td> </tr>'; } $paymethhtml .= ' <tr bgcolor="#fff"> <td width="15%" align="left">Account Name</td> <td width="85%" align="left">: '.$clientsdetails["companyname"].'</td> </tr> </table>'; $pdf->writeHTML($paymethhtml, true, false, false, false, ''); #End - Payment Method viewinvoice.tpl <!--Start - How to Payment--> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"><strong>Special Notes and Instructions</strong></h3> </div> <div class="panel-body"> <div class="table-responsive"> <table class="table table-condensed" width="100%"> <thead> <tr> <td>Bank</td> <td>: BCA KCP Permata Buana</td> </tr> </thead> {if $status eq "Paid"} <tr> <td>A/C</td> <td>: {$clientsdetails["customfields2"]}{$clientsdetails["customfields1"]|substr:3}{$invoicenum}</td> </tr> {else} <tr> <td>A/C</td> <td>: {$clientsdetails["customfields2"]}{$clientsdetails["customfields1"]|substr:3}{$invoicenum}</td> </tr> {/if} <tr> <td>Account Name</td> <td>: {$clientsdetails.companyname}</td> </tr> </table> </div> </div> </div> <!--End - How to Payment-->
  5. If I want to test the invoicing flow for several months later, how the correct way to move forward the date and what should I do with whmcs system itself? Maybe I just need change the server date to the specific event date and run the whmcs cron or I need move the server date day-by-day with whmcs cron run. Which one is correct ? Or maybe there's a better way to do that, please advice. Thanks.
  6. Hello Everyone, I activate the proforma invoice feature for invoice. I want rename the PDF being sent to client if the invoice status is Unpaid become "Proforma Invoice-1900001" instead of the standard name "Invoice-1900001" So, it will make a differenciation between Unpaid invoice and Paid invoice PDF when client recieved it. Do you know what file and script should I edit to make it possible ?
  7. I have problem where some client have many branch office and subscription for each of it. Our client want the invoice sent separately for each site office and using different billing address depend on site office location. I didn't find WHMCS feature to fulfill it, please give me a suggestion for this case, thank you.
  8. Thanks Brian, I've try your suggest and it work but I just realize the promotion/discount will be an item in invoice. Discuss with our ERP dev, so there's little change what data will be exported like below: Invoice Number : tblinvoices Client Custom Field : tblcustomfieldsvalues Product Group ID : tblproductgroups Product Specification : tblinvoiceitems Invoice Date : tblinvoices Due Date : tblinvoices Tax : tblinvoices Quantity : which table ? maybe tblinvoiceitems Unit Price : tblinvoiceitems Total : tblinvoices Would you give me a clue what should the query for get the Group ID, Quantity and Unit Price from the query before ? Thanks for the suggestion, I'll try after I got the goal 🙂
  9. I want to get the data of Invoice that has been Paid. It consist of data : Invoice Number : tblinvoices Client Custom Field : tblcustomfieldsvalues Customer Name : tblclients Product ID : tblproducts Invoice Item : tblinvoiceitems Invoice Date : tblinvoices Due Date : tblinvoices Tax : tblinvoices Discount : tblpromotions Total : tblinvoices This result will be used for input in our ERP, I faced the issue when I want to export Product ID from tblproducts and Discount from tblpromotion. I've try some query but didn't found any relation in tblproducts and tblpromotions with tblinvoices. For now, I just can export Invoice Number, Client Custom Field, Customer Name, Invoice Item, Invoice Date, Due Date, Tax, Total Here's the query: SELECT tblinvoices.invoicenum AS "No Invoice", tblcustomfieldsvalues.value AS "Customer Code", CONCAT(tblclients.firstname, " ", tblclients.lastname) AS "Customer Name", tblinvoiceitems.description AS "Specification", DATE_FORMAT(tblinvoices.date,'%d/%m/%Y') AS "Posting Date", DATE_FORMAT(tblinvoices.duedate,'%d/%m/%Y') AS "Due Date", tblinvoices.tax AS "Tax", tblinvoices.total AS "Total" FROM tblinvoices INNER JOIN tblinvoiceitems ON tblinvoices.id = tblinvoiceitems.invoiceid INNER JOIN tblclients ON tblinvoices.userid = tblclients.id INNER JOIN tblcustomfieldsvalues ON tblclients.id = tblcustomfieldsvalues.relid WHERE tblinvoices.status = "Paid" AND tblcustomfieldsvalues.fieldid = "5"; Here's the output Anyone can help me to get that productid & discount value ?
×
×
  • 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