Jump to content
wsd

Trouble with automated invoice generation

Recommended Posts

Hi,

 

WHMCS 5.2.16

 

 

When the invoice is to be made via cron.php I not receiving any e-mail and will max made ​​two invoice, I run cron.php once again becomes a made ​​two invoice. so it will be many times I have to run the manualet when it is made ​​all invoice then there's e-mail again.

 

 

Are there others who have experienced the same, and there are some who can help me?

Share this post


Link to post
Share on other sites

Nobody else having this issue also?

Some response from admin would be good also

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Similar Content

    • By sokalsondha
      hello
      thanks for reading my text. i have whmcs latest version and what is the issue is i can see the cron not generating the monthly invoice. i have a customer who have an active product due at 08/08/2020
      but i cant understand why the cron is not generating the invoice when its suppose to be generate 14 days earlier.
      but if i click on the customer dashboard generate due invoice i can see system create the invoice for that client.
      so can someone guide me what can be issue??
      i can see in the logs

       
      but i can't find any issue at all 😞
      dont know what to do
       
      just to let you know i have customized pdf invoice . is that giving any issue?
       
      thanks a million in advance.
      please stay safe
       
    • By sokalsondha
      Hello everyone
      Can you help me something on this please.
       
      In my invoice list I have changed the button name from Unpaid to Make-Payment. Because what I want is when my customer click on this make payment button it will be take them direct to payment page instead of viewinvoice page..
      Because I have put a button to download the pdf invoice so my customer can download the pdf invoice if they want to see it.
      But I really need to skip the viewinvoice page. 
      So if I have PayPal as a payment method for that invoice then when client click on that Make-Payment button it will be take them to PayPal directly.
       
      Can someone help me with the code in the template file.
       
      Thanks a million in advance
      Please see the current invoice list page
       

    • By sokalsondha
      Hello everyone.
      i hope everyone is doing great. i need again some help from the community. hope someone correct my invoicepdf tpl file so it can complete my demand.
      i have done some modify but  i can't understand how to fix some more.
       
      i want to make my invoice like this

       
      and this is my current code. its already modified mostly
       
      <?php
      # Logo
      $logoFilename = 'placeholder.png';
      if (file_exists(ROOTDIR . '/assets/img/logo.png')) {
          $logoFilename = 'logo.png';
      } elseif (file_exists(ROOTDIR . '/assets/img/logo.jpg')) {
          $logoFilename = 'logo.jpg';
      }
      $pdf->Ln(5);
      $pdf->SetFont($pdfFont, 'B', 15);
      $pdf->SetFillColor(255);
      $pdf->SetFont($pdfFont, '', 16);
      $pdf->Cell(100, 6, "My Bill Summary", 0, 1, 'L', '1');
      $pdf->Image(ROOTDIR . '/assets/img/' . $logoFilename, 120, 25, 75);
      # Company Details
      $pdf->SetXY(15, 70);
      $pdf->SetFont($pdfFont, '', 13);
      foreach ($companyaddress as $addressLine) {
          $pdf->Cell(180, 4, trim($addressLine), 0, 1, 'R');
          $pdf->SetFont($pdfFont, '', 9);
      }
      if ($taxCode) {
          $pdf->Cell(180, 4, $taxIdLabel . ': ' . trim($taxCode), 0, 1, 'R');
      }
      $pdf->Ln(5);
      # Clients Details
      $pdf->SetXY(15, 70);
      $pdf->SetFont($pdfFont, 'B', 10);
      $pdf->SetFont($pdfFont, '', 9);
      if ($clientsdetails["companyname"]) {
          $pdf->Cell(0, 4, $clientsdetails["companyname"], 0, 1, 'L');
          $pdf->Cell(0, 4, Lang::trans('invoicesattn') . ': ' . $clientsdetails["firstname"] . ' ' . $clientsdetails["lastname"], 0, 1, 'L');
      } else {
          $pdf->Cell(0, 4, $clientsdetails["firstname"] . " " . $clientsdetails["lastname"], 0, 1, 'L');
      }
      $pdf->Cell(0, 4, $clientsdetails["address1"], 0, 1, 'L');
      if ($clientsdetails["address2"]) {
          $pdf->Cell(0, 4, $clientsdetails["address2"], 0, 1, 'L');
      }
      $pdf->Cell(0, 4, $clientsdetails["city"] . ", " . $clientsdetails["postcode"], 0, 1, 'L');
      $pdf->Cell(0, 4, $clientsdetails["country"], 0, 1, 'L');
      if (array_key_exists('tax_id', $clientsdetails) && $clientsdetails['tax_id']) {
          $pdf->Cell(0, 4, $taxIdLabel . ': ' . $clientsdetails['tax_id'], 0, 1, 'L');
      }
      $pdf->Ln(10);
      $pdf->Ln(10);
      $pdf->Ln(10);
      # Header Bar
      /**
       * Invoice header
       *
       * You can optionally define a header/footer in a way that is repeated across page breaks.
       * For more information, see http://docs.whmcs.com/PDF_Invoice#Header.2FFooter
       */
      $pdf->SetFont($pdfFont, 'B', 15);
      $pdf->SetFillColor(239);
      $pdf->SetFont($pdfFont, '', 12);
      if ($customfields) {
          foreach ($customfields as $customfield) {
              $pdf->Cell(125, 6, $customfield['fieldname'] . ':                                                            ' . $customfield['value'], 0, 1, 'L', '1');
          }
      }
      $pdf->Cell(125, 6, "Invoice Number " . ':                                                               ' . $invoiceid, 0, 1, 'L', '1');
      $pdf->Cell(125, 6, "Bill Issue Date" . ':                                                              ' . $datecreated, 0, 1, 'L', '1');
      $pdf->Cell(125, 6, "Billing Period" . ':                                                              ' . $datecreated, 0, 1, 'L', '1');
      $pdf->Ln(10);
                                           
      $startpage = $pdf->GetPage();
      # Invoice Items
      $tblhtml = '<table width="70%" bgcolor="#ccc" cellspacing="1" cellpadding="2" border="0">
          <tr height="30" bgcolor="#efefef" style="font-weight:bold;text-align:center;">
              <td width="80%">' . Lang::trans('invoicesdescription') . '</td>
              <td width="20%">' . Lang::trans('quotelinetotal') . '</td>
          </tr>';
      foreach ($invoiceitems as $item) {
          $tblhtml .= '
          <tr bgcolor="#fff">
              <td align="left">' . nl2br($item['description']) . '<br /></td>
              <td align="center">' . $item['amount'] . '</td>
          </tr>';
      }
      $tblhtml .= '
          <tr height="30" bgcolor="#efefef" style="font-weight:bold;">
              <td align="right">' . Lang::trans('invoicessubtotal') . '</td>
              <td align="center">' . $subtotal . '</td>
          </tr>';
      if ($taxname) {
          $tblhtml .= '
          <tr height="30" bgcolor="#efefef" style="font-weight:bold;">
              <td align="right">' . $taxrate . '% ' . $taxname . '</td>
              <td align="center">' . $tax . '</td>
          </tr>';
      }
      if ($taxname2) {
          $tblhtml .= '
          <tr height="30" bgcolor="#efefef" style="font-weight:bold;">
              <td align="right">' . $taxrate2 . '% ' . $taxname2 . '</td>
              <td align="center">' . $tax2 . '</td>
          </tr>';
      }
      $tblhtml .= '
          <tr height="30" bgcolor="#efefef" style="font-weight:bold;">
              <td align="right">' . Lang::trans('invoicescredit') . '</td>
              <td align="center">' . $credit . '</td>
          </tr>
          <tr height="30" bgcolor="#efefef" style="font-weight:bold;font-size:14px;">
              <td align="right">' . "Total Amount Due" . '</td>
              <td align="center">' . $total . '</td>
          </tr>
      </table>';
      $pdf->writeHTML($tblhtml, true, false, false, false, '');
      $pdf->Ln(5);
      if ($status == 'Unpaid'){
      $html = "<h2 style=\"color:red;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Please pay by ${duedate} </h2>";
      $pdf->writeHTML($html, true, false, false, false, '');
      $pdf->Ln(10);
      $pdf->SetFont($pdfFont, 'B', 15);
      $pdf->SetFillColor(239);
      $pdf->SetFont($pdfFont, '', 10);
      $pdf->Cell(125, 6, "Failure to pay your account in full may result in loss of service.", 0, 1, 'L', '1');
      $pdf->Cell(125, 6, "Reactivation of your service could take up to 7 days and will incur a fee. ", 0, 1, 'L', '1');
      $pdf->Ln(10);
      }
      # Notes
      if ($notes) {
          $pdf->Ln(5);
          $pdf->SetFont($pdfFont, '', 8);
          $pdf->MultiCell(170, 5, Lang::trans('invoicesnotes') . ': ' . $notes);
      }
      /**
       * Invoice footer
       */
      ============================
      can someone please correct the code so my pdf invoice will be looks same like the image i provide
       
       
      thanks everyone and plesae stay safe
    • By eubanksto
      I have two accounts that don't have a credit card on file. (They were lost during a migration somehow). And I don't know what's causing those accounts to be delivered an email EVERY day that says "We tried to bill your card but you don't have one on file."
      What is the setting that's causing this?
      The only things I suspect are 2 settings in automation.
      1. "Retry every week for..." was set to 0 (but I thought that meant disable not every day.
      2. The "Send invoice payment reminder" for 2nd and 3rd were both set to 0 also. But those specifically say 0 to disable.
      I don't feel like either of those should behave that way though.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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