Merged revisions 4162-4170 via svnmerge from
svn+ssh://danydb@svn/svn/phpcompta/branches/rel560 ........ r4162 | danydb | 2011-06-11 02:14:22 +0200 (Sat, 11 Jun 2011) | 1 line Fix bug ........ r4163 | danydb | 2011-06-11 02:15:52 +0200 (Sat, 11 Jun 2011) | 1 line Improve creation of php script ........ r4164 | danydb | 2011-06-14 18:36:48 +0200 (Tue, 14 Jun 2011) | 1 line Align numeric to right ........ r4165 | danydb | 2011-06-17 21:55:06 +0200 (Fri, 17 Jun 2011) | 1 line 0000297: Bug dans contact ........ r4166 | danydb | 2011-06-17 22:26:23 +0200 (Fri, 17 Jun 2011) | 1 line 0000296: Calcul automatique fiche ........ r4167 | danydb | 2011-06-17 22:49:53 +0200 (Fri, 17 Jun 2011) | 2 lines fix bug if not plan proposed ........ r4168 | danydb | 2011-06-17 22:57:29 +0200 (Fri, 17 Jun 2011) | 3 lines 0000305: Charge au crédit new sql script ........ r4169 | danydb | 2011-06-17 23:27:27 +0200 (Fri, 17 Jun 2011) | 1 line remove useless psql function public.account_insert ........ r4170 | danydb | 2011-06-18 03:04:28 +0200 (Sat, 18 Jun 2011) | 1 line Update style ........
This commit is contained in:
parent
2372709c7b
commit
6da972d46a
12 changed files with 213 additions and 27 deletions
|
|
@ -14,6 +14,8 @@
|
|||
# second line = pk
|
||||
|
||||
import sys, getopt
|
||||
import pdb
|
||||
|
||||
def help():
|
||||
print """
|
||||
option are -h for help
|
||||
|
|
@ -77,7 +79,7 @@ class @class_name@ @mother_class@
|
|||
|
||||
if ( $p_id == -1 ) {
|
||||
/* Initialize an empty object */
|
||||
foreach ($this->variable as $key=>$value) $this->$value='DEFAULT';
|
||||
foreach ($this->variable as $key=>$value) $this->$value=null;
|
||||
$this->@id@=$p_id;
|
||||
} else {
|
||||
/* load it */
|
||||
|
|
@ -543,6 +545,7 @@ class @class_name@
|
|||
(col_id,col_type,default)=e.split('|')
|
||||
col_id=col_id.strip()
|
||||
col_type=col_type.strip()
|
||||
verify_data_type+=" if ( trim($this->"+col_id+") == '') $this->"+col_id+"=null;\n"
|
||||
if col_type in ('float','integer','numeric','bigint') :
|
||||
verify_data_type+="if ( $this->"+col_id+"!== null && settype($this->"+col_id+",'float') == false )\n \
|
||||
throw new Exception('DATATYPE "+col_id+" $this->"+col_id+" non numerique');\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue