View | Details | Raw Unified | Return to bug 24163
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_24163.perl (+18 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{
4
        INSERT IGNORE INTO export_format( profile, description, content, csv_separator, type, used_for ) VALUES
5
        ("Late orders (csv profile)", "default CSV export for late orders", 'Title[% separator %]Author[% separator %]Publication year[% separator %]ISBN[% separator %]Quantity[% separator %]Number of claims
6
        [% FOR order IN orders ~%]
7
        [%~ SET biblio = order.biblio ~%]
8
        "[% biblio.title %]"[% separator ~%]
9
        "[% biblio.author %]"[% separator ~%]
10
        "[% bibio.biblioitem.publicationyear %]"[% separator ~%]
11
        "[% biblio.biblioitem.isbn %]"[% separator ~%]
12
        "[% order.quantity%]"[% separator ~%]
13
        "[% order.claims.count%][% IF order.claims.count %]([% FOR c IN order.claims %][% c.claimed_on | $KohaDates %][% UNLESS loop.last %], [% END %][% END %])[% END %]"
14
        [% END %]', ",", "sql", "late_orders")
15
    });
16
    SetVersion( $DBversion );
17
    print "Upgrade to $DBversion done (Bug 24163 - Define a default CSV profile for late orders)\n";
18
}
(-)a/installer/data/mysql/en/optional/csv_profiles.sql (-3 / +12 lines)
Lines 1-2 Link Here
1
INSERT IGNORE INTO export_format( profile, description, content, csv_separator, type, used_for ) 
1
INSERT IGNORE INTO export_format( profile, description, content, csv_separator, type, used_for ) VALUES
2
VALUES ( "issues to claim", "default CSV export for serial issue claims", "SUPPLIER=aqbooksellers.name|TITLE=subscription.title|ISSUE NUMBER=serial.serialseq|LATE SINCE=serial.planneddate", ",", "sql", "late_issues" );
2
( "issues to claim", "default CSV export for serial issue claims", "SUPPLIER=aqbooksellers.name|TITLE=subscription.title|ISSUE NUMBER=serial.serialseq|LATE SINCE=serial.planneddate", ",", "sql", "late_issues" ),
3
("Late orders (csv profile)", "default CSV export for late orders", 'Title[% separator %]Author[% separator %]Publication year[% separator %]ISBN[% separator %]Quantity[% separator %]Number of claims
4
[% FOR order IN orders ~%]
5
[%~ SET biblio = order.biblio ~%]
6
"[% biblio.title %]"[% separator ~%]
7
"[% biblio.author %]"[% separator ~%]
8
"[% bibio.biblioitem.publicationyear %]"[% separator ~%]
9
"[% biblio.biblioitem.isbn %]"[% separator ~%]
10
"[% order.quantity%]"[% separator ~%]
11
"[% order.claims.count%][% IF order.claims.count %]([% FOR c IN order.claims %][% c.claimed_on | $KohaDates %][% UNLESS loop.last %], [% END %][% END %])[% END %]"
12
[% END %]', ",", "sql", "late_orders");
3
- 

Return to bug 24163