Set Data All functions of set data

Complete example of various set data functions. Please note that if you haven't turn off data file in settings page then it will override the data with same key. You can use this functionality to override specific data key.

  
                            //create object of xinvoice class, you can pass setting array to set config data here.
                    $xinvoice = new Xinvoice();
                    // You can set invoice logo using this function or can change directly in config file.
                    $xinvoice->setInvoiceLogo("http://pdocrud.com/assets/img/PDOCrud-logo.png");
                    
                     //set company array - like company name, logo etc
                    $company = array("logo" => "http://pdocrud.com/assets/img/PDOCrud-logo.png");
                    //set company data       
                    $xinvoice->setInvoiceCompanyData($company);   
                    
                     // You can set invoice date using this function or can change directly in config file.
                    $xinvoice->setInvoiceDate("01/04/2018");
                    
                    // You can set invoice due date using this function or can change directly in config file.
                    $xinvoice->setInvoiceDuedate("01/05/2018");
                    
                    //set header array
                    $header = array("no" => "Nx-1001");
                    //set header data 
                    $xinvoice->setInvoiceHeaderData($header);  
                    
                    //set from array
                    $from = array("name" => "Test Company", "address1"=>" Dummy address");
                    //set from data 
                    $xinvoice->setInvoiceFromData($from); 
                    
                    //set to array
                    $to = array("name" => "Test Company", "address1"=>" Dummy address");
                    //set to data 
                    $xinvoice->setInvoiceToData($to);   
                    
                    //Create item with key and value to be used for item information section
                    $item = array("name" => "Graphic Card", "desc" => "Graphic Card of computer", "qty" => 2, "rate" => 100, "total" => 200);
                    // You can set invoice item using this function or can change directly in config file.
                    $xinvoice->setInvoiceitem($item);
                    
                    //Create items array with key and value to be used for item information section
                    $items[] = array("name" => "Motherboard", "desc" => "motherboard of computer", "qty" => 1, "rate" => 100, "total" => 100);
                    $items[] = array("name" => "Ram", "desc" => "ram of computer", "qty" => 2, "rate" => 100, "total" => 200);
                    // You can set invoice items using this function or can change directly in config file.
                    $xinvoice->setInvoiceItems($items);
                    
                    //set payment array
                    $payment = array("method" => "Cash on delivery", "note"=>"Please make sure to have req. cash on delivery day");
                    //set payment data 
                    $xinvoice->setInvoicePaymentData($payment); 
                    
                     //set message array
                    $message = array("thankyou" => "Thank you for your business", "note"=>"Lorem Ipsum is simply dummy text of the printing and typesetting industry");
                    //set message data 
                    $xinvoice->setInvoiceMessageData($message);    
    
                    //set footer array
                    $footer = array("note" => "Lorem Ipsum is simply dummy text of the printing and typesetting industry.");
                    //set footer data 
                    $xinvoice->setInvoiceFooterData($footer);   
                    echo $xinvoice->render();