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