Jump to content

Invoices cron error


EmirhaaN

Recommended Posts

Hello i am getting this error my crons are running but create invoices part is doesnt work.

[ERROR] InvalidArgumentException: Data missing in
         /home/mypath/public_html/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php:623
         Stack trace:
         #0 /home/mypath/public_html/vendor/nesbot/carbon/src/Carbon/Traits/Creator.php(645):
         Carbon\Carbon::rawCreateFromFormat('Y-m-d', NULL, NULL)
         #1 /home/mypath/public_html/vendor/whmcs/whmcs-foundation/lib/Service/Service.php(0):
         Carbon\Carbon::createFromFormat('Y-m-d', NULL)
         #2 /home/mypath/public_html/vendor/whmcs/whmcs-foundation/lib/UsageBilling/Invoice/ItemFactory.php(0):
         WHMCS\Service\Service->metrics(false, 10)
         #3 /home/mypath/public_html/vendor/whmcs/whmcs-foundation/lib/UsageBilling/Invoice/ServiceUsage.php(0):
         WHMCS\UsageBilling\Invoice\ItemFactory->factoryItemsFromService(Object(WHMCS\Service\Service), 10)
         #4 /home/mypath/public_html/includes/processinvoices.php(0):
         WHMCS\UsageBilling\Invoice\ServiceUsage->generateInvoiceItems(10, '2022-11-21', '1')
         #5 /home/mypath/public_html/vendor/whmcs/whmcs-foundation/lib/Cron/Task/CreateInvoices.php(0):
         createInvoices('', '', '', '', Object(WHMCS\Cron\Task\CreateInvoices))
         #6 /home/mypath/public_html/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/AbstractTask.php(0):
         WHMCS\Cron\Task\CreateInvoices->__invoke()
         #7 /home/mypath/public_html/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/AbstractTask.php(0):
         WHMCS\Scheduling\Task\AbstractTask->execute()
         #8
         /home/mypath/public_html/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Command/AbstractCronCommand.php(0
         ): WHMCS\Scheduling\Task\AbstractTask->run()
         #9
         /home/mypath/public_html/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Command/AbstractCronCommand.php(0
         ): WHMCS\Cron\Console\Command\AbstractCronCommand->executeCollection(Object(WHMCS\Scheduling\Task\Collection))
         #10 /home/mypath/public_html/vendor/symfony/console/Command/Command.php(255):
         WHMCS\Cron\Console\Command\AbstractCronCommand->execute(Object(WHMCS\Cron\Console\Input\CliInput),
         Object(Symfony\Component\Console\Output\ConsoleOutput))
         #11 /home/mypath/public_html/vendor/symfony/console/Application.php(912):
         Symfony\Component\Console\Command\Command->run(Object(WHMCS\Cron\Console\Input\CliInput),
         Object(Symfony\Component\Console\Output\ConsoleOutput))
         #12 /home/mypath/public_html/vendor/symfony/console/Application.php(264):
         Symfony\Component\Console\Application->doRunCommand(Object(WHMCS\Cron\Console\Command\DoCommand),
         Object(WHMCS\Cron\Console\Input\CliInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
         #13 /home/mypath/public_html/vendor/symfony/console/Application.php(140):
         Symfony\Component\Console\Application->doRun(Object(WHMCS\Cron\Console\Input\CliInput),
         Object(Symfony\Component\Console\Output\ConsoleOutput))
         #14 /home/mypath/public_html/crons/cron.php(0):
         Symfony\Component\Console\Application->run(Object(WHMCS\Cron\Console\Input\CliInput),
         Object(Symfony\Component\Console\Output\ConsoleOutput))
         #15 {main}

 

Link to comment
Share on other sites

  • 2 months later...

The error message you're encountering is caused by a missing data  value in the Carbon library. According to the stack trace, the error occurs in the Carbon\Carbon::createFromFormat method when trying to create a date object from a format of "Y-m-d". The method is being passed a NULL value as the data to use to create the object, causing an InvalidArgumentException to be thrown.

To resolve this issue, you will need to find out why the data is missing and ensure that it is being passed to the createFromFormat method correctly. You may need to debug the code in question or consult the relevant documentation for the WHMCS software to identify the root cause of the issue.

Link to comment
Share on other sites

  • 3 weeks later...

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.

  • 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