Friday, 23 March 2018

API for Item Adjustments in Zoho Inventory


API for Item Adjustments in Zoho Inventory :

1. Inventory Adjustment Creation
	Method: POST
	Link : https://inventory.zoho.com/api/v1/inventoryadjustments
	Parameters required: authtoken, organization_id
	JSONString:
		{
			"line_items": [
				{
					"item_id": "{item_id}",
					"name": "Black",
					"description": "",
					"quantity_adjusted": "6",
					"unit": "pcs",
					"adjustment_account_id": "{adjustment_account_id}",
					"warehouse_id": "{warehouse_id}"
				}
			],
			"date": "2017-01-09",
			"reason": "Inventory    Revaluation",
			"reference_number": "",
			"adjustment_type": "quantity"
		}
	{adjustment_account_id} is taken from the purchase_account_id node of item details.
	item_id is the unique identifier of the item to be adjusted.

2. Fetching list of Inventory Adjustments
	Method: GET
	Link : https://inventory.zoho.com/api/v1/inventoryadjustments
	Parameters required: authtoken, organization_id
3. Fetching details of an Inventory Adjustment 
	Method: GET
	Link : https://inventory.zoho.com/api/v1/inventoryadjustments/{inventory_adjustment_id}
	Parameters required: authtoken, organization_id
4. Inventory Adjustment Deletion
	Method: DELETE
	Link : https://inventory.zoho.com/api/v1/inventoryadjustments/{inventory_adjustment_id}
	Parameters required: authtoken, organization_id
	Replace {inventory_adjustment_id} with the ID created for inventory adjustment

Masters API GET method :

https://inventory.zoho.com/api/v1/inventoryadjustments/editpage?organization_id={organization_id}&authtoken={authtoken}


 

Friday, 29 December 2017

Js fullscreen browser




<a class="drop icon-circle" href="#!" onclick="javascript:toggleFullScreen()">
<i class="icon-size-fullscreen"></i>
</a>

Saturday, 16 December 2017

Jquery get element each method


$( "li" ).each(function( index ) { console.log( index + ": " + $( this ).text() ); });

Jquery allow decimal & integer script


$(document).ready(function(){
  $(".notallowdec").keypress(function (e){
      if (e.which != 8 && e.which != 0 && (e.which < 48 || e.which > 57) ) {
            return false;
        }else{
    
    }
    });
  $('.allowdec').keypress(function(event){
    if ((event.which != 46 || $(this).val().indexOf('.') != -1)&&
(event.which < 48 || event.which > 57))
    {
    if((event.which != 46 || $(this).val().indexOf('.') != -1))
    {
      //alert('Multiple Decimals are not allowed');
    }
    event.preventDefault();
    }
    if(this.value.indexOf(".")>-1 && (this.value.split('.')[1].length > 1))
    {
    //alert('Two numbers only allowed after decimal point');
    //event.preventDefault();
    }
  });
  
});

Thursday, 27 November 2014

To find url given string and replace with anchor tag in php

<?php
$str = "Hi I am using google.com going http://google.com and 
where in https://google.com ahcinkg http://google.co.in else http://google.co";
$ss = "";
$sd = explode(" ",$str);
//print_r($sd);
$c=count($sd)."
"; $i=0; while($c>$i){ $regex = "((https?|ftp)\:\/\/)?"; // SCHEME $regex .= "([a-z0-9+!*(),;?&=\$_.-]+(\:[a-z0-9+!*(),;?&=\$_.-]+)?@)?"; // User and Pass $regex .= "([a-z0-9-.]*)\.([a-z]{2,4})"; // Host or IP $regex .= "(\:[0-9]{2,5})?"; // Port $regex .= "(\/([a-z0-9+\$_-]\.?)+)*\/?"; // Path $regex .= "(\?[a-z+&\$_.-][a-z0-9;:@&%=+\/\$_.-]*)?"; // GET Query $regex .= "(#[a-z_.-][a-z0-9+\$_.-]*)?"; // Anchor // $regexp = '/^[a-zA-Z0-9][a-zA-Z0-9\-\_]+[a-zA-Z0-9]$/'; if (true == preg_match("/^$regex$/", $sd[$i])) { if(!in_array("http", parse_url($sd[$i])) && !in_array("https", parse_url($sd[$i]))) { $s1 ="http://".$sd[$i]; echo $ss ="$sd[$i]  "; }elseif(in_array("http", parse_url($sd[$i])) || in_array("https", parse_url($sd[$i]))) { echo $ss ="$sd[$i]  "; } }else{ echo $sd[$i]."  "; } $i++; } ?>

Feet/Inches to Meters Converter & Lbs to Kgs Converter

 <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8" />   <title>Feet/Inches ⇄...