Lines 84-89
q{UPDATE letter SET content = ? WHERE code = 'ACCOUNT_CREDIT' AND REPLACE(REPLAC
Link Here
|
84 |
); |
84 |
); |
85 |
$sth->execute( $account_credit, $account_credit_old ); |
85 |
$sth->execute( $account_credit, $account_credit_old ); |
86 |
|
86 |
|
|
|
87 |
# replace patron variable with credit.patron |
88 |
$dbh->do("UPDATE letter SET content = REPLACE(content, '[% patron', '[% credit.patron') WHERE code = 'ACCOUNT_CREDIT' "); |
89 |
# replace library variable with credit.library.branchname |
90 |
$dbh->do("UPDATE letter SET content = REPLACE(content, '[% library', '[% credit.library.branchname') WHERE code = 'ACCOUNT_CREDIT' "); |
91 |
# replace offsets variable with credit.offsets |
92 |
$dbh->do("UPDATE letter SET content = REPLACE(content, ' offsets %]', ' credit.offsets %]') WHERE code = 'ACCOUNT_CREDIT' "); |
93 |
# replace change_given variable with change |
94 |
$dbh->do("UPDATE letter SET content = REPLACE(content, '[% change_given', '[% change') WHERE code = 'ACCOUNT_CREDIT' "); |
87 |
|
95 |
|
88 |
# ACCOUNT_DEBIT |
96 |
# ACCOUNT_DEBIT |
89 |
my $account_debit = q{ |
97 |
my $account_debit = q{ |
Lines 170-175
q{UPDATE letter SET content = ? WHERE code = 'ACCOUNT_DEBIT' AND REPLACE(REPLACE
Link Here
|
170 |
); |
178 |
); |
171 |
$sth->execute($account_debit, $account_debit_old); |
179 |
$sth->execute($account_debit, $account_debit_old); |
172 |
|
180 |
|
|
|
181 |
# replace patron variable with debit.patron |
182 |
$dbh->do("UPDATE letter SET content = REPLACE(content, '[% patron', '[% debit.patron') WHERE code = 'ACCOUNT_DEBIT' "); |
183 |
# replace library variable with debit.library.branchname |
184 |
$dbh->do("UPDATE letter SET content = REPLACE(content, '[% library', '[% debit.library.branchname') WHERE code = 'ACCOUNT_DEBIT' "); |
185 |
# replace offsets variable with debit.offsets |
186 |
$dbh->do("UPDATE letter SET content = REPLACE(content, ' offsets %]', ' debit.offsets %]') WHERE code = 'ACCOUNT_DEBIT' "); |
187 |
# replace total variable with debit.patron.account.balance |
188 |
$dbh->do("UPDATE letter SET content = REPLACE(content, '[% total ', '[% debit.patron.account.balance ') WHERE code = 'ACCOUNT_DEBIT' "); |
189 |
# replace totalcredit variable with debit.patron.account.balance <= 0 |
190 |
$dbh->do("UPDATE letter SET content = REPLACE(content, 'totalcredit', 'debit.patron.account.balance <= 0') WHERE code = 'ACCOUNT_DEBIT' "); |
191 |
|
173 |
# RECEIPT |
192 |
# RECEIPT |
174 |
my $receipt = q{ |
193 |
my $receipt = q{ |
175 |
[% PROCESS "accounts.inc" %] |
194 |
[% PROCESS "accounts.inc" %] |
Lines 244-248
q{UPDATE letter SET content = ? WHERE code = 'RECEIPT' AND REPLACE(REPLACE(conte
Link Here
|
244 |
); |
263 |
); |
245 |
$sth->execute($receipt,$receipt_old); |
264 |
$sth->execute($receipt,$receipt_old); |
246 |
|
265 |
|
|
|
266 |
# replace offsets variable with debit.offsets |
267 |
$dbh->do("UPDATE letter SET content = REPLACE(content, ' offsets %]', ' payment.offsets %]') WHERE code = 'RECEIPT' "); |
268 |
# replace collected variable with tendered |
269 |
$dbh->do("UPDATE letter SET content = REPLACE(content, '[% collected', '[% tendered') WHERE code = 'RECEIPT' "); |
270 |
|
247 |
NewVersion( $DBversion, 24381, "Update accounts notices" ); |
271 |
NewVersion( $DBversion, 24381, "Update accounts notices" ); |
248 |
} |
272 |
} |
249 |
- |
|
|