forked from brmlab/brmbar-github
uncommitted changes from other people... again
This commit is contained in:
parent
6749b2c97a
commit
e04d614e15
5 changed files with 32 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
.*.sw?
|
||||
*~
|
||||
|
|
8
brmbar3/USEFUL.txt
Normal file
8
brmbar3/USEFUL.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
Accounts with multiple barcodes:
|
||||
|
||||
SELECT accounts.name,barcodes.account,barcodes.barcode
|
||||
FROM "barcodes"
|
||||
join accounts on accounts.id = barcodes.account
|
||||
where barcodes.account in (select a from (select count(*) as c, account as a from barcodes group by account) as dt where c > 1)
|
||||
ORDER BY "account" DESC
|
||||
|
|
@ -100,8 +100,17 @@ Item {
|
|||
}
|
||||
|
||||
function chargeCredit() {
|
||||
var balance = shop.chargeCredit(amount, userdbid)
|
||||
status_text.setStatus("Charged! "+username+"'s credit is "+balance+".", "#ffff7c")
|
||||
var balance=0
|
||||
if (!isNaN(amount)) {
|
||||
if(amount>=0) {
|
||||
balance = shop.chargeCredit(amount, userdbid)
|
||||
status_text.setStatus("Charged "+amount+"! "+username+"'s credit is "+balance+".", "#ffff7c")
|
||||
} else {
|
||||
balance = shop.withdrawCredit((amount*(-1)), userdbid)
|
||||
status_text.setStatus("Withdrawn "+amount+"! "+username+"'s credit is "+balance+".", "#ffff7c")
|
||||
}
|
||||
}
|
||||
loadPage("MainPage")
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,8 +100,17 @@ Item {
|
|||
}
|
||||
|
||||
function withdrawCredit() {
|
||||
var balance = shop.withdrawCredit(amount, userdbid)
|
||||
status_text.setStatus("Withdrawn! "+username+"'s credit is "+balance+".", "#ffff7c")
|
||||
var balance=0
|
||||
if (!isNaN(amount)) {
|
||||
amount=(amount*1)
|
||||
if(amount>=0) {
|
||||
balance = shop.withdrawCredit(amount, userdbid)
|
||||
status_text.setStatus("Withdrawn "+amount+"! "+username+"'s credit is "+balance+".", "#ffff7c")
|
||||
} else {
|
||||
balance = shop.chargeCredit((amount*(-1)),userdbid)
|
||||
status_text.setStatus("Charged "+amount+"! "+username+"'s credit is "+balance+".", "#ffff7c")
|
||||
}
|
||||
}
|
||||
loadPage("MainPage")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
p1=`echo -n "brmbar - dluhy: "; echo "SELECT name, crbalance FROM account_balances WHERE acctype = 'debt' AND crbalance < -100 AND name NOT LIKE '%overflow%' AND name NOT LIKE 'sachyo' ORDER BY crbalance ASC" | psql brmbar | tail -n +3 | grep '|' | tr -s " " | sed -e "s/ |/:/g" -e "s/$/;/" | tr -d "\n"`
|
||||
p2=`echo "SELECT sum(crbalance) FROM account_balances WHERE acctype = 'debt' AND crbalance < 0 AND name NOT LIKE '%overflow%' AND name NOT LIKE 'sachyo'" | psql brmbar | tail -n +3 | head -n 1 | tr -s " "`
|
||||
echo "$p1 total$p2 Kc" | ssh -p 110 -i /home/brmlab/.ssh/id_rsa jenda@coralmyn.hrach.eu
|
||||
echo "$p1 total$p2 Kc. https://www.elektro-obojky.cz/" | ssh -p 110 -i /home/brmlab/.ssh/id_rsa jenda@coralmyn.hrach.eu
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue