diff --git a/UI/Reports/filters/gl.html b/UI/Reports/filters/gl.html index 838f5fb3c7..5e1ae53a9d 100644 --- a/UI/Reports/filters/gl.html +++ b/UI/Reports/filters/gl.html @@ -301,12 +301,6 @@ type="checkbox" value="1" } %] [% text('Cleared') %] - [% PROCESS input element_data = { - name="col_till" - class="checkbox" - type="checkbox" - value="1" - } %] [% text('Till') %] [% PROCESS input element_data = { diff --git a/UI/Reports/filters/invoice_outstanding.html b/UI/Reports/filters/invoice_outstanding.html index 982a30c702..574f280933 100644 --- a/UI/Reports/filters/invoice_outstanding.html +++ b/UI/Reports/filters/invoice_outstanding.html @@ -246,12 +246,6 @@ value = '1' label = text('Notes') } %] - [% PROCESS input element_data = { - name = 'col_till' - type = 'checkbox' - value = '1' - label = text('Till') - } %] [% PROCESS input element_data = { diff --git a/UI/Reports/filters/invoice_search.html b/UI/Reports/filters/invoice_search.html index 399d260a1e..e7525e8cc2 100644 --- a/UI/Reports/filters/invoice_search.html +++ b/UI/Reports/filters/invoice_search.html @@ -393,12 +393,6 @@ value = '1' label = text('Notes') } %] - [% PROCESS input element_data = { - name = 'col_till' - type = 'checkbox' - value = '1' - label = text('Till') - } %] [% PROCESS input element_data = { diff --git a/lib/LedgerSMB/Report/GL.pm b/lib/LedgerSMB/Report/GL.pm index cfa32f8764..2d879d504b 100644 --- a/lib/LedgerSMB/Report/GL.pm +++ b/lib/LedgerSMB/Report/GL.pm @@ -166,11 +166,6 @@ sub columns { type => 'text', pwidth => '3', }, - {col_id => 'till', - name => $self->Text('Till'), - type => 'text', - pwidth => '1', }, - {col_id => 'chart_id', name => $self->Text('Chart ID'), type => 'text', diff --git a/lib/LedgerSMB/Report/Invoices/Outstanding.pm b/lib/LedgerSMB/Report/Invoices/Outstanding.pm index efe39d9357..dba8a259af 100644 --- a/lib/LedgerSMB/Report/Invoices/Outstanding.pm +++ b/lib/LedgerSMB/Report/Invoices/Outstanding.pm @@ -157,8 +157,6 @@ has '+order_by' => (default => 'meta_number'); =item notes -=item till - =item employee_name =item manager_name @@ -274,10 +272,6 @@ sub columns { name => $self->Text('Notes'), type => 'text', pwidth => 15, }, - {col_id => 'till', - name => $self->Text('Till'), - type => 'text', - pwidth => 8, }, {col_id => 'salesperson', name => $self->Text('Salesperson'), type => 'text', diff --git a/lib/LedgerSMB/Report/Invoices/Transactions.pm b/lib/LedgerSMB/Report/Invoices/Transactions.pm index 191ae0298d..2d96092923 100644 --- a/lib/LedgerSMB/Report/Invoices/Transactions.pm +++ b/lib/LedgerSMB/Report/Invoices/Transactions.pm @@ -224,8 +224,6 @@ This is the customer or vendor name =item notes text -=item till text - =item salesperson text =item manager text @@ -302,9 +300,6 @@ sub columns { { col_id => 'notes', name => $self->Text('Notes'), type => 'text'}, - { col_id => 'till', - name => $self->Text('Till'), - type => 'text'}, { col_id => 'salesperson', name => $self->Text('Salesperson'), type => 'text'}, diff --git a/old/lib/LedgerSMB/IS.pm b/old/lib/LedgerSMB/IS.pm index ec68c3e73b..e9ea3cf9c0 100644 --- a/old/lib/LedgerSMB/IS.pm +++ b/old/lib/LedgerSMB/IS.pm @@ -1189,7 +1189,6 @@ sub post_invoice { taxincluded = ?, curr = ?, person_id = ?, - till = ?, language_code = ?, ponumber = ?, approved = ?, @@ -1212,7 +1211,7 @@ sub post_invoice { $form->{terms}, $form->{notes}, $form->{intnotes}, $form->{taxincluded}, $form->{currency}, - $form->{employee_id}, $form->{till}, + $form->{employee_id}, $form->{language_code}, $form->{ponumber}, $approved, $form->{crdate} || 'today', $form->{reverse}, $form->{is_return}, $form->{setting_sequence}, @@ -1255,7 +1254,7 @@ sub retrieve_invoice { a.shippingpoint, a.shipvia, a.terms, a.notes, a.intnotes, a.duedate, a.taxincluded, a.curr AS currency, - a.person_id as employee_id, e.name AS employee, a.till, + a.person_id as employee_id, e.name AS employee, a.reverse, a.entity_credit_account as customer_id, a.language_code, a.ponumber, a.crdate, a.on_hold, a.description, a.setting_sequence, diff --git a/sql/changes/1.11/aa-column-cleanup.sql b/sql/changes/1.11/aa-column-cleanup.sql new file mode 100644 index 0000000000..1240fda358 --- /dev/null +++ b/sql/changes/1.11/aa-column-cleanup.sql @@ -0,0 +1,9 @@ + +alter table ar + drop column entity_id, + drop column till; + +alter table ap + drop column entity_id, + drop column till; + diff --git a/sql/changes/1.11/rm-aa-entity_id.sql b/sql/changes/1.11/rm-aa-entity_id.sql deleted file mode 100644 index a45aa5c098..0000000000 --- a/sql/changes/1.11/rm-aa-entity_id.sql +++ /dev/null @@ -1,3 +0,0 @@ - -alter table ar drop column entity_id; -alter table ap drop column entity_id; diff --git a/sql/changes/LOADORDER b/sql/changes/LOADORDER index 7094dbfe0a..cc2766e66c 100644 --- a/sql/changes/LOADORDER +++ b/sql/changes/LOADORDER @@ -177,5 +177,5 @@ mc/delete-migration-validation-data.sql 1.11/enable-barcode-on-invoices.sql 1.11/reversed-transactions.sql 1.11/negative-assets-liablilities-reclass.sql -1.11/rm-aa-entity_id.sql 1.11/ar-ap-role-naming-consistency.sql +1.11/aa-column-cleanup.sql diff --git a/sql/modules/Report.sql b/sql/modules/Report.sql index 3a2f5588ba..5714093ad0 100644 --- a/sql/modules/Report.sql +++ b/sql/modules/Report.sql @@ -60,7 +60,6 @@ CREATE TYPE report_aging_item AS ( "language" text, invnumber text, transdate date, - till text, ordnumber text, ponumber text, notes text, @@ -103,7 +102,7 @@ RETURN QUERY EXECUTE $sql$ ) SELECT c.entity_id, c.meta_number::text, e.name, e.name as contact_name, c.language_code::text as "language", - a.invnumber, a.transdate, a.till::text, a.ordnumber, + a.invnumber, a.transdate, a.ordnumber, a.ponumber, a.notes, CASE WHEN a.age/30 = 0 THEN (a.sign * sum(ac.amount_bc)) @@ -129,7 +128,7 @@ RETURN QUERY EXECUTE $sql$ JOIN invoice i ON (i.parts_id = p.id) WHERE i.trans_id = a.id) AS line_items, (coalesce($5, now())::date - a.transdate) as age - FROM (select id, invnumber, till, ordnumber, amount_bc, duedate, + FROM (select id, invnumber, ordnumber, amount_bc, duedate, curr, ponumber, notes, entity_credit_account, -1 AS sign, transdate, force_closed, CASE WHEN $7 @@ -178,7 +177,7 @@ RETURN QUERY EXECUTE $sql$ GROUP BY c.entity_id, c.meta_number, e.name, c.language_code, l.line_one, l.line_two, l.line_three, l.city, l.state, l.mail_code, country.name, - a.invnumber, a.transdate, a.till, a.ordnumber, + a.invnumber, a.transdate, a.ordnumber, a.ponumber, a.notes, a.amount_bc, a.sign, a.duedate, a.id, a.curr, a.age HAVING ($6 is null @@ -237,7 +236,6 @@ CREATE TYPE gl_report_item AS ( amount_tc numeric, accno text, gifi_accno text, - till text, cleared bool, memo text, accname text, @@ -290,7 +288,7 @@ FOR retval IN ) SELECT g.id, g.type, g.invoice, g.reference, g.eca_name, g.description, ac.transdate, ac.source, ac.amount_bc, ac.curr, ac.amount_tc, c.accno, c.gifi_accno, - g.till, ac.cleared, ac.memo, c.description AS accname, + ac.cleared, ac.memo, c.description AS accname, ac.chart_id, ac.entry_id, sum(ac.amount_bc) over (order by ac.transdate, ac.trans_id, c.accno, ac.entry_id) @@ -298,18 +296,16 @@ FOR retval IN as running_balance, array_agg(ARRAY[bac.class_id, bac.bu_id]) FROM (select id, 'gl' as type, false as invoice, reference, - null::text as eca_name, description, approved, - null::text as till + null::text as eca_name, description, approved FROM gl UNION - SELECT ar.id, 'ar', invoice, invnumber, e.name, ar.description, approved, till + SELECT ar.id, 'ar', invoice, invnumber, e.name, ar.description, approved FROM ar JOIN entity_credit_account eca ON ar.entity_credit_account = eca.id JOIN entity e ON e.id = eca.entity_id UNION - SELECT ap.id, 'ap', invoice, invnumber, e.name, ap.description, approved, - null as till + SELECT ap.id, 'ap', invoice, invnumber, e.name, ap.description, approved FROM ap JOIN entity_credit_account eca ON ap.entity_credit_account = eca.id @@ -350,7 +346,7 @@ FOR retval IN AND (in_category = c.category OR in_category IS NULL) GROUP BY g.id, g.type, g.invoice, g.reference, g.eca_name, g.description, ac.transdate, ac.source, ac.amount_bc, c.accno, c.gifi_accno, - g.till, ac.cleared, ac.memo, c.description, + ac.cleared, ac.memo, c.description, ac.chart_id, ac.entry_id, ac.trans_id HAVING in_business_units is null or in_business_units <@ compound_array(bu_tree.path) @@ -425,7 +421,6 @@ CREATE TYPE aa_transactions_line AS ( last_payment date, due_date date, notes text, - till text, salesperson text, manager text, shipping_point text, @@ -447,10 +442,10 @@ SELECT a.id, a.invoice, eeca.id, eca.meta_number::text, eeca.name, a.transdate, a.invnumber, a.ordnumber, a.ponumber, a.curr, a.amount_bc, a.netamount_bc, a.amount_bc - a.netamount_bc as tax, a.amount_bc - p.due as paid, p.due, p.last_payment, a.duedate, a.notes, - a.till::text, ee.name, me.name, a.shippingpoint, a.shipvia, + ee.name, me.name, a.shippingpoint, a.shipvia, '{}'::text[] as business_units -- TODO FROM (select id, transdate, invnumber, curr, amount_bc, netamount_bc, duedate, - notes, till, person_id, entity_credit_account, invoice, + notes, person_id, entity_credit_account, invoice, shippingpoint, shipvia, ordnumber, ponumber, description, on_hold, force_closed FROM ar @@ -524,7 +519,7 @@ SELECT null::int as id, null::bool as invoice, entity_id, meta_number::text, null::text as ordnumber, null::text as ponumber, curr, sum(amount) as amount, sum(netamount) as netamount, sum(tax) as tax, sum(paid) as paid, sum(due) as due, max(last_payment) as last_payment, - null::date as duedate, null::text as notes, null::text as till, + null::date as duedate, null::text as notes, null::text as salesperson, null::text as manager, null::text as shipping_point, null::text as ship_via, null::text[] as business_units @@ -580,12 +575,12 @@ SELECT a.id, a.invoice, eeca.id, eca.meta_number::text, eeca.name, a.amount_bc - a.netamount_bc as tax, a.amount_bc - p.due, p.due, p.last_payment, a.duedate, a.notes, - a.till::text, eee.name as employee, mee.name as manager, a.shippingpoint, + eee.name as employee, mee.name as manager, a.shippingpoint, a.shipvia, '{}'::text[] FROM (select id, transdate, invnumber, curr, amount_bc, netamount_bc, duedate, notes, - till, person_id, entity_credit_account, invoice, shippingpoint, + person_id, entity_credit_account, invoice, shippingpoint, shipvia, ordnumber, ponumber, description, on_hold, force_closed FROM ar WHERE $1 = 2