Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 12 commits
  • 27 files changed
  • 0 commit comments
  • 2 contributors
Showing with 898 additions and 587 deletions.
  1. +3 −3 Makefile
  2. +19 −19 canned_responses_en.php
  3. +4 −1 css/aixada_main.css
  4. +177 −81 install.php
  5. +15 −12 js/aixadautilities/jquery.aixadaMenu.js
  6. +1 −1  local_config/config.php
  7. +1 −1  local_config/lang/en.php
  8. +258 −24 local_config/lang/es.php
  9. +5 −2 manage_money.php
  10. +49 −27 manage_mysettings.php
  11. +27 −22 manage_ufmember.php
  12. +62 −56 php/ctrl/Install.php
  13. +1 −1  php/ctrl/UserAndUf.php
  14. +2 −2 php/inc/authentication.inc.php
  15. +2 −2 php/inc/menu2.inc.php
  16. +4 −7 php/utilities/general.php
  17. +2 −2 php/utilities/useruf.php
  18. +10 −7 sql/Makefile
  19. +20 −0 sql/aixada_manual_install.sql
  20. 0  sql/{aixada_migrate.sql → dbUpgradeAixada1ToAixada2.1.sql}
  21. +2 −1  sql/{dbUpgradeToAixada2.5.sql → dbUpgradeAixada2.1ToAixada2.5.sql}
  22. +11 −64 sql/queries/aixada_queries_useruf.sql
  23. +48 −0 sql/setup/aixada_insert_default_user.sql
  24. +30 −18 sql/setup/{aixada_setup_details.sql → aixada_insert_defaults.sql}
  25. 0  sql/{ → setup}/aixada_setup_queries.sql
  26. +122 −149 sql/setup/queries_reading.php
  27. +23 −85 sql/setup/tables_modified_by.php
