forked from unimatrix/web
Expose tax allocations from treasury account management
This commit is contained in:
parent
7bc4121c9f
commit
f21824b268
1 changed files with 1 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ export function mountPostbankAdmin(host,id,{fetcher=fetch}={}){
|
|||
const nav=el('nav',undefined,'pb-ledger-pagination'),previous=el('button','Previous'),next=el('button','Next');previous.type=next.type='button';previous.disabled=page===1;next.disabled=!data.hasMore;previous.onclick=()=>{page--;void load();};next.onclick=()=>{page++;void load();};nav.append(previous,el('span','Page '+page),next);frame.content.append(nav);frame.status.hidden=true;frame.diagnostics.textContent='Central API · Bank administration permission confirmed · '+new Date().toLocaleString('en-GB');
|
||||
}catch(error){if(active)message(error.message);}finally{busy=false;if(active)frame.reloadButton.disabled=false;}}
|
||||
function renderTreasuries(data,canManage,canIssueReserve){
|
||||
if(canManage){const allocations=el('a','Tax Treasury Payments');allocations.href='#bureau/tax-treasury';allocations.className='pb-primary-link';frame.content.append(allocations);}
|
||||
const managed=data.records.filter(a=>!a.system||a.canTransfer),automated=data.records.filter(a=>a.system&&!a.canTransfer),priority=a=>a.name==='Website Bank Treasury'?0:a.name==='In-game Bank Treasury'?1:a.name==='I.D. Taxes'?2:3;
|
||||
managed.sort((a,b)=>priority(a)-priority(b)||a.name.localeCompare(b.name));automated.sort((a,b)=>a.name.localeCompare(b.name));
|
||||
for(const [title,records,type,description]of [['Managed Accounts',managed,'managed','Bank reserves, the combined web/game tax treasury and staff accounts. Manual treasury transfers are limited to the website bank, in-game reserve and tax treasury.'],['System Accounts',automated,'system','Automated service accounts. Federal Imperial Reserve records capital issuance; P&O is a fictitious payroll issuer. Neither can make manual payments here.']]){
|
||||
|
|
|
|||
Loading…
Reference in a new issue

Staff