Jump to content

Sonu2007

Member
  • Posts

    80
  • Joined

  • Last visited

About Sonu2007

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Sonu2007's Achievements

Member

Member (2/3)

0

Reputation

  1. Looking for module/ hook which can set different invoice number as per their payment method. Example: If invoice paid via CC invoice number generate to Year/Month/Date-CC-00001, if it is paid via Paypal it must generate to Year/Month/Date-PP-00001
  2. How to achieve this if i want different invoices to use the same number EX: PP-1 and BT-1. I just want to display such format on invoice not in DB update
  3. It is possible to show knowledgebase Title without "knowledgebase" word. I looked in header.tpl but there is only {if} statement for KB title. Ex: Currently it is showing "ArticleTitle - Knowledgebase - Company name" i want to show something like "ArticleTitle - Company name" Also in URL it is something like https://www.xxx.com/knowledgebase/109/ArticleTitle.html it is possible to remove "109" and ".html" from url? Please some one guide me on this
  4. Thank you all. Everything is sorted now.
  5. So there is no difference / affect on code, we can use either?
  6. following code working fine If i remove {literal}. As per my understanding all java scripts need to be in {literal} tag correct..? there is any way to use smarty without {ldelim) ? <script type="application/ld+json"> {ldelim} "@context": "http://schema.org", "@type": "Organization", "name": "{$pagetitle}", "description": "{$desc}", {rdelim} </script>
  7. Non of them are working, my following code print as it is {literal} <script type="application/ld+json">{$ldelim} { "@context": "http://schema.org", "@type": "Organization", "name": "{$pagetitle}", "description": "{$desc}", } {$rdelim} </script> {/literal}
  8. still same, its show syntax as it is instead of output
  9. There is way so i can use smarty tags inside structural data syntax? something like <script type="application/ld+json"> { "@context" : "http://schema.org", "@type" : "Organization", "name":"{$title}", "description": "{$desc}", Above code return output as following instead of actual site title and description "name":"{$title}" "description": "{$desc}"
  10. I am trying to create custom report which show Paid invoices with clients details in selected month. I am not sure what wrong with my code it is not generating any report. Any one point me in right direction? <?php if ($startday=="") { $startday=date("d"); $startmonth=date("m"); $startyear=date("Y"); $endday=date("d"); $endmonth=date("m"); $endyear=date("Y"); } $pmonth = str_pad($month, 2, "0", STR_PAD_LEFT); $reportdata["title"] = "Invoice details for $startday/$startmonth/$startyear - $endday/$endmonth/$endyear"; $reportdata["description"] = "Invoices Per Period"; $reportdata["headertext"] = "<form method=\"post\" action=\"$PHP_SELF?report=$report&calculate=true\"><center>Start Date: "; $reportdata["headertext"] .= "<select name=\"startday\">"; for ( $counter = 1; $counter <= 31; $counter += 1) { $reportdata["headertext"] .= "<option"; if ($counter==$startday) { $reportdata["headertext"] .= " selected"; } $reportdata["headertext"] .= ">$counter"; } $reportdata["headertext"] .= "</select> <select name=\"startmonth\">"; for ( $counter = 1; $counter <= 12; $counter += 1) { $reportdata["headertext"] .= "<option"; if ($counter==$startmonth) { $reportdata["headertext"] .= " selected"; } $reportdata["headertext"] .= ">$counter"; } $currentyear=date("Y"); $reportdata["headertext"] .= "</select> <select name=\"startyear\">"; for ( $counter = 2006; $counter <= $currentyear+1; $counter++) { $reportdata["headertext"] .= "<option"; if ($counter==$startyear) { $reportdata["headertext"] .= " selected"; } $reportdata["headertext"] .= ">$counter"; } $reportdata["headertext"] .= "</select> End Date: "; $reportdata["headertext"] .= "<select name=\"endday\">"; for ( $counter = 1; $counter <= 31; $counter += 1) { $reportdata["headertext"] .= "<option"; if ($counter==$endday) { $reportdata["headertext"] .= " selected"; } $reportdata["headertext"] .= ">$counter"; } $reportdata["headertext"] .= "</select> <select name=\"endmonth\">"; for ( $counter = 1; $counter <= 12; $counter += 1) { $reportdata["headertext"] .= "<option"; if ($counter==$endmonth) { $reportdata["headertext"] .= " selected"; } $reportdata["headertext"] .= ">$counter"; } $reportdata["headertext"] .= "</select> <select name=\"endyear\">"; for ( $counter = 2006; $counter <= $currentyear+1; $counter++) { $reportdata["headertext"] .= "<option"; if ($counter==$endyear) { $reportdata["headertext"] .= " selected"; } $reportdata["headertext"] .= ">$counter"; } $reportdata["headertext"] .= "</select> <input type=\"submit\" value=\"Generate Report\"></form>"; $startday = str_pad($startday,2,"0",STR_PAD_LEFT); $startmonth = str_pad($startmonth,2,"0",STR_PAD_LEFT); $endday = str_pad($endday,2,"0",STR_PAD_LEFT); $endmonth = str_pad($endmonth,2,"0",STR_PAD_LEFT); $startdate = $startyear.$startmonth.$startday; $enddate = $endyear.$endmonth.$endday; $enddate = $enddate."235959"; $query = "SELECT `tblinvoices`.`invoicenum` AS 'Invoice Number', `tblinvoices`.`date` AS 'Date', CONCAT(`tblclients`.`firstname`, ' ', `tblclients`.`lastname`) AS 'fullname', CONCAT (`tblclients`.`address1`,', ',`tblclients.city`,', ',`tblclients.state`,' - ',`tblclients.postcode`,', ',`tblclients.country`) AS 'Address' FROM `tblinvoices`, `tblclients` WHERE `tblinvoices`.`date` >='$startdate' AND `tblinvoices`.`date` <='$enddate' AND `tblclients`.`id` = `tblinvoices`.`userid` ORDER BY `tblinvoices`.`id` ASC"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); while ($data = mysql_fetch_array($result)) { $id = "<a href=\"invoices.php?action=edit&id=". $data["id"] ."\" target=\"_blank\"\">". $data["id"] ."</a>"; $client = "<a href=\"clientssummary.php?userid=". $data['userid'] ."\" target=\"_blank\"\">" . $data['fullname'] . "</a>"; echo $address = $data['address']; $amount = $CONFIG["CurrencySymbol"].$data["total"]; $date = fromMySQLDate($data['date']); $duedate = fromMySQLDate($data['duedate']); $status = $data['status']; $colour = "<span style='color:"; switch($status) { case "Paid": $colour .= "green"; $grandtotal += $data['total']; break; case "Unpaid": $colour .= "darkred"; $grandtotal += $data['total']; break; case "Cancelled": $colour .= "lightgrey"; break; } $colour .= ";'>"; $reportdata["tableheadings"] = array("Invoice ID","Invoice Date","Invoice Due Date","Client","Status","Amount","Date Paid"); $reportdata["tablevalues"][] = array($id,$date,$duedate,$client,$address,$colour . $status . "</span>",$colour . $amount . "</span>",$colour . $datepaid . "</span>"); } $reportdata["headertext"] .= "<p>Total number of Invoices: $num_rows</p>"; $reportdata["headertext"] .= "<p>Total: ".$CONFIG["CurrencySymbol"]." $grandtotal</p>"; $data['footertext'] = "<p style=\"text-align:center\"><span style=\"font-size:2em; margin:10px auto; font-weight:bold;\">Total: ".$CONFIG["CurrencySymbol"] . $grandtotal . "</span><table width=90% align=center><tr><td>"; $data["footertext"].="</td></tr></table>"; ?>
  11. How i can modify "Annual Income Report" or "Monthly Transactions Report" by payment method. Currently it show totals considering all payment modes.
×
×
  • 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