Author: danydb Date: 2014-02-01 16:15:16 +0100 (Sat, 01 Feb 2014) New Revision: 678
Modified: trunk/transform/include/class_transform_declarant.php trunk/transform/include/class_transform_representative.php Log: add procedure insert + periode Modified: trunk/transform/include/class_transform_declarant.php =================================================================== --- trunk/transform/include/class_transform_declarant.php 2014-02-01 15:14:44 UTC (rev 677) +++ trunk/transform/include/class_transform_declarant.php 2014-02-01 15:15:16 UTC (rev 678) @@ -16,79 +16,106 @@ * You should have received a copy of the GNU General Public License * along with NOALYSS; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ + */ + /** * @brief contains declarant -@code -$vat_number = "0000000097"; -$name = "Nom Declarant"; -$street = "Rue du declarant"; -$postcode = "9999"; -$city = "TESTCITY"; -$countrycode = "BE"; -$email = "[email protected]"; -$phone = "000000000"; -@endcode + @code + $vat_number = "0000000097"; + $name = "Nom Declarant"; + $street = "Rue du declarant"; + $postcode = "9999"; + $city = "TESTCITY"; + $countrycode = "BE"; + $email = "[email protected]"; + $phone = "000000000"; + @endcode */ // Copyright Author Dany De Bontridder [email protected] class Transform_Declarant { - - /** - * name - */ - var $name; - /** - * street - */ - var $street; - /** - * Postcode - */ - var $postcode; - /** - * city - */ - var $city; - /** - * country code (BE) - */ - var $countrycode; - /** - * email - */ - var $email; - /** - * phone - */ - var $phone; - /** - * vatnumber - */ - var $vatnumber; - function fromPost() - { - $this->name=HtmlInput::default_value_post("p_dec_name",null); - $this->street=HtmlInput::default_value_post("p_dec_street",null); - $this->postcode=HtmlInput::default_value_post("p_dec_postcode",null); - $this->city=HtmlInput::default_value_post("p_dec_city",null); - $this->countrycode=HtmlInput::default_value_post("p_dec_countrycode",null); - $this->email=HtmlInput::default_value_post("p_dec_email",null); - $this->phone=HtmlInput::default_value_post("p_dec_phone",null); - $this->vatnumber=HtmlInput::default_value_post("p_dec_vatnumber",null); - } - function input() - { - $h_name=new IText('p_dec_name',$this->name); - $h_vatnumber=new IText('p_dec_vatnumber',$this->vatnumber); - $h_street=new IText('p_dec_street',$this->street); - $h_postcode=new IText('p_dec_postcode',$this->postcode); - $h_city=new IText('p_dec_city',$this->city); - $h_countrycode=new IText('p_dec_countrycode',$this->countrycode); - $h_email=new IText('p_dec_email',$this->email); - $h_phone=new IText('p_dec_phone',$this->phone); - require_once 'template/listing_assujetti_declarant.php'; - } + /** + * name + */ + var $name; + + /** + * street + */ + var $street; + + /** + * Postcode + */ + var $postcode; + + /** + * city + */ + var $city; + + /** + * country code (BE) + */ + var $countrycode; + + /** + * email + */ + var $email; + + /** + * phone + */ + var $phone; + + /** + * vatnumber + */ + var $vatnumber; + + function fromPost() + { + $this->name = HtmlInput::default_value_post("p_dec_name", null); + $this->street = HtmlInput::default_value_post("p_dec_street", null); + $this->postcode = HtmlInput::default_value_post("p_dec_postcode", null); + $this->city = HtmlInput::default_value_post("p_dec_city", null); + $this->countrycode = HtmlInput::default_value_post("p_dec_countrycode", null); + $this->email = HtmlInput::default_value_post("p_dec_email", null); + $this->phone = HtmlInput::default_value_post("p_dec_phone", null); + $this->vatnumber = HtmlInput::default_value_post("p_dec_vatnumber", null); + $this->year=HtmlInput::default_value_post('p_year',null); + } + + function input() + { + $h_name = new IText('p_dec_name', $this->name); + $h_vatnumber = new IText('p_dec_vatnumber', $this->vatnumber); + $h_street = new IText('p_dec_street', $this->street); + $h_postcode = new IText('p_dec_postcode', $this->postcode); + $h_city = new IText('p_dec_city', $this->city); + $h_countrycode = new IText('p_dec_countrycode', $this->countrycode); + $h_email = new IText('p_dec_email', $this->email); + $h_phone = new IText('p_dec_phone', $this->phone); + require_once 'template/listing_assujetti_declarant.php'; + } + + function insert() + { + $this->data->d_name=$this->name; + $this->data->d_street=$this->street; + $this->data->d_postcode=$this->postcode; + $this->data->d_city=$this->city; + $this->data->d_countrycode=$this->countrycode; + $this->data->d_email=$this->email; + $this->data->d_phone=$this->phone; + $this->data->d_vatnumber=$this->vatnumber; + $this->data->d_countrycode=$this->countrycode; + + $this->data->insert(); + } + } + ?> Modified: trunk/transform/include/class_transform_representative.php =================================================================== --- trunk/transform/include/class_transform_representative.php 2014-02-01 15:14:44 UTC (rev 677) +++ trunk/transform/include/class_transform_representative.php 2014-02-01 15:15:16 UTC (rev 678) @@ -77,9 +77,13 @@ * phone */ var $phone; + /** + * Transform_Representative_SQL + */ + var $data; function fromPost() { - $this->id=HtmlInput::default_value_post("p_id",null); + $this->id=HtmlInput::default_value_post("p_id",1); $this->type=HtmlInput::default_value_post("p_type",null); $this->name=HtmlInput::default_value_post("p_name",null); $this->street=HtmlInput::default_value_post("p_street",null); @@ -111,5 +115,20 @@ require_once 'template/listing_assujetti_representative.php'; } + function insert() + { + var_dump($this->id); + $this->data->rp_listing_id=$this->id; + $this->data->rp_issued=$this->issued; + $this->data->rp_type=$this->type; + $this->data->rp_name=$this->name; + $this->data->rp_street=$this->street; + $this->data->rp_postcode=$this->postcode; + $this->data->rp_countrycode=$this->countrycode; + $this->data->rp_email=$this->email; + $this->data->rp_phone=$this->phone; + + $this->data->insert(); + } } --- PhpCompta est un logiciel de comptabilité libre en ligne (full web) Projet opensource http://www.phpcompta.eu _______________________________________________ Phpcompta est un logiciel libre de comptabilité en ligne (http://www.phpcompta.eu) Phpcompta-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/phpcompta-dev
