Inventory Transfer: removed movement type from transfer form, cleanups.
[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 or local functions.
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, $person_id=0, $price=0)
19  sales_db.inc:
20         add_stock_move_customer() removed
21  items_transfer_db.inc:
22         add_stock_transfer($Items, $location_from, $location_to, $date_, $reference, $memo_)
23
24 Before 2.4:
25         get_tax_type_default_rate($type_id)
26 Now:
27         get_tax_type_rate($type_id)
28 Description:
29         Misleading function name changed.
30
31 Before 2.4:
32         update_company_prefs( $params, $pref = TB_PREF )
33 Now:
34         update_company_prefs($params)
35 Description:
36         $pref parameter has been removed. All calls should be done after switch to selected company database with 
37         set_global_connection($company).
38
39 Before 2.4:
40         get_company_pref($prefs = null, $tbpref = null)
41 Now:
42         get_company_pref($prefs = null)
43 Description:
44         $tbpref parameter has been removed. All calls should be done after switch to selected company database with 
45         set_global_connection($company).
46
47 Before 2.4:
48         get_company_prefs($tbpref = TB_PREF)
49 Now:
50         get_company_prefs()
51 Description:
52         $tbpref parameter has been removed. All calls should be done after switch to selected company database with 
53         set_global_connection($company).
54
55 Before 2.4:
56         db_backup($conn, $ext='no', $comm='', $tbpref = TB_PREF)
57 Now:
58         db_backup($conn, $ext='no', $comm='', $path='')
59 Description: 
60         $tbpref parameter has been removed. Calls should be done after switch to selected company database with 
61         set_global_connection($company).
62         $path parameter has been added: path to storage directory for generated backup file. If not set defaults to BACKUP_PATH.
63
64 Before 2.4:
65         db_export($conn, $filename, $zip='no', $comment='', $tbpref = TB_PREF, $no_default=false)
66 Now:
67         db_export($conn, $filename, $zip='no', $comment='')
68 Description:
69         $tbpref parameter has been removed. Calls should be done after switch to selected company database with 
70         set_global_connection($company). Also removed obsolete $no_default parameter.
71         $filename now have to contain full path to target directory.
72
73 Before 2.4:
74         save_to_file($backupfile, $zip, $fileData)
75 Now:
76         save_to_file($path, $zip, $fileData)
77 Description:
78         $path parameter have to contain full path to file, no assumptions to target folder is done inside function.
79
80 Before 2.4:
81         add_stock_move($type, $stock_id, $trans_no, $location, $date_, $reference, $quantity, $std_cost, 
82                 $person_id=0, $show_or_hide=1, $price=0, $discount_percent=0, $error_msg="")
83 Now:
84         add_stock_move($type, $stock_id, $trans_no, $location, $date_, $reference, $quantity, $std_cost, 
85                 $person_id=0, $price=0)
86 Description:
87         Removed parameters $show_or_hide, $discount_percent and $error_msg as obsolete after removal of related stock_moves fields.
88
89 Before 2.4:
90         get_stock_moves($type, $type_no, $visible=false)
91 Now:
92         get_stock_moves($type, $type_no)
93 Description:
94         Removed parameter $visible (obsolete after `visible` field removal).
95
96 Before 2.4
97         add_stock_move_customer($type, $stock_id, $trans_id, $location, $date_, $reference,
98                 $quantity, $std_cost, $price=0, $discount_percent=0)
99 Now:
100         None
101 Description:
102         Obsolete and removed.
103
104 Before 2.4:
105         add_stock_transfer($Items, $location_from, $location_to, $date_, $type, $reference, $memo_)
106 Now:
107         add_stock_transfer($Items, $location_from, $location_to, $date_, $reference, $memo_)
108 Description:
109         Removed obsolete $type argument.