koivumagi
Retired Forum Member-
Posts
15 -
Joined
-
Last visited
About koivumagi

koivumagi's Achievements
Junior Member (1/3)
0
Reputation
-
Matt... Or its good if you can make so...one check box.... What info in invoice can show..name or comany name. I think this is very good option..many peoples like this.
-
Heya, I think you have forgot add one function to view client list. I have clients companys and normal peoples. If i add company, then its not good to add first and lastname.. only company name. But in list is now all names (No Name) Its very good if i can see company name if i dont add first and lastname.
-
If somebody need this function to pdf invoice... Its writing numbers to text. Like 10$ its write down Ten dollar
-
You change this $ajake=$ajakesekene[2].'/'.$ajakesekene[1].'/'.$ajakesekene[0]; $ajakesekene[2] this is day $ajakesekene[1] this is month $ajakesekene[0] this is year
-
Ok here is my full file: It has invoice created date, reference number and transaction in pdf. <?php $a1=mysql_query("SELECT SQL_CACHE id,date,status FROM tblinvoices WHERE id='".$invoiceid."' LIMIT 1") or die(mysql_error()); $a=mysql_fetch_array($a1); $ajakesekene=explode('-', $a['date']); $ajake=$ajakesekene[2].'/'.$ajakesekene[1].'/'.$ajakesekene[0]; $number = $invoiceid; if (!isset($number)) $number = "1234567890"; $kordaja = 7; $algarv = $number; do { $kontrolljark = $kontrolljark + (($number % 10) * $kordaja); if ($kordaja == 7) $kordaja = 3; else if ($kordaja == 3) $kordaja = 1; else if ($kordaja == 1) $kordaja = 7; } while ((int)$number /= 10); $kontrolljark = 10 - ($kontrolljark % 10); if ($kontrolljark == 10){$kontrolljark = 0;} $viitenumber = $algarv.$kontrolljark; # Company Details $pdf->SetFont('Arial','',13); $pdf->Cell(0,6,$companyname,0,1,'L'); $pdf->SetFont('Arial','',; foreach ($companyaddress AS $addressline) { $pdf->Cell(0,4,$addressline,0,1,'L'); } //Line break //Logo $pdf->Image(dirname(__FILE__).'/../images/logo.jpg',140,8,50); $pdf->Ln(10); //Line break //Arial bold 15 $pdf->SetFont('Arial','B',12); //Move to the right $pdf->SetFillColor(239); $pdf->Cell(0,6,$_LANG["invoicestitle"].' '.$invoiceid,0,1,'R','0'); $pdf->SetFont('Arial','',10); $pdf->Cell(0,6,$_LANG["invoicesdatecreated"].': '.$ajake,0,1,'R','0'); $pdf->SetFont('Arial','',10); $pdf->Cell(0,6,$_LANG["invoicesdatedue"].': '.$duedate,0,1,'R','0'); $pdf->SetFont('Arial','',10); $pdf->Cell(0,6,'Viitenumber: '.$viitenumber,0,1,'R','0'); //Line break $pdf->Ln(10) ; # Clients Details $pdf->SetFont('Arial','',11); if ($clientsdetails["companyname"]) { $pdf->Cell(0,4,$clientsdetails["companyname"],0,1,'L'); $pdf->Cell(0,5,"Kontakt: ".$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); } else { $pdf->Cell(0,5,$clientsdetails["firstname"]." ".$clientsdetails["lastname"],0,1,'L'); } $pdf->SetFont('Arial','',; $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["state"].", ".$clientsdetails["postcode"],0,1,'L'); $pdf->Cell(0,4,$clientsdetails["country"],0,1,'L'); $pdf->Ln(10); $pdf->SetFont('Arial','B',10); $pdf->SetFillColor(239); $pdf->Cell(148,7,$_LANG["invoicesdescription"],1,0,'C','1'); $pdf->Cell(40,7,$_LANG["invoicesamount"],1,0,'C','1'); $pdf->Ln(); $pdf->SetFont('Arial','',10); foreach ($invoiceitems AS $item) { if (strlen($item["description"])>85) { $pdf->MultiCell(148,6,$item["description"],1); $pdf->Cell(148,6,"",1); $pdf->Cell(40,6,$currencysymbol.$item["amount"],1,0,'C'); } else { $pdf->Cell(148,6,$item["description"],1); $pdf->Cell(40,6,$currencysymbol.$item["amount"],1,0,'C'); } $pdf->Ln(); } $pdf->SetFont('Arial','B',10); $pdf->Cell(148,7,$_LANG["invoicessubtotal"].":",1,0,'R','1'); $pdf->Cell(40,7,$currencysymbol.$subtotal,1,0,'C','1'); $pdf->Ln(); $pdf->Cell(148,7,$_LANG["invoicescredit"].":",1,0,'R','1'); $pdf->Cell(40,7,$currencysymbol.$credit,1,0,'C','1'); $pdf->Ln(); if ($CONFIG["TaxEnabled"]) { $pdf->Cell(148,7,$taxrate."% ".$_LANG["invoicestax"].":",1,0,'R','1'); $pdf->Cell(40,7,$currencysymbol.$tax,1,0,'C','1'); $pdf->Ln(); } $pdf->Cell(148,7,$_LANG["invoicestotal"].":",1,0,'R','1'); $pdf->Cell(40,7,$currencysymbol.$total,1,0,'C','1'); $pdf->Ln(); $pdf->Ln(); if($a['status']=='Paid'){ $pdf->Ln(10); $pdf->SetFont('Arial','b',9); $pdf->Cell(0,4,$_LANG['invoicestransactions'],0,1,'L','0'); $pdf->Ln(5); $pdf->Cell(40,4,$_LANG['invoicestransdate'],1,0,'C','1'); $pdf->Cell(58,4,$_LANG['invoicestransgateway'],1,0,'C','1'); $pdf->Cell(50,4,$_LANG['invoicestransid'],1,0,'C','1'); $pdf->Cell(40,4,$_LANG['invoicestransamount'],1,0,'C','1'); $pdf->Ln(); $trans1=mysql_query("SELECT SQL_CACHE userid,gateway,date,amountin,transid,invoiceid FROM tblaccounts WHERE invoiceid='".$invoiceid."'") or die(mysql_error()); while($trans = mysql_fetch_assoc($trans1)) { $trans2=mysql_query("SELECT SQL_CACHE gateway,setting,value FROM tblpaymentgateways WHERE gateway='".$trans['gateway']."' AND setting='name' LIMIT 1") or die(mysql_error()); $tra=mysql_fetch_array($trans2); $pdf->SetFont('Arial','',9); $pdf->Cell(40,4,$trans['date'],1); $pdf->Cell(58,4,$tra['value'],1,0,'C'); $pdf->Cell(50,4,$trans['transid'],1,0,'C'); $pdf->Cell(40,4,$trans['amountin'],1,0,'C'); $pdf->Ln(); } } ?>
-
Ok.. if you added this date function then u know that top you have added this : after <?php $a1=mysql_query("SELECT SQL_CACHE id,dateFROM tblinvoices WHERE id='".$invoiceid."' LIMIT 1") or die(mysql_error()); $a=mysql_fetch_array($a1); now remove this and add: or you only add status to here: SELECT SQL_CACHE id,date,status <<< here $a1=mysql_query("SELECT SQL_CACHE id,date,status FROM tblinvoices WHERE id='".$invoiceid."' LIMIT 1") or die(mysql_error()); $a=mysql_fetch_array($a1);
-
I found one good code more If you dont like this bottom Page 1/1 and your web address.. then add to bottom before ?> this: $pdf->Open(0,7,'');
-
I have used this system now.. i think 5 days and i like this . but yes...too much is crypted...but if you can little think and know php you can make anything WHMCS RULZ
-
Hey, Im now back so... here is what you use: Added "status" to: $a1=mysql_query("SELECT SQL_CACHE id,date,status FROM tblinvoices WHERE id='".$invoiceid."' LIMIT 1") or die(mysql_error()); $a=mysql_fetch_array($a1); Then bottom before ?> add: if($a['status']=='Paid'){ $pdf->Ln(10); $pdf->SetFont('Arial','b',9); $pdf->Cell(0,4,$_LANG['invoicestransactions'],0,1,'L','0'); $pdf->Ln(5); $pdf->Cell(40,4,$_LANG['invoicestransdate'],1,0,'C','1'); $pdf->Cell(58,4,$_LANG['invoicestransgateway'],1,0,'C','1'); $pdf->Cell(50,4,$_LANG['invoicestransid'],1,0,'C','1'); $pdf->Cell(40,4,$_LANG['invoicestransamount'],1,0,'C','1'); $pdf->Ln(); $trans1=mysql_query("SELECT SQL_CACHE userid,gateway,date,amountin,transid,invoiceid FROM tblaccounts WHERE invoiceid='".$invoiceid."'") or die(mysql_error()); while($trans = mysql_fetch_assoc($trans1)) { $trans2=mysql_query("SELECT SQL_CACHE gateway,setting,value FROM tblpaymentgateways WHERE gateway='".$trans['gateway']."' AND setting='name' LIMIT 1") or die(mysql_error()); $tra=mysql_fetch_array($trans2); $pdf->SetFont('Arial','',9); $pdf->Cell(40,4,$trans['date'],1); $pdf->Cell(58,4,$tra['value'],1,0,'C'); $pdf->Cell(50,4,$trans['transid'],1,0,'C'); $pdf->Cell(40,4,$trans['amountin'],1,0,'C'); $pdf->Ln(); } } If you want more down this then 1st line change this: if($a['status']=='Paid'){ $pdf->Ln(10); <<<--- 10 to 20 like And finish.. I hope its helping you....
-
You think in this file? viewinvoice.php?id=InvoiceNumber That in pdf file end it showing same transactions and so...? I think this is possible... I write something and copy here then
-
Hi, I have made my owen Bank Transfer gateway and callback system. All is working. after paying it change invoices to Paid and adding new Transactions line. Now problem is this: What line i need add to callback file, that after payment its sending "Invoice Payment Confirmation" I hope its not so hard to tell me this... Maybe only what file it use and commands..i make all other self.
-
Heya. I have made it so: includes/pdfconfig.php after <?php add: $a1=mysql_query("SELECT SQL_CACHE date FROM tblinvoices WHERE id='".$invoiceid."' LIMIT 1") or die(mysql_error()); $a=mysql_fetch_array($a1); $ajakesekene=explode('-', $a['date']); $ajake=$ajakesekene[2].'/'.$ajakesekene[1].'/'.$ajakesekene[0]; Then add this next lines where you want show your creating date: $pdf->SetFont('Arial','',10); $pdf->Cell(0,6,$_LANG["invoicesdatecreated"].': '.$ajake,0,1,'R','0'); I hope its helping you.
-
Thanks. I wait fix then.
-
Hi, I have tested many times to pay with moneybookers. Transactions is OK and i can see Transaction Date Gateway Transaction ID Amount 18/03/2007 Moneybookers ******* 1.00 EEK But why its puting every some time again this same Transaction? Like so: 18/03/2007 Moneybookers ******** 1.00 EEK 18/03/2007 Moneybookers ******** 1.00 EEK 18/03/2007 Moneybookers ******** 1.00 EEK 18/03/2007 Moneybookers ******** 1.00 EEK 18/03/2007 Moneybookers ******** 1.00 EEK 18/03/2007 Moneybookers ******** 1.00 EEK 18/03/2007 Moneybookers ******** 1.00 EEK 18/03/2007 Moneybookers ******** 1.00 EEK 18/03/2007 Moneybookers ******** 1.00 EEK 18/03/2007 Moneybookers ******** 1.00 EEK And Balance: -9.00 EEK
