Removed obsolete stock_moves.visible field; changed add_stock_move() prototype.
[fa-stable.git] / doc / api_changes.txt
1 Changes in framework API introduced in FrontAccounting 2.4
2 ----------------------------------------------------------
3 The list does not contain changes made in user interface files.
4
5 Changed functions:
6  company_db_inc: 
7         update_company_prefs($params)
8         get_company_pref($prefs = null)
9         get_company_prefs()
10  maintenance_db.inc:
11         db_backup($conn, $ext='no', $comm='', $path='')
12         db_export($conn, $filename, $zip='no', $comment='', $no_default=false)
13         save_to_file($path, $zip, $fileData)
14  tax_types_db.inc:
15         get_tax_type_default_rate($type_id) => get_tax_type_rate($type_id)
16  inventory_db.inc:
17         get_stock_moves($type, $type_no)
18         add_stock_move($type, $stock_id, $trans_no, $location, $date_, $reference, $quantity, $std_cost, 
19                 $person_id=0, $price=0, $discount_percent=0, $error_msg="")
20
21 Before 2.4:
22         get_tax_type_default_rate($type_id)
23 Now:
24         get_tax_type_rate($type_id)
25 Description:
26         Misleading function name changed.
27
28 Before 2.4:
29         update_company_prefs( $params, $pref = TB_PREF )
30 Now:
31         update_company_prefs($params)
32 Description:
33         $pref parameter has been removed. All calls should be done after switch to selected company database with 
34         set_global_connection($company).
35
36 Before 2.4:
37         get_company_pref($prefs = null, $tbpref = null)
38 Now:
39         get_company_pref($prefs = null)
40 Description:
41         $tbpref parameter has been removed. All calls should be done after switch to selected company database with 
42         set_global_connection($company).
43
44 Before 2.4:
45         get_company_prefs($tbpref = TB_PREF)
46 Now:
47         get_company_prefs()
48 Description:
49         $tbpref parameter has been removed. All calls should be done after switch to selected company database with 
50         set_global_connection($company).
51
52 Before 2.4:
53         db_backup($conn, $ext='no', $comm='', $tbpref = TB_PREF)
54 Now:
55         db_backup($conn, $ext='no', $comm='', $path='')
56 Description: 
57         $tbpref parameter has been removed. Calls should be done after switch to selected company database with 
58         set_global_connection($company).
59         $path parameter has been added: path to storage directory for generated backup file. If not set defaults to BACKUP_PATH.
60
61 Before 2.4:
62         db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF, $no_default=false)
63 Now:
64         db_export($conn, $filename, $zip='no', $comment='')
65 Description:
66         $tbpref parameter has been removed. Calls should be done after switch to selected company database with 
67         set_global_connection($company). Also removed obsolete $no_default parameter.
68         $filename now have to contain full path to target directory.
69
70 Before 2.4:
71         save_to_file($backupfile, $zip, $fileData)
72 Now:
73         save_to_file($path, $zip, $fileData)
74 Description:
75         $path parameter have to contain full path to file, no assumptions to target folder is done inside function.
76
77 Before 2.4:
78         add_stock_move($type, $stock_id, $trans_no, $location, $date_, $reference, $quantity, $std_cost, 
79                 $person_id=0, $show_or_hide=1, $price=0, $discount_percent=0, $error_msg="")
80 Now:
81         add_stock_move($type, $stock_id, $trans_no, $location, $date_, $reference, $quantity, $std_cost, 
82                 $person_id=0, $price=0, $discount_percent=0, $error_msg="")
83 Description:
84         Removed parameter $show_or_hide (obsolete after `visible` field removal).
85
86 Before 2.4:
87         get_stock_moves($type, $type_no, $visible=false)
88 Now:
89         get_stock_moves($type, $type_no)
90 Description:
91         Removed parameter $visible (obsolete after `visible` field removal).