View
6 Makefile
@@ -14,12 +14,12 @@ export FINAL = true
config_dir:=local_config
-all: canned_responses.php $(config_dir)/config.php
+all: sql/all canned_responses.php $(config_dir)/config.php
#sql/all js/all css/all
-# sql/all:
-# $(MAKE) -C sql
+sql/all:
+ $(MAKE) -C sql
# css/all:
# $(MAKE) -C css
View
38 canned_responses_en.php
@@ -8,7 +8,7 @@ public function get_col_names_as_JSON($table)
return "['id','TRANSLATION(account_id)','Quantity','TRANSLATION(payment_method_id)','TRANSLATION(currency_id)','Description','TRANSLATION(operator_id)','TRANSLATION(ts)','Balance']";
case 'aixada_cart':
- return "['id','Name','TRANSLATION(uf)','Date shopped','TRANSLATION(operator_id)','Validated']";
+ return "['id','Name','TRANSLATION(uf)','Shop date','TRANSLATION(operator_id)','Validated']";
case 'aixada_currency':
return "['id','Name','TRANSLATION(one_euro)']";
@@ -23,16 +23,16 @@ public function get_col_names_as_JSON($table)
return "['id','Percent','Description']";
case 'aixada_member':
- return "['id','TRANSLATION(custom_member_ref)','TRANSLATION(uf)','Name','Address','NIF','Zip','City','Phone1','Phone2','URLs','Picture','Notes','Active','Participant','Adult','TRANSLATION(ts)']";
+ return "['id','Custom ref.','TRANSLATION(uf)','Name','Address','VAT Reg No','Zip','City','Phone1','Phone2','URLs','Picture','Notes','Active','Participant','Adult','TRANSLATION(ts)']";
case 'aixada_order':
- return "['id','Provider','TRANSLATION(date_for_order)','TRANSLATION(ts_sent_off)','TRANSLATION(date_received)','Date shopped','Total','Notes','TRANSLATION(revision_status)','TRANSLATION(delivery_ref)','TRANSLATION(payment_ref)']";
+ return "['id','Provider','Delivery date','TRANSLATION(ts_sent_off)','TRANSLATION(date_received)','Shop date','Total','Notes','TRANSLATION(revision_status)','Delivery ref.','Payment ref.']";
case 'aixada_order_item':
- return "['id','TRANSLATION(order_id)','TRANSLATION(unit_price_stamp)','TRANSLATION(date_for_order)','TRANSLATION(uf)','TRANSLATION(favorite_cart)','TRANSLATION(product)','Quantity','TRANSLATION(ts_ordered)']";
+ return "['id','TRANSLATION(order_id)','TRANSLATION(unit_price_stamp)','Delivery date','TRANSLATION(uf)','TRANSLATION(favorite_cart)','TRANSLATION(product)','Quantity','TRANSLATION(ts_ordered)']";
case 'aixada_order_to_shop':
- return "['TRANSLATION(order_item_id)','TRANSLATION(uf)','TRANSLATION(order_id)','TRANSLATION(unit_price_stamp)','TRANSLATION(product)','Quantity','TRANSLATION(arrived)','TRANSLATION(revised)','TRANSLATION(aixada_order_to_shop_ibfk_1)','TRANSLATION(aixada_order_to_shop_ibfk_2)','TRANSLATION(aixada_order_to_shop_ibfk_3)']";
+ return "['TRANSLATION(order_item_id)','TRANSLATION(uf)','TRANSLATION(order_id)','TRANSLATION(unit_price_stamp)','TRANSLATION(product)','Quantity','Arrived','TRANSLATION(revised)','TRANSLATION(aixada_order_to_shop_ibfk_1)','TRANSLATION(aixada_order_to_shop_ibfk_2)','TRANSLATION(aixada_order_to_shop_ibfk_3)']";
case 'aixada_orderable_type':
return "['id','Description']";
@@ -47,10 +47,10 @@ public function get_col_names_as_JSON($table)
return "['id','Description']";
case 'aixada_product_orderable_for_date':
- return "['id','TRANSLATION(product_id)','TRANSLATION(date_for_order)','TRANSLATION(closing_date)']";
+ return "['id','TRANSLATION(product_id)','Delivery date','TRANSLATION(closing_date)']";
case 'aixada_provider':
- return "['id','Name','Contact','Address','NIF','Zip','City','Phone1','Phone2','Fax','Email','URLs','Bank','Bank Account','Picture','Notes','Active','Responsible household','Processing time','TRANSLATION(ts)']";
+ return "['id','Name','Contact','Address','VAT Reg No','Zip','City','Phone1','Phone2','Fax','Email','URLs','Bank','Bank account','Picture','Notes','Active','Responsible household','Processing time','TRANSLATION(ts)']";
case 'aixada_rev_tax_type':
return "['id','Description','TRANSLATION(rev_tax_percent)']";
@@ -65,13 +65,13 @@ public function get_col_names_as_JSON($table)
return "['id','TRANSLATION(product)','TRANSLATION(operator_id)','TRANSLATION(amount_difference)','Description','TRANSLATION(resulting_amount)','TRANSLATION(ts)']";
case 'aixada_uf':
- return "['id','Name','Active','Created on','Mentor household']";
+ return "['id','Name','Active','Created on','Mentor HU']";
case 'aixada_unit_measure':
return "['id','Unit']";
case 'aixada_user':
- return "['id','Login','TRANSLATION(password)','Email','TRANSLATION(uf)','TRANSLATION(member)','Provider','TRANSLATION(language)','TRANSLATION(gui_theme)','TRANSLATION(last_login_attempt)','TRANSLATION(last_successful_login)','TRANSLATION(created_on)']";
+ return "['id','Login','TRANSLATION(password)','Email','TRANSLATION(uf)','Member','Provider','TRANSLATION(language)','TRANSLATION(gui_theme)','TRANSLATION(last_login_attempt)','TRANSLATION(last_successful_login)','TRANSLATION(created_on)']";
case 'aixada_user_role':
return "['TRANSLATION(user_id)','TRANSLATION(role)']";
@@ -85,7 +85,7 @@ public function get_col_model_as_JSON($table)
return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'account_id',index:'account_id',label:'TRANSLATION(account_id)',width:'150',xmlmap:'account_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'quantity',index:'quantity',label:'Quantity',width:'150',xmlmap:'quantity',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'payment_method_id',index:'payment_method_id',label:'TRANSLATION(payment_method_id)',width:'150',xmlmap:'payment_method_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'currency_id',index:'currency_id',label:'TRANSLATION(currency_id)',width:'150',xmlmap:'currency_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'description',index:'description',label:'Description',width:'255',xmlmap:'description',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'operator_id',index:'operator_id',label:'TRANSLATION(operator_id)',width:'150',xmlmap:'operator_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'ts',index:'ts',label:'TRANSLATION(ts)',width:'300',xmlmap:'ts',editable:false,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'balance',index:'balance',label:'Balance',width:'150',xmlmap:'balance',editable:false,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_cart':
- return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'name',index:'name',label:'Name',width:'255',xmlmap:'name',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'uf_id',index:'uf',label:'TRANSLATION(uf_id)',width:'300',xmlmap:'uf',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_uf&field1=id&field2=name'}},{name:'date_for_shop',index:'date_for_shop',label:'Date shopped',width:'300',xmlmap:'date_for_shop',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'operator_id',index:'operator_id',label:'TRANSLATION(operator_id)',width:'150',xmlmap:'operator_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'ts_validated',index:'ts_validated',label:'Validated',width:'300',xmlmap:'ts_validated',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
+ return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'name',index:'name',label:'Name',width:'255',xmlmap:'name',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'uf_id',index:'uf',label:'TRANSLATION(uf_id)',width:'300',xmlmap:'uf',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_uf&field1=id&field2=name'}},{name:'date_for_shop',index:'date_for_shop',label:'Shop date',width:'300',xmlmap:'date_for_shop',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'operator_id',index:'operator_id',label:'TRANSLATION(operator_id)',width:'150',xmlmap:'operator_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'ts_validated',index:'ts_validated',label:'Validated',width:'300',xmlmap:'ts_validated',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_currency':
return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'name',index:'name',label:'Name',width:'50',xmlmap:'name',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'one_euro',index:'one_euro',label:'TRANSLATION(one_euro)',width:'150',xmlmap:'one_euro',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
@@ -100,16 +100,16 @@ public function get_col_model_as_JSON($table)
return "[{name:'id',index:'id',label:'id',width:'6',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'percent',index:'percent',label:'Percent',width:'150',xmlmap:'percent',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'description',index:'description',label:'Description',width:'100',xmlmap:'description',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_member':
- return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'custom_member_ref',index:'custom_member_ref',label:'TRANSLATION(custom_member_ref)',width:'100',xmlmap:'custom_member_ref',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'uf_id',index:'uf',label:'TRANSLATION(uf_id)',width:'300',xmlmap:'uf',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_uf&field1=id&field2=name'}},{name:'name',index:'name',label:'Name',width:'255',xmlmap:'name',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'address',index:'address',label:'Address',width:'255',xmlmap:'address',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'nif',index:'nif',label:'NIF',width:'15',xmlmap:'nif',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'zip',index:'zip',label:'Zip',width:'150',xmlmap:'zip',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'city',index:'city',label:'City',width:'255',xmlmap:'city',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'phone1',index:'phone1',label:'Phone1',width:'50',xmlmap:'phone1',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'phone2',index:'phone2',label:'Phone2',width:'50',xmlmap:'phone2',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'web',index:'web',label:'URLs',width:'255',xmlmap:'web',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'picture',index:'picture',label:'Picture',width:'255',xmlmap:'picture',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'notes',index:'notes',label:'Notes',width:'300',xmlmap:'notes',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'active',index:'active',label:'Active',width:'150',xmlmap:'active',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true},edittype:'checkbox',editoptions:{value:'1:0'}},{name:'participant',index:'participant',label:'Participant',width:'1',xmlmap:'participant',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'checkbox',editoptions:{value:'1:0'}},{name:'adult',index:'adult',label:'Adult',width:'1',xmlmap:'adult',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'ts',index:'ts',label:'TRANSLATION(ts)',width:'300',xmlmap:'ts',editable:false,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
+ return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'custom_member_ref',index:'custom_member_ref',label:'Custom ref.',width:'100',xmlmap:'custom_member_ref',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'uf_id',index:'uf',label:'TRANSLATION(uf_id)',width:'300',xmlmap:'uf',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_uf&field1=id&field2=name'}},{name:'name',index:'name',label:'Name',width:'255',xmlmap:'name',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'address',index:'address',label:'Address',width:'255',xmlmap:'address',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'nif',index:'nif',label:'VAT Reg No',width:'15',xmlmap:'nif',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'zip',index:'zip',label:'Zip',width:'150',xmlmap:'zip',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'city',index:'city',label:'City',width:'255',xmlmap:'city',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'phone1',index:'phone1',label:'Phone1',width:'50',xmlmap:'phone1',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'phone2',index:'phone2',label:'Phone2',width:'50',xmlmap:'phone2',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'web',index:'web',label:'URLs',width:'255',xmlmap:'web',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'picture',index:'picture',label:'Picture',width:'255',xmlmap:'picture',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'notes',index:'notes',label:'Notes',width:'300',xmlmap:'notes',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'active',index:'active',label:'Active',width:'150',xmlmap:'active',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true},edittype:'checkbox',editoptions:{value:'1:0'}},{name:'participant',index:'participant',label:'Participant',width:'1',xmlmap:'participant',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'checkbox',editoptions:{value:'1:0'}},{name:'adult',index:'adult',label:'Adult',width:'1',xmlmap:'adult',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'ts',index:'ts',label:'TRANSLATION(ts)',width:'300',xmlmap:'ts',editable:false,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_order':
- return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'provider_id',index:'provider',label:'TRANSLATION(provider_id)',width:'300',xmlmap:'provider',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_provider&field1=id&field2=name'}},{name:'date_for_order',index:'date_for_order',label:'TRANSLATION(date_for_order)',width:'300',xmlmap:'date_for_order',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'ts_sent_off',index:'ts_sent_off',label:'TRANSLATION(ts_sent_off)',width:'300',xmlmap:'ts_sent_off',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'date_received',index:'date_received',label:'TRANSLATION(date_received)',width:'300',xmlmap:'date_received',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'date_for_shop',index:'date_for_shop',label:'Date shopped',width:'300',xmlmap:'date_for_shop',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'total',index:'total',label:'Total',width:'150',xmlmap:'total',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'notes',index:'notes',label:'Notes',width:'255',xmlmap:'notes',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'revision_status',index:'revision_status',label:'TRANSLATION(revision_status)',width:'150',xmlmap:'revision_status',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'delivery_ref',index:'delivery_ref',label:'TRANSLATION(delivery_ref)',width:'255',xmlmap:'delivery_ref',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'payment_ref',index:'payment_ref',label:'TRANSLATION(payment_ref)',width:'255',xmlmap:'payment_ref',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
+ return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'provider_id',index:'provider',label:'TRANSLATION(provider_id)',width:'300',xmlmap:'provider',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_provider&field1=id&field2=name'}},{name:'date_for_order',index:'date_for_order',label:'Delivery date',width:'300',xmlmap:'date_for_order',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'ts_sent_off',index:'ts_sent_off',label:'TRANSLATION(ts_sent_off)',width:'300',xmlmap:'ts_sent_off',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'date_received',index:'date_received',label:'TRANSLATION(date_received)',width:'300',xmlmap:'date_received',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'date_for_shop',index:'date_for_shop',label:'Shop date',width:'300',xmlmap:'date_for_shop',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'total',index:'total',label:'Total',width:'150',xmlmap:'total',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'notes',index:'notes',label:'Notes',width:'255',xmlmap:'notes',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'revision_status',index:'revision_status',label:'TRANSLATION(revision_status)',width:'150',xmlmap:'revision_status',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'delivery_ref',index:'delivery_ref',label:'Delivery ref.',width:'255',xmlmap:'delivery_ref',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'payment_ref',index:'payment_ref',label:'Payment ref.',width:'255',xmlmap:'payment_ref',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_order_item':
- return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'order_id',index:'order_id',label:'TRANSLATION(order_id)',width:'150',xmlmap:'order_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'unit_price_stamp',index:'unit_price_stamp',label:'TRANSLATION(unit_price_stamp)',width:'150',xmlmap:'unit_price_stamp',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'date_for_order',index:'date_for_order',label:'TRANSLATION(date_for_order)',width:'300',xmlmap:'date_for_order',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'uf_id',index:'uf',label:'TRANSLATION(uf_id)',width:'300',xmlmap:'uf',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_uf&field1=id&field2=name'}},{name:'favorite_cart_id',index:'favorite_cart',label:'TRANSLATION(favorite_cart_id)',width:'300',xmlmap:'favorite_cart',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_cart&field1=id&field2=name'}},{name:'product_id',index:'product',label:'TRANSLATION(product_id)',width:'300',xmlmap:'product',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_product&field1=id&field2=name'}},{name:'quantity',index:'quantity',label:'Quantity',width:'150',xmlmap:'quantity',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'ts_ordered',index:'ts_ordered',label:'TRANSLATION(ts_ordered)',width:'300',xmlmap:'ts_ordered',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
+ return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'order_id',index:'order_id',label:'TRANSLATION(order_id)',width:'150',xmlmap:'order_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'unit_price_stamp',index:'unit_price_stamp',label:'TRANSLATION(unit_price_stamp)',width:'150',xmlmap:'unit_price_stamp',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'date_for_order',index:'date_for_order',label:'Delivery date',width:'300',xmlmap:'date_for_order',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'uf_id',index:'uf',label:'TRANSLATION(uf_id)',width:'300',xmlmap:'uf',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_uf&field1=id&field2=name'}},{name:'favorite_cart_id',index:'favorite_cart',label:'TRANSLATION(favorite_cart_id)',width:'300',xmlmap:'favorite_cart',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_cart&field1=id&field2=name'}},{name:'product_id',index:'product',label:'TRANSLATION(product_id)',width:'300',xmlmap:'product',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_product&field1=id&field2=name'}},{name:'quantity',index:'quantity',label:'Quantity',width:'150',xmlmap:'quantity',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'ts_ordered',index:'ts_ordered',label:'TRANSLATION(ts_ordered)',width:'300',xmlmap:'ts_ordered',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_order_to_shop':
- return "[{name:'order_item_id',index:'order_item_id',label:'TRANSLATION(order_item_id)',width:'150',xmlmap:'order_item_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'uf_id',index:'uf',label:'TRANSLATION(uf_id)',width:'300',xmlmap:'uf',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_uf&field1=id&field2=name'}},{name:'order_id',index:'order_id',label:'TRANSLATION(order_id)',width:'300',xmlmap:'order_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'unit_price_stamp',index:'unit_price_stamp',label:'TRANSLATION(unit_price_stamp)',width:'150',xmlmap:'unit_price_stamp',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'product_id',index:'product',label:'TRANSLATION(product_id)',width:'300',xmlmap:'product',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_product&field1=id&field2=name'}},{name:'quantity',index:'quantity',label:'Quantity',width:'150',xmlmap:'quantity',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'arrived',index:'arrived',label:'TRANSLATION(arrived)',width:'1',xmlmap:'arrived',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'revised',index:'revised',label:'TRANSLATION(revised)',width:'1',xmlmap:'revised',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'aixada_order_to_shop_ibfk_1',index:'aixada_order_to_shop_ibfk_1',label:'TRANSLATION(aixada_order_to_shop_ibfk_1)',width:'300',xmlmap:'aixada_order_to_shop_ibfk_1',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'aixada_order_to_shop_ibfk_2',index:'aixada_order_to_shop_ibfk_2',label:'TRANSLATION(aixada_order_to_shop_ibfk_2)',width:'300',xmlmap:'aixada_order_to_shop_ibfk_2',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'aixada_order_to_shop_ibfk_3',index:'aixada_order_to_shop_ibfk_3',label:'TRANSLATION(aixada_order_to_shop_ibfk_3)',width:'300',xmlmap:'aixada_order_to_shop_ibfk_3',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
+ return "[{name:'order_item_id',index:'order_item_id',label:'TRANSLATION(order_item_id)',width:'150',xmlmap:'order_item_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'uf_id',index:'uf',label:'TRANSLATION(uf_id)',width:'300',xmlmap:'uf',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_uf&field1=id&field2=name'}},{name:'order_id',index:'order_id',label:'TRANSLATION(order_id)',width:'300',xmlmap:'order_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'unit_price_stamp',index:'unit_price_stamp',label:'TRANSLATION(unit_price_stamp)',width:'150',xmlmap:'unit_price_stamp',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'product_id',index:'product',label:'TRANSLATION(product_id)',width:'300',xmlmap:'product',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_product&field1=id&field2=name'}},{name:'quantity',index:'quantity',label:'Quantity',width:'150',xmlmap:'quantity',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'arrived',index:'arrived',label:'Arrived',width:'1',xmlmap:'arrived',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'revised',index:'revised',label:'TRANSLATION(revised)',width:'1',xmlmap:'revised',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'aixada_order_to_shop_ibfk_1',index:'aixada_order_to_shop_ibfk_1',label:'TRANSLATION(aixada_order_to_shop_ibfk_1)',width:'300',xmlmap:'aixada_order_to_shop_ibfk_1',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'aixada_order_to_shop_ibfk_2',index:'aixada_order_to_shop_ibfk_2',label:'TRANSLATION(aixada_order_to_shop_ibfk_2)',width:'300',xmlmap:'aixada_order_to_shop_ibfk_2',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'aixada_order_to_shop_ibfk_3',index:'aixada_order_to_shop_ibfk_3',label:'TRANSLATION(aixada_order_to_shop_ibfk_3)',width:'300',xmlmap:'aixada_order_to_shop_ibfk_3',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_orderable_type':
return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'description',index:'description',label:'Description',width:'255',xmlmap:'description',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}}]";
@@ -124,16 +124,16 @@ public function get_col_model_as_JSON($table)
return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'description',index:'description',label:'Description',width:'255',xmlmap:'description',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_product_orderable_for_date':
- return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'product_id',index:'product_id',label:'TRANSLATION(product_id)',width:'150',xmlmap:'product_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'date_for_order',index:'date_for_order',label:'TRANSLATION(date_for_order)',width:'300',xmlmap:'date_for_order',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'closing_date',index:'closing_date',label:'TRANSLATION(closing_date)',width:'300',xmlmap:'closing_date',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
+ return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'product_id',index:'product_id',label:'TRANSLATION(product_id)',width:'150',xmlmap:'product_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'date_for_order',index:'date_for_order',label:'Delivery date',width:'300',xmlmap:'date_for_order',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'closing_date',index:'closing_date',label:'TRANSLATION(closing_date)',width:'300',xmlmap:'closing_date',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_provider':
- return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'name',index:'name',label:'Name',width:'255',xmlmap:'name',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'contact',index:'contact',label:'Contact',width:'255',xmlmap:'contact',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'address',index:'address',label:'Address',width:'255',xmlmap:'address',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'nif',index:'nif',label:'NIF',width:'15',xmlmap:'nif',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'zip',index:'zip',label:'Zip',width:'150',xmlmap:'zip',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'city',index:'city',label:'City',width:'255',xmlmap:'city',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'phone1',index:'phone1',label:'Phone1',width:'50',xmlmap:'phone1',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'phone2',index:'phone2',label:'Phone2',width:'50',xmlmap:'phone2',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'fax',index:'fax',label:'Fax',width:'100',xmlmap:'fax',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'email',index:'email',label:'Email',width:'100',xmlmap:'email',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'web',index:'web',label:'URLs',width:'255',xmlmap:'web',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'bank_name',index:'bank_name',label:'Bank',width:'255',xmlmap:'bank_name',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'bank_account',index:'bank_account',label:'Bank Account',width:'40',xmlmap:'bank_account',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'picture',index:'picture',label:'Picture',width:'255',xmlmap:'picture',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'notes',index:'notes',label:'Notes',width:'300',xmlmap:'notes',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'active',index:'active',label:'Active',width:'150',xmlmap:'active',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true},edittype:'checkbox',editoptions:{value:'1:0'}},{name:'responsible_uf_id',index:'responsible_uf',label:'TRANSLATION(responsible_uf_id)',width:'300',xmlmap:'responsible_uf',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_uf&field1=id&field2=name'}},{name:'offset_order_close',index:'offset_order_close',label:'Processing time',width:'150',xmlmap:'offset_order_close',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'ts',index:'ts',label:'TRANSLATION(ts)',width:'300',xmlmap:'ts',editable:false,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
+ return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'name',index:'name',label:'Name',width:'255',xmlmap:'name',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'contact',index:'contact',label:'Contact',width:'255',xmlmap:'contact',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'address',index:'address',label:'Address',width:'255',xmlmap:'address',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'nif',index:'nif',label:'VAT Reg No',width:'15',xmlmap:'nif',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'zip',index:'zip',label:'Zip',width:'150',xmlmap:'zip',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'city',index:'city',label:'City',width:'255',xmlmap:'city',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'phone1',index:'phone1',label:'Phone1',width:'50',xmlmap:'phone1',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'phone2',index:'phone2',label:'Phone2',width:'50',xmlmap:'phone2',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'fax',index:'fax',label:'Fax',width:'100',xmlmap:'fax',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'email',index:'email',label:'Email',width:'100',xmlmap:'email',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'web',index:'web',label:'URLs',width:'255',xmlmap:'web',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'bank_name',index:'bank_name',label:'Bank',width:'255',xmlmap:'bank_name',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'bank_account',index:'bank_account',label:'Bank account',width:'40',xmlmap:'bank_account',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'picture',index:'picture',label:'Picture',width:'255',xmlmap:'picture',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'notes',index:'notes',label:'Notes',width:'300',xmlmap:'notes',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'active',index:'active',label:'Active',width:'150',xmlmap:'active',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true},edittype:'checkbox',editoptions:{value:'1:0'}},{name:'responsible_uf_id',index:'responsible_uf',label:'TRANSLATION(responsible_uf_id)',width:'300',xmlmap:'responsible_uf',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_uf&field1=id&field2=name'}},{name:'offset_order_close',index:'offset_order_close',label:'Processing time',width:'150',xmlmap:'offset_order_close',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'ts',index:'ts',label:'TRANSLATION(ts)',width:'300',xmlmap:'ts',editable:false,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_rev_tax_type':
return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'description',index:'description',label:'Description',width:'50',xmlmap:'description',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'rev_tax_percent',index:'rev_tax_percent',label:'TRANSLATION(rev_tax_percent)',width:'150',xmlmap:'rev_tax_percent',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_shop_item':
- return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'cart_id',index:'cart',label:'TRANSLATION(cart_id)',width:'300',xmlmap:'cart',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_cart&field1=id&field2=name'}},{name:'order_item_id',index:'order_item_id',label:'TRANSLATION(order_item_id)',width:'150',xmlmap:'order_item_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'unit_price_stamp',index:'unit_price_stamp',label:'TRANSLATION(unit_price_stamp)',width:'150',xmlmap:'unit_price_stamp',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'product_id',index:'product',label:'TRANSLATION(product_id)',width:'300',xmlmap:'product',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_product&field1=id&field2=name'}},{name:'quantity',index:'quantity',label:'Quantity',width:'150',xmlmap:'quantity',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'iva_percent',index:'iva_percent',label:'VAT in Percent',width:'150',xmlmap:'iva_percent',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'rev_tax_percent',index:'rev_tax_percent',label:'TRANSLATION(rev_tax_percent)',width:'150',xmlmap:'rev_tax_percent',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
+ return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'cart_id',index:'cart',label:'Cart id',width:'300',xmlmap:'cart',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_cart&field1=id&field2=name'}},{name:'order_item_id',index:'order_item_id',label:'TRANSLATION(order_item_id)',width:'150',xmlmap:'order_item_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'unit_price_stamp',index:'unit_price_stamp',label:'TRANSLATION(unit_price_stamp)',width:'150',xmlmap:'unit_price_stamp',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'product_id',index:'product',label:'TRANSLATION(product_id)',width:'300',xmlmap:'product',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_product&field1=id&field2=name'}},{name:'quantity',index:'quantity',label:'Quantity',width:'150',xmlmap:'quantity',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'iva_percent',index:'iva_percent',label:'VAT in Percent',width:'150',xmlmap:'iva_percent',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'rev_tax_percent',index:'rev_tax_percent',label:'TRANSLATION(rev_tax_percent)',width:'150',xmlmap:'rev_tax_percent',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_shopping_dates':
return "[{name:'shopping_date',index:'shopping_date',label:'TRANSLATION(shopping_date)',width:'300',xmlmap:'shopping_date',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'available',index:'available',label:'TRANSLATION(available)',width:'1',xmlmap:'available',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
@@ -142,13 +142,13 @@ public function get_col_model_as_JSON($table)
return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'product_id',index:'product',label:'TRANSLATION(product_id)',width:'300',xmlmap:'product',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_product&field1=id&field2=name'}},{name:'operator_id',index:'operator_id',label:'TRANSLATION(operator_id)',width:'150',xmlmap:'operator_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'amount_difference',index:'amount_difference',label:'TRANSLATION(amount_difference)',width:'150',xmlmap:'amount_difference',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'description',index:'description',label:'Description',width:'255',xmlmap:'description',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'resulting_amount',index:'resulting_amount',label:'TRANSLATION(resulting_amount)',width:'150',xmlmap:'resulting_amount',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'ts',index:'ts',label:'TRANSLATION(ts)',width:'300',xmlmap:'ts',editable:false,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_uf':
- return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'name',index:'name',label:'Name',width:'255',xmlmap:'name',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'active',index:'active',label:'Active',width:'150',xmlmap:'active',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true},edittype:'checkbox',editoptions:{value:'1:0'}},{name:'created',index:'created',label:'Created on',width:'300',xmlmap:'created',editable:false,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'mentor_uf',index:'mentor_uf',label:'Mentor household',width:'150',xmlmap:'mentor_uf',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}}]";
+ return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'name',index:'name',label:'Name',width:'255',xmlmap:'name',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'active',index:'active',label:'Active',width:'150',xmlmap:'active',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true},edittype:'checkbox',editoptions:{value:'1:0'}},{name:'created',index:'created',label:'Created on',width:'300',xmlmap:'created',editable:false,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'mentor_uf',index:'mentor_uf',label:'Mentor HU',width:'150',xmlmap:'mentor_uf',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_unit_measure':
return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'unit',index:'unit',label:'Unit',width:'50',xmlmap:'unit',editable:true,hidden:false,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_user':
- return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'login',index:'login',label:'Login',width:'50',xmlmap:'login',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'password',index:'password',label:'TRANSLATION(password)',width:'255',xmlmap:'password',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'password'},{name:'email',index:'email',label:'Email',width:'100',xmlmap:'email',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'uf_id',index:'uf',label:'TRANSLATION(uf_id)',width:'300',xmlmap:'uf',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_uf&field1=id&field2=name'}},{name:'member_id',index:'member',label:'TRANSLATION(member_id)',width:'300',xmlmap:'member',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_member&field1=id&field2=name'}},{name:'provider_id',index:'provider',label:'TRANSLATION(provider_id)',width:'300',xmlmap:'provider',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_provider&field1=id&field2=name'}},{name:'language',index:'language',label:'TRANSLATION(language)',width:'5',xmlmap:'language',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'gui_theme',index:'gui_theme',label:'TRANSLATION(gui_theme)',width:'50',xmlmap:'gui_theme',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'last_login_attempt',index:'last_login_attempt',label:'TRANSLATION(last_login_attempt)',width:'300',xmlmap:'last_login_attempt',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'last_successful_login',index:'last_successful_login',label:'TRANSLATION(last_successful_login)',width:'300',xmlmap:'last_successful_login',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'created_on',index:'created_on',label:'TRANSLATION(created_on)',width:'300',xmlmap:'created_on',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
+ return "[{name:'id',index:'id',label:'id',width:'150',xmlmap:'id',editable:false,hidden:false,editrules:{edithidden:true,searchhidden:true}},{name:'login',index:'login',label:'Login',width:'50',xmlmap:'login',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'password',index:'password',label:'TRANSLATION(password)',width:'255',xmlmap:'password',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'password'},{name:'email',index:'email',label:'Email',width:'100',xmlmap:'email',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'uf_id',index:'uf',label:'TRANSLATION(uf_id)',width:'300',xmlmap:'uf',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_uf&field1=id&field2=name'}},{name:'member_id',index:'member',label:'Member id',width:'300',xmlmap:'member',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_member&field1=id&field2=name'}},{name:'provider_id',index:'provider',label:'TRANSLATION(provider_id)',width:'300',xmlmap:'provider',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true},edittype:'select',editoptions:{dataUrl:'php\/ctrl\/SmallQ.php?oper=getFieldOptions&table=aixada_provider&field1=id&field2=name'}},{name:'language',index:'language',label:'TRANSLATION(language)',width:'5',xmlmap:'language',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'gui_theme',index:'gui_theme',label:'TRANSLATION(gui_theme)',width:'50',xmlmap:'gui_theme',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'last_login_attempt',index:'last_login_attempt',label:'TRANSLATION(last_login_attempt)',width:'300',xmlmap:'last_login_attempt',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'last_successful_login',index:'last_successful_login',label:'TRANSLATION(last_successful_login)',width:'300',xmlmap:'last_successful_login',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'created_on',index:'created_on',label:'TRANSLATION(created_on)',width:'300',xmlmap:'created_on',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
case 'aixada_user_role':
return "[{name:'user_id',index:'user_id',label:'TRANSLATION(user_id)',width:'150',xmlmap:'user_id',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}},{name:'role',index:'role',label:'TRANSLATION(role)',width:'100',xmlmap:'role',editable:true,hidden:true,editrules:{edithidden:true,searchhidden:true}}]";
View
5 css/aixada_main.css
@@ -30,8 +30,11 @@ option {padding:1px 5px;}
.greenBg {background-color:green;}
.lightGreenBg {background-color:#72b42d;}
-.okGreen {background:#D1F3D1;}
+.okGreen {color:darkgreen; background:#D1F3D1;}
.noRed {background:#ff7a75;}
+.processing {color:black; background:yellow;}
+.grayedGreen {color:darkgray; background:lightgray; /*#d2f3d2;*/}
+.fgWhite {color:white;}
.dateNum {font-weight:bold; margin:1px; padding-right:2px;}
.grayed {color:#E1E1E1;}
View
258 install.php
@@ -27,94 +27,190 @@ function existing_languages_selectbox()
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Install</title>
- <link rel="stylesheet" type="text/css" media="screen" href="css/aixada_main.css" />
- <link rel="stylesheet" type="text/css" media="screen" href="css/ui-themes/<?=$default_theme;?>/jqueryui.css"/>
-
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Install</title>
+ <link rel="stylesheet" type="text/css" media="screen" href="css/aixada_main.css" />
+ <link rel="stylesheet" type="text/css" media="screen" href="css/ui-themes/smoothness/jqueryui.css"/>
+
</head>
<body>
+ <script type="text/javascript" src="js/jquery/jquery.js"></script>
+ <script type="text/javascript" src="js/jqueryui/jqueryui.js"></script>
+<script type="text/javascript">
+ function callInstall(action, dataSerial) {
+ var result = 2;
+ $('#' + action)
+ .removeClass('grayed')
+ .addClass('processing')
+ .attr({style:'visibility:visible'});
+ var datai = $('#install').serialize();
+
+ $.ajax({
+ type: "POST",
+ url: "php/ctrl/Install.php?oper=" + action,
+ data : datai,
+ success: function(msg) {
+ $('#' + action)
+ .removeClass('processing')
+ .removeClass('noRed')
+ .addClass('okGreen')
+ .attr({style:'visibility:visible'});
+ $('#' + action + '_result')
+ .removeClass('noRed')
+ .removeClass('grayed')
+ .removeClass('fgWhite')
+ .addClass('okGreen')
+ .attr({style:'visibility:visible'})
+ .text(' ok');
+ result = 0;
+ },
+ error : function(XMLHttpRequest, textStatus, errorThrown){
+ $('#' + action)
+ .removeClass('processing')
+ .addClass('noRed')
+ .attr({style:'visibility:visible'});
+ $('#' + action + '_result')
+ .text(XMLHttpRequest.responseText)
+ .addClass('noRed')
+ .removeClass('grayed')
+ .addClass('fgWhite')
+ .attr({style:'visibility:visible'});
+ result = 1;
+ },
+ async:false
+ });
+ return result;
+ }
+ $(function(){
+ $('#btn_install').button();
+ $('#btn_install').click(function(){
+ /*var items = ['coop_name', 'db_name', 'db_host', 'db_user', 'db_pwd', 'first_uf', 'user_login', 'user_password', 'retype_password'];
+ var dataSerial = '';
+ for (var i=0; i<items.length; i++) {
+ dataSerial += '&' + items[i] + '=' + $('#' + items[i]).val();
+ }*/
+ var actions = ['validate', 'connect', 'lang', 'create_setup', 'create_database', 'create_config_file', 'create_user'];
+ for (var i=0; i<actions.length; i++) {
+ $('#' + actions[i])
+ .removeClass('okGreen')
+ .removeClass('noRed')
+ .addClass('grayed')
+ .attr({style:'display:none'});
+ $('#' + actions[i] + '_result')
+ .removeClass('okGreen')
+ .removeClass('noRed')
+ .addClass('grayed')
+ .attr({style:'display:none'});
+ }
+ var result = 0;
+
+ //not sure this will work: call all installs at the same time?!
+ for (var i=0; i<actions.length && result==0; i++) {
+ result = callInstall(actions[i]);
+ }
+ });
+ return false;
+ });
+</script>
+
<br/><br/><br/>
- <div id="wrap">
-
- <form action="php/ctrl/Install.php" method="POST">
- <h2>Install your Aixada platform</h2>
- <br/><br/><br/>
- <p>What you need:
- <ul>
- <li>The name of an existing mySQL database</li>
- <li>An existing mySQL user (name, password) with sufficient rights for your database</li>
- </ul>
+ <div id="wrap">
+ <div id="wrapForm">
+
+ <form id="install">
+ <h2>Install your Aixada platform</h2>
+ <br/><br/><br/>
+ <p>What you need:
+ <ul>
+ <li>The name of an existing mySQL database</li>
+ <li>An existing mySQL user (name, password) with sufficient rights for your database</li>
+ </ul>
-
- </p>
- <p><br/><br/></p>
-
- <table>
-
- <tr>
- <td><label for="coop_name">Name of your platform</label> <br/>(appears in the title bar of the site)</td>
- <td><input type="text" name="coop_name" class="ui-widget-content ui-corner-all" /></td>
-
- </tr>
-
- <tr>
- <td><br/></td>
- <td></td>
- </tr>
-
+
+ </p>
+ <p><br/><br/></p>
+
+ <table>
+
+ <tr>
+ <td><label for="coop_name">Name of your platform</label> <br/>(appears in the title bar of the site)</td>
+ <td><input type="text" id="coop_name" class="ui-widget-content ui-corner-all" /></td>
+
+ </tr>
+
+ <tr>
+ <td><br/></td>
+ <td></td>
+ </tr>
+
- <tr>
- <td><label for="db_name">Database name:</label></td>
- <td><input type="text" name="db_name" class="ui-widget-content ui-corner-all"/></td>
- </tr>
+ <tr>
+ <td><label for="db_name">Database name:</label></td>
+ <td><input type="text" id="db_name" class="ui-widget-content ui-corner-all"/></td>
+ </tr>
- <td class="textAlignRight"><label for="db_host">Database host:</label><br/>(usually 'localhost')</td>
- <td><input type="text" name="db_host" class="ui-widget-content ui-corner-all"/></td>
- </tr>
-
-
- <tr>
- <td><label for="db_user">Database user:</label></td>
- <td><input type="text" name="db_user" class="ui-widget-content ui-corner-all" /></td>
-
- </tr>
- <tr>
- <td><label for="db_pwd">Password</label></td>
- <td><input type="text" name="db_pwd" class="ui-widget-content ui-corner-all" /></td>
- </tr>
- <tr>
- <td>&nbsp;</td>
- </tr>
- <tr>
- <td><label for="pref_lang">Default language</label></td>
- <td colspan="2">
+ <td class="textAlignRight"><label for="db_host">Database host:</label><br/>(usually 'localhost')</td>
+ <td><input type="text" id="db_host" class="ui-widget-content ui-corner-all"/></td>
+ </tr>
+
+
+ <tr>
+ <td><label for="db_user">Database user:</label></td>
+ <td><input type="text" id="db_user" class="ui-widget-content ui-corner-all" /></td>
+
+ </tr>
+ <tr>
+ <td><label for="db_pwd">Password</label></td>
+ <td><input type="text" id="db_pwd" class="ui-widget-content ui-corner-all" /></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td><label for="pref_lang">Default language</label></td>
+ <td colspan="2">
<?php echo existing_languages_selectbox(); ?>
- </td>
- </tr>
- <tr>
- <td><label for="first_Uf">Name of first UF</label></td>
- <td><input type="text" name="first_uf" class="ui-widget-content ui-corner-all" /></td>
- </tr>
- <tr>
- <td><label for="user_login">First User's login</label></td>
- <td><input type="text" name="user_login" class="ui-widget-content ui-corner-all" /></td>
- </tr>
- <tr>
- <td><label for="user_password">First User's password</label></td>
- <td><input type="password" name="user_password" class="ui-widget-content ui-corner-all" /></td>
- </tr>
- <tr>
- <td><label for="retype_password">Retype password</label></td>
- <td><input type="password" name="retype_password" class="ui-widget-content ui-corner-all" /></td>
- </tr>
- <tr>
- <td colspan="2" class="textAlignRight"><br/><br/><button type="submit">Install :-)</button></td>
- </tr>
- </table>
-
- </form>
- </div>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="first_Uf">Name of first UF</label></td>
+ <td><input type="text" id="first_uf" class="ui-widget-content ui-corner-all" /></td>
+ </tr>
+ <tr>
+ <td><label for="user_login">First User's login</label></td>
+ <td><input type="text" id="user_login" class="ui-widget-content ui-corner-all" /></td>
+ </tr>
+ <tr>
+ <td><label for="user_password">First User's password</label></td>
+ <td><input type="password" id="user_password" class="ui-widget-content ui-corner-all" /></td>
+ </tr>
+ <tr>
+ <td><label for="retype_password">Retype password</label></td>
+ <td><input type="password" id="retype_password" class="ui-widget-content ui-corner-all" /></td>
+ </tr>
+ <tr>
+ <td colspan="2" class="textAlignRight"><br/><br/><p id="btn_install" type="submit">Install :-)</p></td>
+ </tr>
+ </table>
+
+ </form>
+ </div>
+<br/>
+ <div id="wrapFeedback">
+ <p id="validate" class="grayed " style="visibility:hidden">Validating input ... <b id="validate_result"></b></p>
+ <p id="connect" class="grayed " style="visibility:hidden">Connect to database ... <b id="connect_result"></b></p>
+ <p id="lang" class="grayed" style="visibility:hidden">Process language files ... <b id="lang_result"/></p>
+ <p id="create_setup" class="grayed" style="visibility:hidden">Create setup file for database ... <b id="create_setup_result"/></p>
+ <p id="create_db" class="grayed" style="visibility:hidden">Create database ... <b id="create_db_result"/></p>
+ <p id="create_config" class="grayed" style="visibility:hidden">Create configuration file ... <b id="create_config_result"/></p>
+ <p id="create_user" class="grayed" style="visibility:hidden">Create special user ... <b id="create_user_result"/></p>
+ <p id="ok" class="grayed" style="visibility:hidden">Success!</p>
+ </div>
+ <br/>
+ <div>
+ <p id="installMsg" class="user_tips minPadding"></p>
+ </div>
+ </div>
</body>
</html>
View
27 js/aixadautilities/jquery.aixadaMenu.js
@@ -72,21 +72,24 @@ $(function(){
});
});
+
var role = $("#role_select option:selected").val();
//function to retrieve menu access rights
- $.ajax({
- type: "POST",
- url: "php/ctrl/SmallQ.php?oper=configMenu&user_role="+role,
- dataType: "xml",
- success: function(xml){
- $(xml).find('navigation').children().each(function(){
- var tag = $(this)[0].tagName;
- var val = $(this).text();
- $('#'+tag).button(val);
- });
- }
- });
+ if (typeof(role) == "string" ){
+ $.ajax({
+ type: "POST",
+ url: "php/ctrl/SmallQ.php?oper=configMenu&user_role="+role,
+ dataType: "xml",
+ success: function(xml){
+ $(xml).find('navigation').children().each(function(){
+ var tag = $(this)[0].tagName;
+ var val = $(this).text();
+ $('#'+tag).button(val);
+ });
+ }
+ });
+ }
$('#lang_select').change(function (){
var new_lang = $("#lang_select option:selected").val();
View
2  local_config/config.php
@@ -27,7 +27,7 @@ class configuration_vars {
*/
public $db_type = 'mysqli';
public $db_host = 'localhost';
- public $db_name = 'aixadac';
+ public $db_name = 'aixada';
public $db_user = 'aixada';
public $db_password = 'aixada';
View
2  local_config/lang/en.php
@@ -411,7 +411,7 @@
$Text['msg_withdrawal_success'] = "The withdrawal has been successful!";
$Text['msg_select_cart_first'] = "In order to add items for validating you have to select an HU/cart first!";
//$Text['msg_err_move_date'] = "An error has occured while moving the order to the new date. Try again. ";
-$Text['msg_no_active_products'] = "Sorry, but currently there are no products activated for ordering. Talk to the person in charge of this provider!";
+$Text['msg_no_active_products'] = "Sorry, but currently there are no products activated for ordering. Talk to the person in charge of provider(s)!";
//$Text['msg_no_movements'] = "Sorry, no movements for given account and date!";
$Text['msg_delete_incident'] = "Are you sure you want to delete this incident?";
//$Text['msg_err_selectFirstUF'] = "There is no household selected. Choose one first and then its purchases."; //ADDED JAN 2012
View
282 local_config/lang/es.php
@@ -1,8 +1,8 @@
<?php
// Spanish translation file for aixada
// contribute by
-// Cristóbal Cabeza-Cáceres
-// Email: cristobal.cabeza@gmail.com
+// Cristóbal Cabeza-Cáceres, Daniel Mollà
+// Email: cristobal.cabeza@gmail.com, dmollaca@gmail.com
$Text['es'] = 'Castellano';
@@ -74,7 +74,7 @@
$Text['head_ti_active_roles'] = "Roles activos";
$Text['head_ti_account'] = "Cuentas";
$Text['head_ti_manage_orders'] = "Gestionar los pedidos";
-$Text['head_ti_manage_dates'] = "Set Order Dates";
+$Text['head_ti_manage_dates'] = "Activar Fechas Pedidos";
$Text['head_ti_manage'] = "Gestionar";
$Text['head_ti_manage_uf'] = "Unidades familiares/Miembros";
$Text['head_ti_incidents'] = "Incidentes";
@@ -139,7 +139,7 @@
$Text['mo_inact_prod'] = "No podrán pedir:";
$Text['mo_act_prod'] = "Sí podrán pedir:";
$Text['mo_notarr_prod'] = "Productos que no han llegado:";
-$Text['mo_arr_prod'] = "Products que sí han llegado:";
+$Text['mo_arr_prod'] = "Productos que sí han llegado:";
$Text['mo_inact_role'] = "Roles inactivos";
$Text['mo_act_role'] = "Roles activos";
$Text['mo_inact_user'] = "Usuarios inactivos";
@@ -191,10 +191,10 @@
$Text['deposit_other'] = 'Otros ingresos...';
$Text['make_deposit_4HU'] = 'Ingreso de la UF';
$Text['short_desc'] = 'Descripción';
-$Text['withdraw_type'] = 'Tipo de pagamento';
-$Text['withdraw_for_provider'] = 'Para un proveidor';
-$Text['withdraw_other'] = 'Otros tipos de pagamentos..';
-$Text['withdraw_provider'] = 'Pagamento del proveidor';
+$Text['withdraw_type'] = 'Tipo de pago';
+$Text['withdraw_for_provider'] = 'Para un proveedor';
+$Text['withdraw_other'] = 'Otros tipos de pago..';
+$Text['withdraw_provider'] = 'Pago del proveedor';
$Text['btn_make_withdrawal'] = 'Paga';
$Text['correct_balance'] = 'Corregir balance';
$Text['set_balance'] = 'Actualizar balance de la caja';
@@ -218,7 +218,7 @@
$Text['latest_movements'] = "Últimos movimientos";
$Text['time'] = "Hora";
$Text['account'] = "Cuenta";
-$Text['consum_account'] = "Cuenta de Consum";
+$Text['consum_account'] = "Cuenta de Consumo";
$Text['operator'] = "Usuario";
$Text['balance'] = "Balance";
$Text['dailyStats'] = "Estadísticas diarias";
@@ -258,7 +258,7 @@
$Text['lang'] = "Lengua";
$Text['msg_err_incorrectLogon'] = "Acceso incorrecto";
$Text['msg_err_noUfAssignedYet'] = "Todavía no has sido asignado a ninguna UF: Por favor, pide que te den de alta.";
-$Text['msg_reg_success'] = "Te has registrado correctamente, pero tu usuario aテコn no se ha aprobado. Registra el resto de miembros de tu UF y contacta con un responsable para finalizar el registro.";
+$Text['msg_reg_success'] = "Te has registrado correctamente, pero tu usuario aún no se ha aprobado. Registra el resto de miembros de tu UF y contacta con un responsable para finalizar el registro.";
$Text['register'] = "Registro";
$Text['required_fields'] = " son campos obligatorios";
$Text['old_pwd'] = "Contraseña antigua";
@@ -286,11 +286,11 @@
$Text['nav_mng_stock'] = "Stock";
$Text['nav_mng_units'] = "Unidades";
$Text['nav_mng_orders'] = "Pedidos";
- $Text['nav_mng_setorderable'] = "Set orderable dates";
+ $Text['nav_mng_setorderable'] = "Activar Fechas para realizar pedidos";
$Text['nav_mng_move'] = "Cambiar la fecha del pedido";
$Text['nav_mng_orders_overview'] = "Gestionar pedidos";
$Text['nav_mng_preorder'] = "Convertir el prepedido en pedido";
- $Text['nav_mng_db'] = "Backup db";
+ $Text['nav_mng_db'] = "Copia de seguridad bd";
$Text['nav_mng_roles'] = "Roles";
$Text['nav_report'] = "Informes";
$Text['nav_report_order'] = "Pedido actual";
@@ -298,7 +298,7 @@
$Text['nav_report_preorder'] = "Prepedidos";
$Text['nav_report_timelines'] = "Evolución de la Aixada ";
$Text['nav_report_timelines_uf'] = "Por UFs";
-$Text['nav_report_timelines_provider'] = "Por Proveidores";
+$Text['nav_report_timelines_provider'] = "Por Proveedores";
$Text['nav_report_timelines_product'] = "Por Productos";
$Text['nav_report_daystats'] = "Estadísticas diarias";
$Text['nav_report_incidents'] = "Incidentes de hoy";
@@ -339,7 +339,7 @@
$Text['btn_close'] = "Cerrar";
$Text['btn_make_deposit'] = "Ingresar";
$Text['btn_new_incident'] = "Incidente nuevo";
-$Text['btn_reset_pwd'] = "Reestablecer contrase紡";
+$Text['btn_reset_pwd'] = "Reestablecer contraseña";
$Text['btn_view_cart'] = "Carrito";
$Text['btn_view_cart_lng'] = "Ver únicamente el carrito";
$Text['btn_view_list'] = "Productos";
@@ -400,23 +400,23 @@
$Text['msg_err_select_uf'] = "Para asignar un nuevo miembro a una UF primero tienes que seleccionar la UF clicando sobre ella. Si quieres crear una nueva UF, hazlo clicando en + Nueva UF.";
$Text['msg_err_select_non_member'] = "Para asignar un nuevo miembro a una UF, primero tienes que seleccionarlo de la lista de no miembros que hay a la derecha.";
$Text['msg_err_insufficient_stock'] = 'No hay suficiente stock de ';
-$Text['msg_err_validate_self'] = 'No puedes validar a ti mismo!';
+$Text['msg_err_validate_self'] = '¡No puedes validarte a ti mismo!';
$Text['msg_edit_success'] = "Los datos editados se han guardado correctamente.";
$Text['msg_edit_mysettings_success'] = "La nueva configuración se ha guardado correctamente.";
$Text['msg_pwd_changed_success'] = "La contraseña se ha cambiado correctamente.";
-$Text['msg_confirm_del'] = "ツソSeguro que quieres eliminar a este miembro?";
+$Text['msg_confirm_del'] = "¿Seguro que quieres eliminar a este miembro?";
$Text['msg_enter_deposit_amount'] = "El campo de cantidad del ingreso solo acepta cifras y no puede estar vacío.";
$Text['msg_please_set_ufid_deposit'] = "No se ha definido la ID de la UF. Tienes que elegir una compra o seleccionar otra UF para realizar el depósito.";
$Text['msg_error_deposit'] = "Se ha producido un error al hacer el ingreso. Inténtalo de nuevo. Los ingresos que se han hecho correctamente aparecen en la lista de cuentas. <br/>El error ha sido: ";
$Text['msg_deposit_success'] = "El depósito se ha realizado correctamente.";
-$Text['msg_withdrawal_success'] = "El pagamento se ha realizada correctamente!";
+$Text['msg_withdrawal_success'] = "El pago se ha realizado correctamente.";
$Text['msg_select_cart_first'] = "Para añadir artículos para validar, antes tienes que seleccionar una UF o una compra.";
$Text['msg_err_move_date'] = "Se ha producido un error mientras se cambiaba la fecha del pedido. Inténtalo de nuevo.";
-$Text['msg_no_active_products'] = "En estos momentos no hay productos activos para pedir!";
+$Text['msg_no_active_products'] = "En estos momentos no hay productos activos para pedir.";
$Text['msg_no_movements'] = "No hay movimientos para la cuenta y la fecha seleccionados.";
$Text['msg_delete_incident'] = "¿Seguro que quieres eliminar este incidente?";
-$Text['msg_err_selectFirstUF'] = "There is no household selected. Choose one first and then its purchases."; //ADDED JAN 2012
+$Text['msg_err_selectFirstUF'] = "There is no household selected. Choose one first and then its purchases. No hay ninguna UF seleccionada. Elige una primero y luego sus compras."; //ADDED JAN 2012
@@ -468,7 +468,7 @@
$Text['category'] = 'Categoría';
$Text['rev_tax_type'] = 'Tipo de impuesto revolucionario';
$Text['unit_price'] = 'Precio por unidad';
-$Text['iva_percent'] = "Porcentaje de IVA";
+$Text['iva_percent'] = 'Porcentaje de IVA';
$Text['unit_measure_order'] = 'Pedido por unidad';
$Text['unit_measure_shop'] = 'Vendido por peso';
$Text['stock_min'] = 'Cantidad mínima para tener en stock';
@@ -489,14 +489,14 @@
$Text['Download zip'] = 'Bajar fichero comprimido con todos los pedidos';
$Text['product_singular'] = 'producto';
$Text['product_plural'] = 'productos';
-$Text['confirm_db_backup'] = 'Are you sure you want to backup the whole database? This make take a little while...';
-$Text['show_date_field'] = 'Click here to show the calendar field and select a different date than today.';
+$Text['confirm_db_backup'] = '¿Estás seguro de hacer una copia de seguridad de toda la base de datos? Esto llevará un tiempo';
+$Text['show_date_field'] = "Pulsa aquí para mostrar el campo de calendario y seleccionar una fecha diferente de hoy";
/**
* Home
*/
$Text['purchase_current'] = 'Mis compras';
-$Text['items_bought'] = "Compras anteriores";
+$Text['items_bought'] = 'Compras anteriores';
$Text['purchase_future'] = 'Mis pedidos';
$Text['purchase_prev'] = 'Compras anteriores';
$Text['icon_order'] = 'Haz tu pedido aqui';
@@ -509,5 +509,239 @@
-
+/* definitely new stuff */
+
+$Text['download_db_zipped'] = 'Descargar Base de Datos comprimida';
+$Text['backup'] = '¡Ok, haz una copia de la Bade de Datos!';
+$Text['filter_incidents'] = 'Filtrar incidencias';
+$Text['todays'] = "Hoy";
+$Text['recent_ones'] = 'Más recientes';
+$Text['last_year'] = 'Último Año';
+$Text['details'] = 'Detalles';
+$Text['actions'] = 'Acciones';
+$Text['incident_details'] = 'Detalles de Incidencias';
+$Text['distribution_level'] = 'Nivel de Distribución';
+$Text['internal_private'] = 'Internal (private)';
+$Text['internal_email_private'] = 'Internal + email (private)';
+$Text['internal_post'] = 'Internal + post to portal (public)';
+$Text['internal_email_post'] = 'Internal + email + post (public)';
+
+$Text['date'] = "Fecha";
+$Text['iva'] = "IVA";
+$Text['expected'] = 'Esperado';
+$Text['not_yet_sent'] = 'Todavía no enviado';
+$Text['ordered_for'] = 'Ordenado por';
+$Text['my_orders'] = 'Mi(s) Pedido(s)';
+$Text['my_purchases'] = 'Mi(s) Compra(s)';
+$Text['loading_status_info'] = 'Cargando Información de estado...';
+$Text['previous'] = 'Previo';
+$Text['next'] = 'Siguiente';
+$Text['date_of_purchase'] = 'Fecha de Compra';
+$Text['validated'] = 'Validado';
+$Text['total'] = 'Total';
+$Text['ordered'] = 'Pedido realizado';
+$Text['delivered'] = 'Entregado';
+$Text['price'] = 'Precio';
+$Text['qu'] = 'Qu';
+$Text['msg_err_deactivatedUser'] = "¡Tu cuenta de usuario ha sido desactivada!";
+$Text['order'] = 'Pedido';
+$Text['order_pl'] = 'Pedidos';
+$Text['msg_already_validated'] = 'La cesta seleccionada ya ha sido validada. ¿Quieres ver sus productos/items?';
+$Text['validated_at'] = "Validado en "; //Se refiere a fecha/hora
+
+
+$Text['nothing_to_val'] = "Nada que validar para UF";
+$Text['cart_id'] = "Id de la cesta";
+$Text['msg_several_carts'] = "La UF seleccionada tiene más de una cesta pendiente de validación. Por favor, seleccione una:";
+$Text['transfer_type'] = "Tipo";
+$Text['todays_carts'] = "Cestas de hoy";
+$Text['head_ti_torn'] = "Working shift overview";
+$Text['btn_validate'] = "Validar";
+$Text['desc_validate'] = "Validar cestas anteriores y actuales para las UFs. Hacer depósitos de dinero.";
+$Text['nav_wiz_revise_order'] = "Revisar";
+$Text['desc_revise'] = "Revisar pedidos individuales; comprobar si los productos han llegado y ajustar las cantidades si es necesario. Distribuir el pedido en cestas de compra individuales.";
+$Text['desc_cashbox'] = "Hacer ingresos y retiros monetarios. Al inicio del primer movimiento la cuenta tiene que ser reiniciada. La cantidad de esta cuenta debe reflejar el dinero real disponible.";
+$Text['desc_stock'] = "Añadir y/o controlar el stock de productos.";
+$Text['desc_print_orders'] = "Imprimir y descargar los pedidos para la semana siguiente. Los Pedidos deben estar finalizados, impresos y descargados en un fichero zip.";
+$Text['nav_report_status'] = "Estadísticas";
+$Text['desc_stats'] = "Descargar un resumen de los movimientos actuales incluyendo las incidencias de hoy, ufs en negativo, cuenta de gastos total y productos con stock negativo.";
+$Text['order_closed'] = "El Pedido está cerrado para este proveedor.";
+$Text['head_ti_sales'] = "Listado de Ventas";
+$Text['not_yet_val'] = "todavía no validado";
+$Text['val_by'] = "Validado por";
+$Text['purchase_details'] = "Detalle de la compra de la cesta #";
+$Text['filter_uf'] = "Filtrar por UF";
+$Text['purchase_uf'] = "Compra de la UF";
+$Text['quantity_short'] = "Qu";
+$Text['incl_iva'] = "incl. IVA";
+$Text['incl_revtax'] = "incl. ImpRev";
+$Text['no_news_today'] = "¡Ninguna noticia es una buena noticia: hoy no han habido incidencias!";
+$Text['nav_mng_iva'] = "Tipos de IVA";
+$Text['nav_mng_money'] = "Dinero";
+$Text['nav_mng_admin'] = "Admin";
+$Text['nav_mng_users'] = "Usuarios";
+$Text['nav_mng_access_rights'] = "Permisos de Acceso";
+$Text['msg_sel_account'] = "Elige una cuenta primero, después filtra los resultados!";
+$Text['msg_err_nomovements'] = "Lo siento, no hay movimientos para la cuenta seleccionada y fecha. Trate de ampliar el periodo de tiempo con el botón de filtro.";
+$Text['active_changed_uf'] = "Estado activo de la UF modificado";
+$Text['msg_err_mentoruf'] = "¡La UF anfitriona debe ser diferente de ella misma!";
+$Text['msg_err_ufexists'] = "La UF ya existe. Por favor, elija otra!";
+$Text['msg_err_form_init'] = "Parece que el formulario para crear un nuevo miembro no se ha inicializado correctamente. Recargue la página y inténtelo otra vez... ";
+$Text['ti_mng_hu_members'] = "Gestionar UFs y sus miembros";
+$Text['list_ufs'] = "Lista de UFs";
+$Text['search_members'] = "Búsqueda de miembros";
+$Text['member_pl'] = "Miembros";
+$Text['mng_members_uf'] = "Gestionar los miembros de la UF ";
+$Text['uf_name'] = "Nombre";
+$Text['btn_new_member'] = "Nuevo miembro";
+$Text['ti_add_member'] = "Añadir nuevo miembro a la UF";
+$Text['custom_member_ref'] = "Ref. Personalizada";
+$Text['theme'] = "Tema";
+$Text['member_id'] = "Id del miembro";
+$Text['ti_mng_stock'] = "Gestionar stock";
+$Text['msg_err_no_stock'] = "Aparentemente este proveedor no tiene stock";
+$Text['msg_err_qu'] = "¡La cantidad debe ser numérica y mayor que 0!";
+$Text['msg_correct_stock'] = "¡Ajustar el stock de esta forma debería ser una excepción! El stock nuevo tiene que ser siempre AÑADIDO. Está seguro de corregir el stock de este producto? Como se enteren los informáticos le van a.....";
+$Text['btn_yes_corret'] = "¡Sí, haz la modificación!";
+$Text['ti_mng_stock'] = "Gestionar stock";
+$Text['search_product'] = "Buscar un producto";
+$Text['add_stock'] = "Añadir stock";
+$Text['click_to_edit'] = "¡Clicar la celdas para editar!";
+$Text['no_results'] = "La búsqueda no ha producido resultados.";
+$Text['for'] = "para"; //as in order FOR Aurora
+$Text['date_for_order'] = "Fecha de entrega";
+$Text['finished_loading'] = "Carga Finalizada";
+$Text['msg_err_unrevised'] = "¡Hay items sin revisar en este pedido. Por favor, asegúrese de que todos los productos pedidos han llegado!";
+$Text['btn_dis_anyway'] = "Distribuir igualmente";
+$Text['btn_remaining'] = "Revisar los pendientes";
+$Text['msg_err_edit_order'] = "Este pedido no está completo. Solo se pueden añadir notas y referencias cuando se haya enviado.";
+$Text['order_open'] = "El Pedido está abierto";
+$Text['finalize_now'] = "Finalizar ahora";
+$Text['msg_err_order_filter'] = "No hay pedidos coincidentes con el criterio de búsqueda.";
+$Text['msg_finalize'] = "Está a punto de terminar un pedido. Esto significa que ya no podrá hacer modificaciones. ¿Está seguro de continuar?";
+$Text['msg_finalize_open'] = "Este pedido está todavía abierto. Finalizar-lo implica que deberá cerrarlo antes de su fecha límite. ¿Está seguro de continuar?";
+$Text['msg_wait_tbl'] = "Las cabeceras de la tabla todavía se estan creando. En función de su conexión de internet puede llevar un tiempo. Inténtelo otra vez en 5 segundos. ";
+$Text['msg_err_invalid_id'] = "¡No se encontró ningún ID válido para el pedido! ¡¡Este pedido no ha sido enviado al proveedor!!";
+$Text['msg_revise_revised'] = "Los ítems de este pedido han sido revisados y asignados a las cestas para la fecha de venta indicada. Revisarlos otra vez implica perder la modificaciones ya hechas y interferir en las correcciones creadas por los usuarios. <br/><br/> ¡¡¿Está totalmente seguro de continuar?!! <br/><br/> Si pulsa OK borrará los ítems de las cestas existentes y iniciará el proceso de revisión del pedido otra vez.";
+$Text['wait_reset'] = "Por favor, espere mientras el pedido se reinicia...";
+$Text['msg_err_already_val'] = "Algunos o todos los ítems ya han sido validados! ¡¡Lo siento pero no es posible hacer mas cambios!!";
+$Text['print_several'] = "There is more than one order currently selected. Do you want to print them all in one go?";
+$Text['btn_yes_all'] = "Sí, imprimir todo";
+$Text['btn_just_one'] = "No, solo uno";
+$Text['ostat_revised'] = "Revisado";
+$Text['ostat_finalized'] = "Finalizado";
+$Text['set_ostat_arrived'] = "¡Recibido!";
+$Text['set_ostat_postpone'] = "¡Postpuesto!";
+$Text['set_ostat_cancel'] = "¡Cancelado!";
+$Text['ostat_desc_sent'] = "El pedido ha sido enviado al proveedor";
+$Text['ostat_desc_nochanges'] = "Revisado y distribuido sin cambios";
+$Text['ostat_desc_postponed'] = "El pedido ha sido pospuesto";
+$Text['ostat_desc_cancel'] = "El pedido ha sido cancelado";
+$Text['ostat_desc_changes'] = "Revisado con algunas modificaciones";
+$Text['ostat_desc_incomp'] = "Pedido ignorado. Falta información anterior a la v2.5";
+$Text['set_ostat_desc_arrived'] = "La mayoría de los ítems pedidos han llegado. Procediendo a revisar y distribuir los productos en las cestas...";
+$Text['set_ostat_desc_postpone'] = "El pedido no ha llegado en la fecha indicada pero probablemente llegará en las próximas semanas.";
+$Text['set_ostat_desc_cancel'] = "Los ítems pedidos no llegaran nunca.";
+$Text['msg_move_to_shop'] = "Los ítems han sido distribuidos en la cestas para la fecha indicada.";
+$Text['msg_err_noselect'] = "Nada seleccionado!";
+$Text['ti_revise'] = "Revisar Pedido";
+$Text['btn_revise'] = "Revisar Pedido";
+$Text['ti_order_detail'] = "Detalle del pedido para";
+$Text['ti_mng_orders'] = "Gestionar Pedidos";
+$Text['btn_distribute'] = "¡Distribuir!";
+$Text['distribute_desc'] = "Distribuir los ítems del pedido en las cestas";
+$Text['filter_orders'] = "Filtrar pedidos";
+$Text['btn_filter'] = "Filtrar";
+$Text['filter_acc_todays'] = "Movimientos de hoy";
+$Text['filter_recent'] = "Recientes";
+$Text['filter_year'] = "Último Año";
+$Text['filter_all'] = "Todos";
+$Text['filter_expected'] = "Esperados para hoy";
+$Text['filter_next_week'] = "Próxima semana";
+$Text['filter_future'] = "Todos los pedidos futuros";
+$Text['filter_month'] = "Último mes";
+$Text['filter_postponed'] = "Postpuestos";
+$Text['with_sel'] = "Con selección...";
+$Text['dwn_zip'] = "Descargar comprimido";
+$Text['closes_days'] = "Cierra en días";
+$Text['sent_off'] = "Enviado al proveedor";
+$Text['date_for_shop'] = "Fecha de compra";
+$Text['order_total'] = "Total del pedido";
+$Text['nie'] = "NIE";
+$Text['total_orginal_order'] = "Pedido original";
+$Text['total_after_revision'] = "Después de revisión";
+$Text['delivery_ref'] = "Ref. de entrega";
+$Text['payment_ref'] = "Ref. de pago";
+$Text['arrived'] = "Llegado"; //as in order items have arrived. this is a table heading
+$Text['msg_cur_status'] = "El estado actual del pedido es";
+$Text['msg_change_status'] = "Cambiar el estado del pedido a alguna de las siguientes opciones";
+$Text['msg_confirm_move'] = "¿Está seguro de que quiere hacer disponible el pedido para la compra? Todos los productos asociados seran distribuidos en las cestas para la fecha:";
+$Text['alter_date'] = "Escoja una fecha alternativa";
+$Text['msg_err_miss_info'] = "Aparentemente este pedido fue creado con una versión más antigua del programa de la Aixada que es incompatible con la funcionalidad de revisión actual. Lo siento, este pedido no puede ser revisado.";
+
+//added 29.09
+
+$Text['order_closes'] = "El pedido se cierra el"; //as in: order closes 20 SEP 2012
+$Text['left_ordering'] = " pendientes de pedir."; //as in 4 days left for ordering
+$Text['ostat_closed'] = "El pedido está cerrado";
+$Text['ostat_desc_fin_send'] = "El pedido se ha cerrado y enviado al proveedor. La referencia es: #";
+$Text['msg_err_past'] = "¡Esto es el pasado! <br/> Demasiado tarde para modificar cosas.";
+$Text['msg_err_is_deactive_p'] = "Este producto está desactivado. Para abrirlo para una fecha primero debes activarlo.";
+$Text['msg_err_deactivate_p'] = "Estás a punto de desactivar el producto. Esto quiere decir que las fechas en que se puede pedir también se eliminaran.<br/><br/>Estás seguro de que quieres desactivar el producto? También podrias desactivar las fechas en que se puede pedir clicando en las casillas correspondientes.";
+$Text['msg_err_closing_date'] = "¡La fecha de cierre no puede ser posterior a la del pedido!";
+$Text['msg_err_sel_col'] = "¡La fecha seleccionada no tiene productos para pedir! Debe establecer un producto para pedir si quiere crear una plantilla para esta fecha.";
+$Text['msg_err_closing'] = "Para modificar la fecha de cierre, hay que poner al menos un producto que puede pedir.";
+$Text['msg_err_deactivate_sent'] = "El producto escogido no puede ser (des)activado porque el pedido correspondiente ya ha sido enviado al proveedor. No se pueden hacer mas cambios!";
+$Text['view_opt'] = "Mostrar opciones";
+$Text['days_display'] = "Número de días a mostrar";
+$Text['plus_seven'] = "Mostrar +7 días";
+$Text['minus_seven'] = "Mostrar -7 días";
+$Text['btn_earlier'] = "Antes de"; //cómo más temprano
+$Text['btn_later'] = "después de"; //más tarde... futuro
+
+//la frase entera es: "activate the selected day and products for the next 1|2|3.... month(s) every week | second week | third week | fourth week.
+$Text['pattern_intro'] = "Activa los productos i días para los próximos ";
+$Text['pattern_scale'] = "meses cada ";
+$Text['week'] = "semana";
+$Text['second'] = "segunda"; //2nd
+$Text['third'] = "tercera";
+$Text['fourth'] = "cuarta";
+$Text['msg_pattern'] = "¡NOTA: Esta acción regenerará los productos y fechas a partir de esta!";
+$Text['sel_closing_date'] = "Elegir una nueva fecha de cierre";
+$Text['btn_mod_date'] = "Modificar la fecha de cierre";
+$Text['btn_repeat'] = "¡Repetir el patrón!";
+$Text['btn_entire_row'] = "(Des)activa toda la fila";
+$Text['btn_deposit'] = "Depósito";
+$Text['btn_withdraw'] = "Reintegro";
+$Text['deposit_desc'] = "Ingreso en efectivo";
+$Text['withdraw_desc'] = "Reintegro de la caja";
+$Text['btn_set_balance'] = "Establecer el balance";
+$Text['set_bal_desc'] = "Reiniciar el balance al principio del primer turno.";
+$Text['maintenance_account'] = "Mantenimiento";
+$Text['posted_by'] = "Creado por"; //Posted by
+$Text['ostat_yet_received'] = "pendiente de recibir";
+$Text['ostat_is_complete'] = "está completo";
+$Text['ostat_postponed'] = "postpuesto";
+$Text['ostat_canceled'] = "cancelado";
+$Text['ostat_changes'] = "con cambios";
+$Text['filter_todays'] = "De hoy";
+$Text['bill'] = "Factura";
+$Text['member'] = "Miembro";
+$Text['cif_nif'] = "CIF/NIF"; //CIF/NIF
+$Text['bill_product_name'] = "Artículo"; //concepte en cat...
+$Text['bill_total'] = "Total"; //Total factura
+$Text['phone_pl'] = "Teléfonos";
+$Text['net_amount'] = "Importe neto"; //importe netto
+$Text['gross_amount'] = "Importe bruto"; //importe brutto
+$Text['add_pagebreak'] = "Pulsar aquí para añadir un salto de página";
+$Text['remove_pagebreak'] = "Pulsar aquí para eliminar el salto de página";
+
+
+$Text['show_deactivated'] = "Show deactivated products";
+$Text['nav_report_sales'] = "Sales";
+$Text['nav_help'] = "Help";
+$Text['withdraw_from'] = "Withdraw from "; //account
+$Text['withdraw_to_bank'] = "Withdraw cash for bank";
+$Text['withdraw_uf'] = "Withdraw from HU account";
+$Text['withdraw_cuota'] = "Withdraw member quota";
?>
View
7 manage_money.php
@@ -77,7 +77,7 @@
* hide show specific deposit fields
*/
$('.uf_sel_tr, .comment_tr').hide();
- $('#sel_deposite_type').change(function(){
+ $('#sel_deposite_type').change(function(e){
var sel_id = parseInt($("option:selected", this).val());
$('.comment_tr').show();
//make deposit for UF
@@ -139,7 +139,10 @@ function allowDeposit(){
var deposit_type = $('#sel_deposite_type option:selected').val();
var amount = $.checkNumber($('#deposit_amount'), '', 2);
var uf_id = parseInt($("#deposit_form .uf_account_select option:selected").val()) - 1000;
- allow = allow && (amount > 0) && ((deposit_type == 2) && (uf_id > 0) || (deposit_type == 2));
+
+
+ allow = allow && (amount > 0) && (deposit_type==2 || ((uf_id > 0) && (deposit_type == 1)));
+
if (allow) {
$('#deposit_submit').button('enable');
} else {
View
76 manage_mysettings.php
@@ -108,17 +108,17 @@ function submitMember(action, mi){
isValid = isValid && $.checkFormLength($(mi +' input[name=login]'),3,50);
if (!isValid){
- err_msg += "<?=$Text['msg_err_usershort'];?>";
+ err_msg += "<?=$Text['msg_err_usershort'];?><br/><br/>";
}
isValid = isValid && $.checkFormLength($(mi+' input[name=password]'),4,15);
if (!isValid){
- err_msg += "<br/><br/>" + "<?=$Text['msg_err_passshort'];?>";
+ err_msg += "<?=$Text['msg_err_passshort'];?><br/><br/>";
}
isValid = isValid && $.checkPassword($(mi+' input[name=password]'), $('input[name=password_ctrl]'));
if (!isValid){
- err_msg += "<br/><br/>" + "<?=$Text['msg_err_pwdctrl']; ?>";
+ err_msg += "<?=$Text['msg_err_pwdctrl']; ?><br/><br/>";
}
@@ -127,17 +127,17 @@ function submitMember(action, mi){
isValid = isValid && $.checkFormLength($(mi+' input[name="name"]'),4,15);
if (!isValid){
- err_msg += "<br/><br/>" + "<?php echo $Text['name_person'] . $Text['msg_err_notempty']; ?>";
+ err_msg += "<?php echo $Text['name_person'] . $Text['msg_err_notempty']; ?> <br/><br/>";
}
isValid = isValid && $.checkRegexp($(mi+' input[name="phone1"]'),/^([0-9\s\+])+$/);
if (!isValid){
- err_msg += "<br/><br/>" + "<?php echo $Text['phone1'] . $Text['msg_err_only_num']; ?>";
+ err_msg += "<?php echo $Text['phone1'] . $Text['msg_err_only_num']; ?><br/><br/>";
}
isValid = isValid && $.checkRegexp($(mi+' input[name="email"]'),/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);
if (!isValid){
- err_msg += "<br/><br/>" + "<?=$Text['msg_err_email'] ?>";
+ err_msg += "<?=$Text['msg_err_email'] ?>";
}
if (isValid){
@@ -227,28 +227,50 @@ function constructSelects(){
//send pwd edit form
$('#change_pwd').submit(function(){
var dataSerial = $(this).serialize();
- $.ajax({
- type: "POST",
- url: "php/ctrl/UserAndUf.php?oper=changePassword",
- data: dataSerial,
- beforeSend: function(){
- $('#pwdWrap .loadAnim').show();
- },
- success: function(msg){
- $.showMsg({
- msg: "<?=$Text['msg_pwd_changed_success'];?>",
- type: 'success'});
- },
- error : function(XMLHttpRequest, textStatus, errorThrown){
- $.showMsg({
- msg: XMLHttpRequest.responseText,
- type: 'error'});
- },
- complete : function(msg){
- $('#pwdWrap .loadAnim').hide();
- }
- });
+
+ var isValid = true;
+ var err_msg = '';
+ var mi = '#change_pwd';
+
+ isValid = isValid && $.checkFormLength($(mi+' input[name=password]'),4,15);
+ if (!isValid){
+ err_msg += "<?=$Text['msg_err_passshort'];?><br/><br/>" ;
+ }
+ isValid = isValid && $.checkPassword($(mi+' input[name=password]'), $('input[name=password_ctrl]'));
+ if (!isValid){
+ err_msg += "<?=$Text['msg_err_pwdctrl']; ?>";
+ }
+
+
+
+ if (isValid){
+ $.ajax({
+ type: "POST",
+ url: "php/ctrl/UserAndUf.php?oper=changePassword",
+ data: dataSerial,
+ beforeSend: function(){
+ $('#pwdWrap .loadAnim').show();
+ },
+ success: function(msg){
+ $.showMsg({
+ msg: "<?=$Text['msg_pwd_changed_success'];?>",
+ type: 'success'});
+ },
+ error : function(XMLHttpRequest, textStatus, errorThrown){
+ $.showMsg({
+ msg: XMLHttpRequest.responseText,
+ type: 'error'});
+ },
+ complete : function(msg){
+ $('#pwdWrap .loadAnim').hide();
+ }
+ });
+ } else {
+ $.showMsg({
+ msg:err_msg,
+ type: 'error'});
+ }
return false;
});//end submit
View
49 manage_ufmember.php
@@ -126,11 +126,13 @@
$(this).addClass('ui-state-highlight');
gSelUfRow = $(this);
-
- $('#uf_detail_member_list').xml2html('reload',{
- params: "oper=getMemberInfo&uf_id="+gSelUfRow.attr('ufid')
- });
+ //only load fresh ones. otherwise use cash
+ //if (!$.inArray(gSelUfRow.attr('ufid'), gUfMemberViewCache))
+ $('#uf_detail_member_list').xml2html('reload',{
+ params: "oper=getMemberInfo&uf_id="+gSelUfRow.attr('ufid')
+ });
+ //}
switchTo('ufMemberView');
});
@@ -155,7 +157,9 @@
//new uf
$("#btn_new_uf")
- .button()
+ .button({
+ icons : {primary:"ui-icon-plus"}
+ })
.click(function(e){
$('#create_uf_name').val('');
//$('#mentor_uf').xml2html('reload');
@@ -166,7 +170,7 @@
//edit uf
$("#btn_edit_uf")
.button({
- icons : {secondary:"ui-icon-pencil"}
+ icons : {primary:"ui-icon-pencil"}
})
.click(function(e){
$('#uf_info').find('input').removeAttr('disabled');
@@ -412,7 +416,7 @@ function submitUF(ufId){
/*******************************************
* UF & MEMBER EDIT
*******************************************/
-
+
$('#uf_detail_member_list').xml2html('init',{
url : "php/ctrl/UserAndUf.php",
params: "oper=getMemberInfo&uf_id=",
@@ -443,7 +447,7 @@ function submitUF(ufId){
},
complete : function(){
//$('#member_listing .loadAnim').hide();
-
+
//each member gets an edit button
$('.btn_save_edit_member').button({
icons: {primary: "ui-icon-disk"}
@@ -524,7 +528,7 @@ function submitUF(ufId){
//create new member button
$("#btn_add_member")
.button({
- icons:{secondary:'ui-icon-plus'}
+ icons:{primary:'ui-icon-plus'}
})
.click(function(e){
prepareAddMemberForm(false);
@@ -674,11 +678,11 @@ function submitMember(action, mi){
$.showMsg({
msg: "<?php echo $Text['msg_edit_success']; ?>",
type: 'success'});
- $('#uf_detail_member_list').xml2html('reload',{
+ /*$('#uf_detail_member_list').xml2html('reload',{
params: "oper=getMemberInfo&uf_id="+gSelUfRow.attr('ufid'),
});
- switchTo('ufMemberView');
+ switchTo('ufMemberView');*/
//$('#member_list tbody').xml2html('reload');
},
@@ -712,6 +716,8 @@ function switchTo(section){
switch(section){
case 'overview':
$('.viewMemberElements, .ufDetailElements, .createMemberElements').hide();
+ $('.btn_save_edit_member').button('destroy');
+ $('.btn_save_edit_member').die('click'); //otherwise, save edits will duplicate, triplicate...
$('.overviewElements').show();
break;
@@ -794,7 +800,7 @@ function switchTo(section){
<div id="stagewrap" class="ui-widget">
<div id="titlewrap">
-
+
<div id="titleLeftCol">
<button id="btn_overview" class="floatLeft ufDetailElements viewMemberElements createMemberElements"><?php echo $Text['overview'];?></button>
<h1 class="overviewElements"><?php echo $Text['ti_mng_hu_members']; ?></h1>
@@ -804,6 +810,7 @@ function switchTo(section){
<!-- p class="textAlignRight"><?php echo $Text['search_memberuf'];?>: <input type="text" name="search_member" id="search_member" class="inputTxtMiddle ui-widget-content ui-corner-all" /></p-->
<button id="btn_new_uf" class="overviewElements floatRight"><?php echo $Text['create_uf']; ?>...</button>
</div>
+
</div>
@@ -812,7 +819,7 @@ function switchTo(section){
<!--
MEMBER LISTING TABS
-->
- <div id="member_listing" class="ui-widget overviewElements aix-layout-center80">
+ <div id="member_listing" class="ui-widget overviewElements">
<ul>
<li><a href="#tabs-1"><h2><?php echo $Text['list_ufs']; ?></h2></a></li>
@@ -852,11 +859,12 @@ function switchTo(section){
<table id="member_list" class="tblListingDefault">
<thead>
<tr>
- <th><?=$Text['id'];?></th>
+ <th class="aix-layout-fixW80"><?=$Text['id'];?></th>
<th><?=$Text['name_person'];?></th>
- <th><?=$Text['active'];?></th>
- <th><p class="textAlignCenter"><?=$Text['uf_short'];?></p></th>
- <th><?php echo $Text['contact']; ?></th>
+ <th class="aix-layout-fixW80"><?=$Text['active'];?></th>
+ <th class="aix-layout-fixW80"><?=$Text['uf_short'];?></th>
+ <th><?php echo $Text['phone_pl']; ?></th>
+ <th><?php echo $Text['email']; ?></th>
</tr>
</thead>
<tbody>
@@ -865,11 +873,8 @@ function switchTo(section){
<td><p>{name}</p></td>
<td><p class="textAlignCenter">{active}</p></td>
<td><?=$Text['uf_short'];?>{uf_id}</td>
- <td><p>
- {phone1} / {phone2}<br/>
- {email}
- </p>
- </td>
+ <td>{phone1} / {phone2}</p></td>
+ <td>{email}</td>
</tr>
</tbody>
</table>
View
118 php/ctrl/Install.php
@@ -1,9 +1,10 @@
<?php
-
+define('DS', DIRECTORY_SEPARATOR);
+define('__ROOT__', dirname(dirname(dirname(__FILE__))).DS);
+require_once(__ROOT__ . 'php'.DS.'utilities'.DS.'general.php');
$config_dir = 'local_config/';
-$log = "Starting installation process.\n";
function process_language_file($coop_name, $lang_file)
{
@@ -11,11 +12,13 @@ function process_language_file($coop_name, $lang_file)
$tmpname = $lang_file . '.tmp';
copy($lang_file, $tmpname);
$inhandle = @fopen($tmpname, 'r');
- if (!$inhandle)
+ if (!$inhandle) {
throw new Exception("Couldn't open {$tmpname} for reading");
+ }
$outhandle = @fopen($lang_file, 'w');
- if (!$outhandle)
+ if (!$outhandle) {
throw new Exception("Couldn't open {$lang_file} for writing");
+ }
while(!feof($inhandle)) {
$buffer = fgets($inhandle, 4096);
if (strpos($buffer, 'Aixada') !== false) {
@@ -23,7 +26,9 @@ function process_language_file($coop_name, $lang_file)
$buffer = str_replace('The New ', '', $buffer);
}
fwrite($outhandle, $buffer);
- }}
+ }
+ return 0;
+}
function process_languages($coop_name)
{
@@ -40,11 +45,13 @@ function create_setup_file($db_name)
$aixada_filename = $config_dir . 'aixada_setup.sql';
$db_filename = $config_dir . "{$db_name}_setup.sql";
$inhandle = @fopen($aixada_filename, 'r');
- if (!$inhandle)
+ if (!$inhandle) {
throw new Exception("Couldn't open {$aixada_filename} for reading");
+ }
$outhandle = @fopen($db_filename, 'w');
- if (!$outhandle)
+ if (!$outhandle) {
throw new Exception("Couldn't open {$db_filename} for writing");
+ }
while (!feof($inhandle)) {
$buffer = fgets($inhandle);
if (strpos($buffer, 'drop database') !== false or
@@ -56,6 +63,7 @@ function create_setup_file($db_name)
$buffer = str_replace('source ', 'source sql/', $buffer);
fwrite($outhandle, $buffer);
}
+ return 0;
}
function clear_results($mysqli)
@@ -100,8 +108,9 @@ function create_tables($db_name, $mysqli)
}
foreach ($files as $filename) {
$handle = @fopen($filename, 'r');
- if (!$handle)
+ if (!$handle) {
throw new Exception("Couldn't open {$filename}");
+ }
if (in_array($filename, $dump_files)) {
$mysqli->query('call delete_member(-1);');
clear_results($mysqli);
@@ -109,6 +118,7 @@ function create_tables($db_name, $mysqli)
create_table($handle, $mysqli);
fclose($handle);
}
+ return 0;
}
function create_queries($mysqli)
@@ -117,8 +127,9 @@ function create_queries($mysqli)
$direntries = scandir($querydir);
foreach ($direntries as $filename) {
$handle = @fopen($querydir . $filename, 'r');
- if (!$handle)
+ if (!$handle) {
throw new Exception("Couldn't open {$filename}");
+ }
$cmd = '';
while(!feof($handle)) {// and strpos($buffer, 'end|') === false) {
$buffer = fgets($handle, 4096);
@@ -128,12 +139,12 @@ function create_queries($mysqli)
$mysqli->multi_query(str_replace('|', ';', $cmd));
clear_results($mysqli);
}
+ return 0;
}
function create_database($db_name, $mysqli)
{
- create_tables($db_name, $mysqli);
- create_queries($mysqli);
+ return create_tables($db_name, $mysqli) or create_queries($mysqli);
}
function create_config_file($host, $user, $password, $db_name, $language)
@@ -167,55 +178,50 @@ function create_config_file($host, $user, $password, $db_name, $language)
}
try {
- $log .= "Extracting data you entered on the installation page...\n";
- foreach (array('db_host', 'db_user', 'db_pwd', 'db_name', // 'pref_lang',
- 'user_login', 'user_password') as $f) {
- if (!isset($_REQUEST[$f]))
- die ("Field " . $f . " is not set.");
- }
-
- $host = $_REQUEST['db_host'];
- $user = $_REQUEST['db_user'];
- $password = $_REQUEST['db_pwd'];
- $db_name = $_REQUEST['db_name'];
- $pref_lang = (isset($_REQUEST['pref_lang']) ? $_REQUEST['pref_lang'] : 'en');
- $user_login = $_REQUEST['user_login'];
- $user_password = crypt($_REQUEST['user_password'], 'ax');
- $first_uf = $_REQUEST['first_uf'];
+ $host = get_param('db_host');
+ $user = get_param('db_user');
+ $password = get_param('db_pwd');
+ $db_name = get_param('db_name');
+ $pref_lang = get_param('pref_lang', 'en');
+ $first_uf = get_param('first_uf');
+ $user_login = get_param('user_login');
+ $user_password = crypt(get_param('user_password'), 'ax');
+ $retype_password = crypt(get_param('retype_password'), 'ax');
+ if ($user_password != $retype_password)
+ throw new Exception("The two instances of the password for the first user don't match");
+ $oper = get_param('oper');
+ if ($oper=='validate') return 0;
- $log .= "Connecting to database...\n";
$mysqli = new mysqli($host, $user, $password, $db_name);
- if (mysqli_connect_errno())
- throw new Exception('Unable to connect to database. ' . mysqli_connect_error());
-
- $coop_name = $mysqli->real_escape_string($_REQUEST['coop_name']);
- $log .= "Processing language files...\n";
- process_languages($coop_name);
-
- $log .= "Creating setup file for database...\n";
- create_setup_file($db_name);
-
- $log .= "Creating database...\n";
- create_database($db_name, $mysqli);
-
- $log .= "Creating configuration file...\n";
- create_config_file($host, $user, $password, $db_name, $pref_lang);
-
- $log .= "call register_special_user('{$user_login}', '{$user_password}', '{$pref_lang}', '{$first_uf}');";
- $mysqli->query("call register_special_user('{$user_login}', '{$user_password}', '{$pref_lang}', '{$first_uf}');");
-
- $log .= "done.\n";
- echo $log;
-
- $handle = @fopen('local_config/log.txt', 'w');
- fwrite($handle, $log);
-
- header("Location:login.php");
+ if (mysqli_connect_errno())
+ throw new Exception('Unable to connect to database. ' . mysqli_connect_error());
+ if ($oper == 'connect') return 0;
+
+ switch ($oper) {
+ case 'lang':
+ $coop_name = $mysqli->real_escape_string($_REQUEST['coop_name']);
+ return process_languages($coop_name);
+
+ case 'create_setup':
+ return create_setup_file($db_name);
+
+ case 'create_database':
+ return create_database($db_name, $mysqli);
+
+ case 'create_config_file':
+ return create_config_file($host, $user, $password, $db_name, $pref_lang);
+
+ case 'create_user':
+ return $mysqli->query("call register_special_user('{$user_login}', '{$user_password}', '{$pref_lang}', '{$first_uf}');");
+
+ default:
+ throw new Exception ('Action "' . $action . '" not recognized');
+ }
}
catch(Exception $e) {
- echo $log;
- header('HTTP/1.0 401 ' . $e->getMessage());
- die($e->getMessage());
+ echo $e->getMessage();
+ header('HTTP/1.0 401 ' . $e->getMessage());
+ // die($e->getMessage());
}
?>
View
2  php/ctrl/UserAndUf.php
@@ -25,7 +25,7 @@
exit;
case 'createUF':
- printXML(stored_query_XML_fields('create_uf', get_param('name'), get_param('mentor_uf',0)));
+ printXML(stored_query_XML_fields('create_uf', get_param('name'), get_param('mentor_uf',0), get_session_user_id() ));
exit;
case 'editUF':
View
4 php/inc/authentication.inc.php
@@ -64,12 +64,12 @@ public function check_credentials($login, $password)
throw new AuthException($Text['msg_err_incorrectLogon']);
}
- if (!array_key_exists('uf_id', $row) or intval($row['uf_id']) == 0) {
+ if ($row['id'] > 1 and (!array_key_exists('uf_id', $row) or intval($row['uf_id']) == 0)) {
global $Text;
throw new AuthException($Text['msg_err_noUfAssignedYet']);
}
- if (!array_key_exists('is_active_member', $row) or intval($row['is_active_member']) == 0) {
+ if ($row['id'] > 1 and (!array_key_exists('is_active_member', $row) or intval($row['is_active_member']) == 0)) {
global $Text;
throw new AuthException($Text['msg_err_deactivatedUser']);
}
View
4 php/inc/menu2.inc.php
@@ -108,8 +108,8 @@
<li><a href="#TODO"><?php echo $Text['nav_mng_admin'];?></a>
<ul>
<li><a href="manage_admin.php"><?php echo $Text['nav_mng_db'];?></a></li>
- <li><a href="#TODO"><?php echo $Text['nav_mng_users'];?></a></li>
- <li><a href="#TODO"><?php echo $Text['nav_mng_access_rights'];?></a></li>
+ <!-- li><a href="#TODO"><?php echo $Text['nav_mng_users'];?></a></li>
+ <li><a href="#TODO"><?php echo $Text['nav_mng_access_rights'];?></a></li-->
</ul>
</li>
View
11 php/utilities/general.php
@@ -81,13 +81,10 @@ function get_session_language(){
* returns the theme for the logged user
*/
function get_session_theme(){
- if (isset($_SESSION['userdata']['theme'])
- and $_SESSION['userdata']['theme'] != ''
- and $_SESSION['userdata']['theme'] != '1'
- ) {
- return $_SESSION['userdata']['theme'];
+ if (isset($_SESSION['userdata']['theme']) and $_SESSION['userdata']['theme'] != '') {
+ return $_SESSION['userdata']['theme'];
} else {
- return configuration_vars::get_instance()->default_theme;
+ return configuration_vars::get_instance()->default_theme;
}
}
@@ -124,7 +121,7 @@ function get_param($param_name, $default=null, $transform = ''){
if (($value == '' || $value == 'undefined') && isset($default)){
$value = $default;
} else if (($value == '' || $value == 'undefined') && !isset($default)) {
- throw new Exception("get_param: Parameter: {$param_name} has no value and $default value is not set either");
+ throw new Exception("get_param: Parameter: {$param_name} has no value and no default value");
}
} else if (isset($default) and $default !== null){
View
4 php/utilities/useruf.php
@@ -95,8 +95,8 @@ function extract_user_form_values(){
$fields["phone2"] = get_param('phone2','');
$fields["web"] = get_param('web','');
$fields["notes"] = get_param('notes','');
- $fields["active"] = get_param('member_active',0);
- $fields["participant"] = get_param('participant',1);
+ $fields["active"] = isset($_REQUEST['member_active'])? 1:0; //this is a checkbox; gets send when checked, otherwise not
+ $fields["participant"] = isset($_REQUEST['participant'])? 1:0;
$fields["adult"] = get_param('adult',1);
$fields["language"] = get_param('language','en');
View
17 sql/Makefile
@@ -1,8 +1,11 @@
QUERIES = $(wildcard queries/*sql)
+DB_NAME = aixadac
+DB_USER = aixada
+DB_PASSWD = aixada
+DB_DUMP = aixada_current_dump.sql
-all: aixada.png setup/all \
- #database-definition.up-to-date
- database-queries.up-to-date
+
+all: aixada.png setup/all database-definition.up-to-date database-queries.up-to-date
##aixada.png: aixada.sql
## sqlt-diagram -d=MySQL aixada.sql -o aixada.png --color
@@ -10,12 +13,12 @@ all: aixada.png setup/all \
setup/all:
$(MAKE) -C setup
-database-definition.up-to-date: aixada.sql setup/aixada_setup_details.sql $(wildcard migration/*sql)
- mysql -e -u aixada -p aixada "source ../local_config/aixada_setup.sql; source aixada_migrate.sql;"
+database-definition.up-to-date: aixada.sql $(DB_DUMP) dbUpgradeAixada2.1ToAixada2.5.sql
+ mysql --default-character-set=utf8 -u $(DB_USER) --password="$(DB_PASSWD)" -e "drop database $(DB_NAME); create database $(DB_NAME); use $(DB_NAME); source $(DB_DUMP); source dbUpgradeAixada2.1ToAixada2.5.sql;"
touch database-definition.up-to-date
-database-queries.up-to-date: $(QUERIES)
- mysql -e "use aixada; source aixada_setup_queries.sql;"
+database-queries.up-to-date: aixada_setup_queries.sql $(QUERIES)
+ mysql -u $(DB_USER) --password="$(DB_PASSWD)" -e "use $(DB_NAME); source aixada_setup_queries.sql;"
touch database-queries.up-to-date
clean:
View
20 sql/aixada_manual_install.sql
@@ -0,0 +1,20 @@
+/**
+ * This script should be called from your mysql terminal inside the
+ * Aixada/sql directory. It will create the database structure,
+ * insert some default values including an admin user and
+ * setup all the stored procedures for you.
+ *
+ * The default admin user/pwd is: admin/admin. Be sure to change
+ * the admin password upon first logon!!
+ */
+-- create db tables --
+source aixada.sql;
+
+-- insert default values--
+source setup/aixada_insert_defaults.sql;
+
+-- create admin --
+source setup/aixada_insert_default_user.sql;
+
+-- source the stored procedures --
+source setup/aixada_setup_queries.sql;
View
0  sql/aixada_migrate.sql → sql/dbUpgradeAixada1ToAixada2.1.sql
File renamed without changes
View
3  sql/dbUpgradeToAixada2.5.sql → sql/dbUpgradeAixada2.1ToAixada2.5.sql
@@ -35,7 +35,8 @@ values
('deposit','register the inpayment of cash'),
('bill','register withdrawal for bill payment to provider'),
('correction','by-hand correction of account balance'),
- ('withdrawal','default cash withdrawal');
+ ('withdrawal','default cash withdrawal'),
+ ('setup', 'account setup');
/**
View
75 sql/queries/aixada_queries_useruf.sql
@@ -34,7 +34,7 @@ end |
* creates a new uf
*/
drop procedure if exists create_uf|
-create procedure create_uf(in the_name varchar(255), in the_mentor_uf int)
+create procedure create_uf(in the_name varchar(255), in the_mentor_uf int, in the_operator_id int)
begin
declare last_id int;
start transaction;
@@ -51,9 +51,17 @@ begin
values
(last_id + 1, the_name, 1, the_mentor_uf);
+
insert into
- aixada_account (account_id, balance)
- values (1000 + last_id + 1, 0);
+ aixada_account (account_id, quantity, payment_method_id, description, operator_id, ts, balance)
+ values (
+ 1000 + last_id + 1,
+ 0,
+ 11,
+ 'account setup',
+ the_operator_id,
+ now(),
+ 0);
commit;
@@ -389,56 +397,6 @@ begin
and password = the_password;
end|
-/*
-drop procedure if exists users_without_ufs|
-create procedure users_without_ufs()
-begin
- select
- u.id,
- u.login
- from aixada_user u
- where u.id between 0 and 999
- and not exists
- (select auf.id
- from aixada_uf auf
- left join aixada_user au
- on auf.id = au.uf_id
- where au.id = u.id);
-end|
-
-drop procedure if exists users_without_uf|
-create procedure users_without_uf()
-begin
- select id, login, email, created_on as created
- from aixada_user
- where id between 1 and 999 and
- isnull(uf_id);
-end|
-
-drop procedure if exists users_without_member|
-create procedure users_without_member()
-begin
- select id, login, email, created_on as created
- from aixada_user
- where id between 1 and 999 and
- isnull(member_id);
-end|
-*/
-
-
-/*
-drop procedure if exists member_id_of_user_id|
-create procedure member_id_of_user_id(in the_user_id int)
-begin
- select m.id
- from aixada_user u
- left join aixada_member m
- on u.member_id = m.id
- where u.id = the_user_id;
-end|
-*/
-
-
drop procedure if exists check_credentials|
@@ -480,17 +438,6 @@ end|
-
-
-
-
-
-
-
-
-
-
-
drop procedure if exists register_special_user|
create procedure register_special_user(
in the_login varchar(50),