Created
August 23, 2020 05:12
-
-
Save tejavarma-aln/7fc52dd13d6d5959969edd1fa3033a1b to your computer and use it in GitHub Desktop.
Part-1 of Web Service from TDL
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 | |
class LedgerModel{ | |
public $ledName; | |
public $ledGroup; | |
public $ledState; | |
public $ledAddress; | |
public $ledGstin; | |
public $ledCountry; | |
function __construct($name,$grp,$country,$state,$addr,$gstin){ | |
$this->ledName = $name; | |
$this->ledGroup = $grp; | |
$this->ledState = $state; | |
$this->ledAddress = $addr; | |
$this->ledGstin = $gstin; | |
$this->ledCountry = $country; | |
} | |
} | |
$led_list = array(); | |
array_push($led_list,new LedgerModel("Star Agencies","SundryDebtors","India","Andhrapradesh","Visakhapatnam","37ASD123GHJ789Z")); | |
array_push($led_list,new LedgerModel("Alliance Corporation","SundryCreditors","India","AndhraPradesh","Vijayawada","37ASD123GHJ789Z")); | |
array_push($led_list,new LedgerModel("Khan Enterprises","SundryDebtors","India","Andhrapradesh","Visakhapatnam","37ASD123GHJ789Z")); | |
array_push($led_list,new LedgerModel("Bharath gas limited","SundryCreditors","India","AndhraPradesh","Vijayawada","37ASD123GHJ789Z")); | |
$led_response = array(); | |
$led_response['Ledgers'] = $led_list; | |
print_r(json_encode($led_response)); | |
?> |
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
[Collection:RemoteLedgerColl] | |
Data Source:HTTP JSON:"http://localhost/Ledgers.php":UTF8 | |
[Collection:RemoteLedExtract] | |
Source Collection:RemoteLedgerColl | |
Walk:Ledgers | |
Compute:Name:$ledName | |
Compute:Group:$ledGroup | |
Compute:Country:$ledCountry | |
Compute:State:$ledState | |
Compute:Address:$ledAddress | |
Compute:Gstin:$ledGstin | |
[#Menu:GateWayOfTally] | |
Add:Item:Post Ledgers:Call:CreateLedgers | |
[Function:CreateLedgers] | |
00:Walk Collection:RemoteLedExtract | |
01:New Object:Ledger | |
02:Set Value:Name:$Name | |
03:Set Value:Parent:$Group | |
04:Set Value:Address:$Address | |
05:Set Value:CountryofResidence:$Country | |
06:Set Value:LedStateName:$State | |
07:Set Value:PartyGSTIN:$Gstin | |
08:Save Target | |
09:End Walk | |
10:Msg Box:"Success":"Ledgers Created Successfully" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment