vtiger Forum Index vtiger
The Honest Open Source CRM
 

don't show the productDescription in pdf
Click here to go to the original topic

 
       vtiger Forum Index -> 3rd-Party Extensions
Previous topic :: Next topic  
Author Message
Leonardo



Joined: 30 Jun 2008
Posts: 7

Posted: Tue Aug 05, 2008 4:14 pm    Post subject: don't show the productDescription in pdf  

Hi
I talk my problem. I was tryng to customize the pdfQuote and only need that the pdf show me the productDescription(vtiger_products) but not the productName.
I'd changed the follow lines in CreatePDF.php

//This is to get all prodcut details as row basis
for($i=1,$j=$i-1;$i<=$num_products;$i++,$j++)
{
$product_name[$i] = $associated_products[$i]['productName'.$i];
//$prod_name[$i] = $associated_products[$i]['productName'.$i];
$prod_description[$i] = $associated_products[$i]['productDescription'.$i];
$product_id[$i] = $associated_products[$i]['hdnProductId'.$i];
$qty[$i] = $associated_products[$i]['qty'.$i];
$unit_price[$i] = number_format($associated_products[$i]['unitPrice'.$i],2,'.',',');
$list_price[$i] = number_format($associated_products[$i]['listPrice'.$i],2,'.',',');
$list_pricet[$i] = $associated_products[$i]['listPrice'.$i];
$discount_total[$i] = $associated_products[$i]['discountTotal'.$i];
//aded for 5.0.3 pdf changes
$product_code[$i] = $associated_products[$i]['hdnProductcode'.$i];

$taxable_total = $qty[$i]*$list_pricet[$i]-$discount_total[$i];

$producttotal = $taxable_total;
$total_taxes = '0.00';
if($focus->column_fields["hdnTaxType"] == "individual")
{
$total_tax_percent = '0.00';
//This loop is to get all tax percentage and then calculate the total of all taxes
for($tax_count=0;$tax_count<count($associated_products[$i]['taxes']);$tax_count++)
{
$tax_percent = $associated_products[$i]['taxes'][$tax_count]['percentage'];
$total_tax_percent = $total_tax_percent+$tax_percent;
$tax_amount = (($taxable_total*$tax_percent)/100);
$total_taxes = $total_taxes+$tax_amount;
}
$producttotal = $taxable_total+$total_taxes;
$product_line[$j]["Tax"] = number_format($total_taxes,2,'.',',')."\n ($total_tax_percent %) ";
}
$prod_total[$i] = number_format($producttotal,2,'.',',');

$product_line[$j]["Product Code"] = $product_code[$i];
//$product_line[$j]["Product Name"] = $product_name[$i];
$product_line[$j]["Description"] = $prod_description[$i];
$product_line[$j]["Qty"] = $qty[$i];
$product_line[$j]["Price"] = $list_price[$i];
//$product_line[$j]["Discount"] = $discount_total[$i];
$product_line[$j]["Total"] = $prod_total[$i];

Like can see I'd changed description by name but not works. :?
Back to top  
Leonardo



Joined: 30 Jun 2008
Posts: 7

Posted: Tue Aug 05, 2008 4:15 pm    Post subject: Re: don't show the productDescription in pdf  

[quote="Leonardo"]Hi
I talk my problem. I was tryng to customize the pdfQuote and only need that the pdf show me the productDescription(vtiger_products) but not the productName.
I'd changed the follow lines in CreatePDF.php

//This is to get all prodcut details as row basis
for($i=1,$j=$i-1;$i<=$num_products;$i++,$j++)
{
$product_name[$i] = $associated_products[$i]['productName'.$i];
//$prod_name[$i] = $associated_products[$i]['productName'.$i];
$prod_description[$i] = $associated_products[$i]['productDescription'.$i];
$product_id[$i] = $associated_products[$i]['hdnProductId'.$i];
$qty[$i] = $associated_products[$i]['qty'.$i];
$unit_price[$i] = number_format($associated_products[$i]['unitPrice'.$i],2,'.',',');
$list_price[$i] = number_format($associated_products[$i]['listPrice'.$i],2,'.',',');
$list_pricet[$i] = $associated_products[$i]['listPrice'.$i];
$discount_total[$i] = $associated_products[$i]['discountTotal'.$i];
//aded for 5.0.3 pdf changes
$product_code[$i] = $associated_products[$i]['hdnProductcode'.$i];

$taxable_total = $qty[$i]*$list_pricet[$i]-$discount_total[$i];

$producttotal = $taxable_total;
$total_taxes = '0.00';
if($focus->column_fields["hdnTaxType"] == "individual")
{
$total_tax_percent = '0.00';
//This loop is to get all tax percentage and then calculate the total of all taxes
for($tax_count=0;$tax_count<count($associated_products[$i]['taxes']);$tax_count++)
{
$tax_percent = $associated_products[$i]['taxes'][$tax_count]['percentage'];
$total_tax_percent = $total_tax_percent+$tax_percent;
$tax_amount = (($taxable_total*$tax_percent)/100);
$total_taxes = $total_taxes+$tax_amount;
}
$producttotal = $taxable_total+$total_taxes;
$product_line[$j]["Tax"] = number_format($total_taxes,2,'.',',')."\n ($total_tax_percent %) ";
}
$prod_total[$i] = number_format($producttotal,2,'.',',');

$product_line[$j]["Product Code"] = $product_code[$i];
//$product_line[$j]["Product Name"] = $product_name[$i];
$product_line[$j]["Description"] = $prod_description[$i];
$product_line[$j]["Qty"] = $qty[$i];
$product_line[$j]["Price"] = $list_price[$i];
//$product_line[$j]["Discount"] = $discount_total[$i];
$product_line[$j]["Total"] = $prod_total[$i];

Like can see I'd changed description by name but not works. :?[/quote]
Back to top  
 
       vtiger Forum Index -> 3rd-Party Extensions
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.15 © 2001, 2002 phpBB Group