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

(-)a/C4/Letters.pm (+14 lines)
Lines 846-851 sub _parseletter_sth { Link Here
846
    ($table eq 'aqorders'     )    ? "SELECT * FROM $table WHERE    ordernumber = ?"                                  :
846
    ($table eq 'aqorders'     )    ? "SELECT * FROM $table WHERE    ordernumber = ?"                                  :
847
    ($table eq 'opac_news'    )    ? "SELECT * FROM $table WHERE          idnew = ?"                                  :
847
    ($table eq 'opac_news'    )    ? "SELECT * FROM $table WHERE          idnew = ?"                                  :
848
    ($table eq 'article_requests') ? "SELECT * FROM $table WHERE             id = ?"                                  :
848
    ($table eq 'article_requests') ? "SELECT * FROM $table WHERE             id = ?"                                  :
849
    ($table eq 'account_offsets')  ? "SELECT * FROM $table WHERE             id = ?"                                  :
850
    ($table eq 'accountlines')     ? "SELECT * FROM $table WHERE accountlines_id = ?"                                 :
849
    ($table eq 'borrower_modifications') ? "SELECT * FROM $table WHERE verification_token = ?" :
851
    ($table eq 'borrower_modifications') ? "SELECT * FROM $table WHERE verification_token = ?" :
850
    ($table eq 'subscription') ? "SELECT * FROM $table WHERE subscriptionid = ?" :
852
    ($table eq 'subscription') ? "SELECT * FROM $table WHERE subscriptionid = ?" :
851
    ($table eq 'serial') ? "SELECT * FROM $table WHERE serialid = ?" :
853
    ($table eq 'serial') ? "SELECT * FROM $table WHERE serialid = ?" :
Lines 1582-1587 sub _get_tt_params { Link Here
1582
            plural   => 'patron_modifications',
1584
            plural   => 'patron_modifications',
1583
            fk       => 'verification_token',
1585
            fk       => 'verification_token',
1584
        },
1586
        },
1587
        account_offsets => {
1588
            module   => 'Koha::Account::Offsets',
1589
            singular => 'account_offset',
1590
            plural   => 'account_offsets',
1591
            pk       => 'id',
1592
        },
1593
        accountlines => {
1594
            module   => 'Koha::Account::Lines',
1595
            singular => 'accountline',
1596
            plural   => 'accountlines',
1597
            pk       => 'accountlines_id',
1598
        },
1585
    };
1599
    };
1586
1600
1587
    foreach my $table ( keys %$tables ) {
1601
    foreach my $table ( keys %$tables ) {
(-)a/Koha/Account.pm (-5 / +9 lines)
Lines 268-279 sub pay { Link Here
268
            letter_code            => uc("ACCOUNT_$type"),
268
            letter_code            => uc("ACCOUNT_$type"),
269
            message_transport_type => 'email',
269
            message_transport_type => 'email',
270
            lang    => Koha::Patrons->find( $self->{patron_id} )->lang,
270
            lang    => Koha::Patrons->find( $self->{patron_id} )->lang,
271
            objects => {
271
            tables => {
272
                patron  => scalar Koha::Patrons->find( $self->{patron_id} ),
272
                borrowers       => $self->{patron_id},
273
                library => scalar Koha::Libraries->find( $self->{library_id} ),
273
                branches        => $self->{library_id},
274
                offsets => \@account_offsets,
275
                credit  => $payment,
276
            },
274
            },
275
            substitute => {
276
                credit => $payment,
277
            },
278
            loops => {
279
                account_offsets => [ map { $_->id } @account_offsets ],
280
            }
277
          )
281
          )
278
      )
282
      )
279
    {
283
    {
(-)a/installer/data/mysql/en/mandatory/sample_notices.sql (-3 / +2 lines)
Lines 178-182 INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title` Link Here
178
178
179
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`)
179
INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`)
180
    VALUES
180
    VALUES
181
        ('circulation', 'ACCOUNT_PAYMENT', '', 'Account Payment', 0, 'Account Payment', '[%- USE Price -%]\r\nA payment of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis payment affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'),
181
        ('circulation', 'ACCOUNT_PAYMENT', '', 'Account Payment', 0, 'Account Payment', '[%- USE Price -%]\r\nA payment of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis payment affected the following fees:\r\n[%- FOREACH o IN account_offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'),
182
            ('circulation', 'ACCOUNT_WRITEOFF', '', 'Account Writeoff', 0, 'Account Writeoff', '[%- USE Price -%]\r\nAn account writeoff of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis writeoff affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default');
182
            ('circulation', 'ACCOUNT_WRITEOFF', '', 'Account Writeoff', 0, 'Account Writeoff', '[%- USE Price -%]\r\nAn account writeoff of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis writeoff affected the following fees:\r\n[%- FOREACH o IN account_offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default');
183
- 

Return to bug 19191