Callback Add callback function to xinvoice

xInvoice supports various callback functions at various events that can be used to perform specific operations as required. Callback functions are very useful to perform special operation as per requirement. For example, if you want to change the change the data before html formatting, you can use callback functions. You need to add call back function and needs to include function definition in the script/xinvoice.php file..

  
                            $xinvoice = new Xinvoice();
                            $xinvoice->addCallback("before_html_formatting", "beforeHTMLFormatting");
                            $xinvoice->render();
                            // You need to add these function in the script/xinvoice.php
                            //example callback function
                            //function beforeHTMLFormatting( $data, $obj){
                            //    modify the data as per requirement
                            //    return $data;
                            //}