Jump to content

vetal

Members
  • Posts

    18
  • Joined

  • Last visited

Posts posted by vetal

  1. Сron errors began to appear аfter upgrading blesta from 5.4.0 to 5.5.1:

    Error: Argument 1 passed to Blesta\Core\Automation\TaskFactory::cronTask() must be an instance of stdClass, bool given, called in /var/www/vhosts/crm/public_html/app/controllers/cron.php on line 806 #0 /var/www/vhosts/crm/public_html/app/controllers/cron.php(806): Blesta\Core\Automation\TaskFactory->cronTask()
    #1 /var/www/vhosts/crm/public_html/app/controllers/cron.php(244): Cron->license()
    #2 /var/www/vhosts/crm/public_html/app/controllers/cron.php(173): Cron->allSystem()
    #3 /var/www/vhosts/crm/public_html/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): Cron->index()
    #4 /var/www/vhosts/crm/public_html/vendors/minphp/bridge/src/Lib/Dispatcher.php(61): Dispatcher::dispatch()
    #5 /var/www/vhosts/crm/public_html/index.php(24): Dispatcher::dispatchCli()
    #6 {main}Error: Argument 1 passed to Blesta\Core\Automation\TaskFactory::cronTask() must be an instance of stdClass, bool given, called in /var/www/vhosts/crm/public_html/app/controllers/cron.php on line 781 #0 /var/www/vhosts/crm/public_html/app/controllers/cron.php(781): Blesta\Core\Automation\TaskFactory->cronTask()
    #1 /var/www/vhosts/crm/public_html/app/controllers/cron.php(244): Cron->amazonS3Backup()
    #2 /var/www/vhosts/crm/public_html/app/controllers/cron.php(173): Cron->allSystem()
    #3 /var/www/vhosts/crm/public_html/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): Cron->index()
    #4 /var/www/vhosts/crm/public_html/vendors/minphp/bridge/src/Lib/Dispatcher.php(61): Dispatcher::dispatch()
    #5 /var/www/vhosts/crm/public_html/index.php(24): Dispatcher::dispatchCli()
    #6 {main}Error: Argument 1 passed to Blesta\Core\Automation\TaskFactory::cronTask() must be an instance of stdClass, bool given, called in /var/www/vhosts/crm/public_html/app/controllers/cron.php on line 756 #0 /var/www/vhosts/crm/public_html/app/controllers/cron.php(756): Blesta\Core\Automation\TaskFactory->cronTask()
    #1 /var/www/vhosts/crm/public_html/app/controllers/cron.php(244): Cron->sftpBackup()
    #2 /var/www/vhosts/crm/public_html/app/controllers/cron.php(173): Cron->allSystem()
    #3 /var/www/vhosts/crm/public_html/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): Cron->index()
    #4 /var/www/vhosts/crm/public_html/vendors/minphp/bridge/src/Lib/Dispatcher.php(61): Dispatcher::dispatch()
    #5 /var/www/vhosts/crm/public_html/index.php(24): Dispatcher::dispatchCli()

     

    PHP: 7.4.25

    MariaDB: 10.6.4

  2. New lines are added to invoice without tax when using $this->Invoices->edit() in my plugin. It started from version 3.4.4.

     

     public function getEvents() {
            return array(
                array(
                    'event' => "Invoices.add",
                    'callback' => array("this", "InvoicesAdd")
                )         
            );
        }
     

     

    public function InvoicesAdd($event) {

     

                $params = $event->getParams();

     

                $vars['lines'][] = array(
                                  'service_id' => 3281,
                                  'description' => "Usage",
                                   'qty' => '1',
                                  'amount' => 2,
                                  'tax' => 1
                 );
     
                $this->Invoices->edit($params['invoice_id'], $vars);
     
               $test = $this->Invoices->get($params['invoice_id']);
               var_dump($test);
    }
     
    object(stdClass)#641 (25) {
      ["id"]=>
      string(4) "3281"
      ["id_format"]=>
      string(5) "{num}"
      ["id_value"]=>
      string(4) "3154"
      ["client_id"]=>
      string(2) "56"
      ["date_billed"]=>
      string(19) "2015-07-01 20:03:49"
      ["date_due"]=>
      string(19) "2015-07-01 20:03:49"
      ["date_closed"]=>
      NULL
      ["date_autodebit"]=>
      NULL
      ["status"]=>
      string(6) "active"
      ["subtotal"]=>
      string(7) "31.9500"
      ["total"]=>
      string(7) "35.8400"
      ["paid"]=>
      string(6) "0.0000"
      ["previous_due"]=>
      string(8) "487.7600"
      ["currency"]=>
      string(3) "CAD"
      ["note_public"]=>
      NULL
      ["note_private"]=>
      NULL
      ["id_code"]=>
      string(4) "3154"
      ["delivery_date_sent"]=>
      NULL
      ["due"]=>
      string(7) "35.8400"
      ["line_items"]=>
      array(2) {
        [0]=>
        object(stdClass)#647 (13) {
          ["id"]=>
          string(5) "28039"
          ["invoice_id"]=>
          string(4) "3281"
          ["service_id"]=>
          string(3) "362"
          ["description"]=>
          string(46) "World  (Jul 01, 2015 - Aug 01, 2015)"
          ["qty"]=>
          string(6) "1.0000"
          ["amount"]=>
          string(7) "29.9500"
          ["subtotal"]=>
          string(11) "29.95000000"
          ["taxes"]=>
          array(1) {
            [0]=>
            object(stdClass)#654 (11) {
              ["id"]=>
              string(2) "15"
              ["company_id"]=>
              string(1) "1"
              ["level"]=>
              string(1) "1"
              ["name"]=>
              string(3) "HST"
              ["amount"]=>
              string(7) "13.0000"
              ["type"]=>
              string(9) "exclusive"
              ["country"]=>
              string(2) "CA"
              ["state"]=>
              NULL
              ["status"]=>
              string(6) "active"
              ["cascade"]=>
              string(1) "0"
              ["tax_total"]=>
              float(3.89)
            }
          }
          ["taxes_applied"]=>
          array(1) {
            [0]=>
            array(4) {
              ["id"]=>
              string(2) "15"
              ["name"]=>
              string(3) "HST"
              ["percentage"]=>
              string(7) "13.0000"
              ["amount"]=>
              float(3.89)
            }
          }
          ["tax_subtotal"]=>
          int(0)
          ["tax_total"]=>
          float(3.89)
          ["total"]=>
          float(29.95)
          ["total_w_tax"]=>
          float(33.84)
        }
        [1]=>
        object(stdClass)#275 (13) {
          ["id"]=>
          string(5) "28040"
          ["invoice_id"]=>
          string(4) "3281"
          ["service_id"]=>
          string(3) "362"
          ["description"]=>
          string(46) "Usage"
          ["qty"]=>
          string(6) "1.0000"
          ["amount"]=>
          string(6) "2.0000"
          ["subtotal"]=>
          string(10) "2.00000000"
          ["taxes"]=>
          array(0) {
          }
          ["taxes_applied"]=>
          array(0) {
          }
          ["tax_subtotal"]=>
          int(0)
          ["tax_total"]=>
          int(0)
          ["total"]=>
          float(2)
          ["total_w_tax"]=>
          float(2)
        }
      }
      ["delivery"]=>
      array(1) {
        [0]=>
        object(stdClass)#271 (4) {
          ["id"]=>
          string(4) "5663"
          ["invoice_id"]=>
          string(4) "3281"
          ["method"]=>
          string(5) "email"
          ["date_sent"]=>
          NULL
        }
      }
      ["meta"]=>
      array(0) {
      }
      ["tax_subtotal"]=>
      int(0)
      ["tax_total"]=>
      float(3.89)
      ["taxes"]=>
      array(1) {
        [0]=>
        object(stdClass)#654 (11) {
          ["id"]=>
          string(2) "15"
          ["company_id"]=>
          string(1) "1"
          ["level"]=>
          string(1) "1"
          ["name"]=>
          string(3) "HST"
          ["amount"]=>
          string(7) "13.0000"
          ["type"]=>
          string(9) "exclusive"
          ["country"]=>
          string(2) "CA"
          ["state"]=>
          NULL
          ["status"]=>
          string(6) "active"
          ["cascade"]=>
          string(1) "0"
          ["tax_total"]=>
          float(3.89)
        }
      }
    }
     
    OS: Centos 6.6
    Blesta: 3.5.0
    PHP: 5.3.x
    MySQL: 5.1.x
     
  3. Some of these services dont have addons.

     

    I have exported data of this service to xls file. I executed:

     

    SELECT invoice_lines.*, invoices.*, services.*, package_pricing.*, packages.* FROM services INNER JOIN package_pricing  ON package_pricing.id=services.pricing_id INNER JOIN packages ON packages.id=package_pricing.package_id INNER JOIN invoice_lines ON invoice_lines.service_id=services.id INNER JOIN invoices ON invoices.id=invoice_lines.invoice_id
    WHERE invoice_lines.service_id=3795 ORDER BY date_billed

     

    I noticed that new invoice has a space at the beginning of invoice description. May be problem in this.

    service.zip

  4. Yes, "Use Module" box was checked, but I can`t unchecked it, because it also is not stored. But when I submit the form I see "The service was successfully updated."

     

    URL: /admin/clients/editservice/25/4509/

     

    Blesta version: 3.2.1

    License Module: 1.4.0

     

    I have installed PHP 5.3.28 + MySQL 5.5.36

  5. Hello guys!

     

    When I clicked on Invoice View, I saw error: 

    TCPDF ERROR: Some data has already been output, can't send PDF file

     

    It was fixed due to adding in ./components/invoice_templates/tcpdf_wrapper.php to line 2:

    ob_end_clean();

  6. Hi guys.

     

    I need to do some actions when invoice change status. When I used event Invoices.edit and clicked on "Edit", all was worked, but when I go to transaction properties  and click on unapply, invoice change status from closed to open and blesta don't call event Invoices.edit.  I think you need to add new event Invoices.open or call event Invoices.edit, when invoice change status via unapply.

     

    Thank you.

  7. Hi everyone.

     

    I would like to use Invoices.edit event and I added to function "edit" in ./components/events/default/events_invoices_callback.php my code, but variables such as $params, $event is empty in this function and  $event->getParams() didn't return anything.

×
×
  • Create New...