This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string FormatIndianCurrency(float currency_val) | |
{ | |
number = ""; | |
frac_value = ""; | |
if(currency_val != null) | |
{ | |
if(currency_val > 0.0) | |
{ | |
// whole_value = "12345678"; | |
whole_value = currency_val.toString().getPrefix("."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ticket_attachment_api_url = "https://desk.zoho.com/api/v1/tickets/" + Desk_Ticket_ID + "/attachments"; | |
header_map = Map(); | |
header_map.put("orgId","yourOrgID"); | |
yourFile = invokeurl | |
[ | |
url :"httpsdownloadURL" | |
type :GET | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%{ | |
%> | |
<link | |
href="https://aorborc.github.io/bootstrap5/css/main.min.css" | |
rel="stylesheet" | |
crossorigin="anonymous" | |
/> | |
<link rel="preconnect" href="https://fonts.googleapis.com" /> | |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | |
<link |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%{ | |
data_source = {"code":"0","description":"Success","subscriberQuota":{"qtavalue":"500.00","qtabalance":"419.30","qtaconsumption":"80.70","type":"2","refuelingTotal":"0.00","qtaconsumptionTotal":"263.22"},"historyQuota":{{"time":"20220707","qtaconsumption":"19.07","mcc":"714"},{"time":"20220707","qtaconsumption":"236.41","mcc":"710"},{"time":"20220707","qtaconsumption":"7.74","mcc":"708"},{"time":"20220706","qtaconsumption":"164.85","mcc":"714"}},"ext":null}; | |
subscriberQuota = data_source.get("subscriberQuota"); | |
qtaconsumption = subscriberQuota.get("qtaconsumption").toDecimal(); | |
qtavalue = subscriberQuota.get("qtavalue").toDecimal(); | |
percent = ((qtaconsumption / qtavalue).round(4) * 100).round(2); | |
deg_value = percent / 200; | |
%> | |
<div style="margin:10px;display:flex;flex-direction:column;"> | |
<h1 style="text-align:center;">subscriberQuota</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string String.Amount2Words(float amount) | |
{ | |
//amount.frac() not working for long numbers | |
paise_str = amount.toString().getSuffix("."); | |
if(paise_str != "") | |
{ | |
paise_amount = paise_str.toLong(); | |
paise_str = " and "+ thisapp.String.TwoDigitWords(paise_amount) + " paise"; | |
} | |
rupee_str = String.RupeeInWords(amount.toLong()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function readAndSend() { | |
let url = 'https://www.zoho.com/blog/feed'; | |
let xml = UrlFetchApp.fetch(url).getContentText(); | |
let document = XmlService.parse(xml.trim()); | |
let root = document.getRootElement(); | |
let channel = root.getChild('channel'); | |
let items = channel.getChildren('item'); | |
for(i =0; i< items.length; i++){ | |
let item = items[i]; | |
let pubDateStr = item.getChild('pubDate').getText(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$client_id ='1000.GUPPSEH1013UZQA5SN8OAJV1DQU5FM';//Enter your Client ID here | |
$client_secret = '4932018fd429a4246e96d9186e77704d88d05b052a';//Enter your Client Secret here | |
$code = '1000.bf0e3723d718ac74660843a2128946b8.c6a7d9ce01ea879a22803f5f88bb0a6c';//Enter your Code here | |
$base_acc_url = 'https://accounts.zoho.com'; | |
$service_url = 'https://creator.zoho.com'; | |
$refresh_token = '1000.4f4b206a80c5e3e48c1cf3a55994a19c.c7c25dc7144da53c497b2d2ca834d1d0'; //Replce this with your Refresh token | |
$token_url = $base_acc_url . '/oauth/v2/token?grant_type=authorization_code&client_id='. $client_id . '&client_secret='. $client_secret . '&redirect_uri=http://localhost&code=' . $code; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('MAILGUN_URL', 'https://api.mailgun.net/v3/DOMAIN_NAME'); | |
define('MAILGUN_KEY', 'KEY'); | |
function sendmailbymailgun($to,$toname,$mailfromnane,$mailfrom,$subject,$html,$text,$tag,$replyto){ | |
$array_data = array( | |
'from'=> $mailfromname .'<'.$mailfrom.'>', | |
'to'=>$toname.'<'.$to.'>', | |
'subject'=>$subject, | |
'html'=>$html, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
n = int(raw_input("Enter the Counter number : ")) | |
for i in range(1,n): | |
if( i% 15 == 0): | |
print "fizzbuzz" | |
elif (i%3 == 0): | |
print "fizz" | |
elif (i%5 == 0): | |
print "buzz" | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# /etc/apache2/sites-available/openerp | |
# | |
# OpenERP Reverse Proxy Configuration for Apache 2. | |
# | |
# Authors: 2014 Mariano Ruiz <[email protected]> | |
# | |
# After copy this file execute: | |
# | |
# sudo a2ensite openerp |
NewerOlder