Jump to content

dubjuice

Members
  • Posts

    24
  • Joined

  • Last visited

Reputation Activity

  1. Like
    dubjuice got a reaction from ariq01 in Adding Existing Cpanel Accounts - Username Issue   
    Ok i Updated the API but that didnt seem to resolve it either.  I removed the existing service from the account and re-added the service this time with the 8+ characater username and it took it.  It seems that updating the service after its been added doesnt update the cpanel username properly.
  2. Like
    dubjuice got a reaction from Blesta Addons in Cost Field In Invoice Calculation   
    i dont really understand your question.  All i want is for the invoice that is generated to show the correct line item total without tax.  Having the cost column include the tax makes no sense.  People assuming the column totals up which it doesnt because if you total the cost column its the total price not the subtotal price.   My fix in the PDF works fine Im just concerned that if i update blesta the changes will get overridden with a new pdf template file.
  3. Like
    dubjuice got a reaction from Blesta Addons in Cost Field In Invoice Calculation   
    I did try searching for it but couldnt find anything.  Whats the inclusive tax calculation?  I fix the problem by modifying the default_invoice_pdf.php file making the following change to calculate the cost field instead of using the total from the line item.  Problem is that if the system is updated i think this will get overriden (not 100% sure about that). 
     
     
    public function drawInvoice() {
            
            $options = $this->line_options;
            $options['y_pos'] = max($this->header_end_y, $this->GetY());
            
            // Build line items
            $lines = array();

            for ($i=0; $i<count($this->invoice->line_items); $i++) {
                $lines[] = array(
                    'name'=>$this->invoice->line_items[$i]->description,
                    'qty'=>$this->CurrencyFormat->truncateDecimal($this->invoice->line_items[$i]->qty, 0),
                    'unit_price'=>$this->CurrencyFormat->format($this->invoice->line_items[$i]->amount, $this->invoice->currency, self::$standard_num_options),
                    'price'=>$this->CurrencyFormat->format(($this->invoice->line_items[$i]->amount*$this->invoice->line_items[$i]->qty), $this->invoice->currency, self::$standard_num_options),
                       /**'price'=>$this->CurrencyFormat->format($this->invoice->line_items[$i]->total, $this->invoice->currency, self::$standard_num_options),**/
                );
×
×
  • Create New...