CREATE 5368 function first(fn){return all.find(function(b){return !b.classList.contains('tw-hidden')&&!b.classList.contains('hide')&&fn(b);});} 5369 var wanted=[ 5370 first(function(b){return b.getAttribute('data-pay_method')==='suspend';}), 5371 first(function(b){return b.id==='pos-unpaid-invoice';}), 5372 first(function(b){return b.getAttribute('data-pay_method')==='cash';}), 5373 first(function(b){return b.id==='pos-finalize';}), 5374 first(function(b){return b.id==='pos-cancel'||b.id==='pos-delete';}), 5375 first(function(b){return b.getAttribute('data-pay_method')==='card';}), 5376 first(function(b){return b.getAttribute('data-pay_method')==='credit_sale';}), 5377 first(function(b){return b.id==='pos-draft';}), 5378 first(function(b){return b.id==='pos-quotation';}) 5379 ].filter(Boolean); 5380 var panel=document.createElement('div');panel.className='codex-mobile-dock'; 5381 var totalRow=document.createElement('div');totalRow.className='codex-mobile-total'; 5382 var buttons=document.createElement('div');buttons.className='codex-mobile-buttons'; 5383 if(total)totalRow.appendChild(total); 5384 wanted.forEach(function(b){buttons.appendChild(b);}); 5385 panel.appendChild(totalRow);panel.appendChild(buttons);dock.appendChild(panel); 5386 dock.classList.add('codex-mobile-ready'); 5387 } 5388 if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',function(){setTimeout(init,0);});else setTimeout(init,0); 5389 })(); 5390 5391 5392 p EDIT 5404 function first(fn){return all.find(function(b){return !b.classList.contains('tw-hidden')&&!b.classList.contains('hide')&&fn(b);});} 5405 var wanted=[ 5406 first(function(b){return b.getAttribute('data-pay_method')==='suspend';}), 5407 first(function(b){return b.id==='pos-unpaid-invoice';}), 5408 first(function(b){return b.getAttribute('data-pay_method')==='cash';}), 5409 first(function(b){return b.id==='pos-finalize';}), 5410 first(function(b){return b.id==='pos-cancel'||b.id==='pos-delete';}), 5411 first(function(b){return b.getAttribute('data-pay_method')==='card';}), 5412 first(function(b){return b.getAttribute('data-pay_method')==='credit_sale';}), 5413 first(function(b){return b.id==='pos-draft';}), 5414 first(function(b){return b.id==='pos-quotation';}) 5415 ].filter(Boolean); 5416 var panel=document.createElement('div');panel.className='codex-mobile-dock'; 5417 var totalRow=document.createElement('div');totalRow.className='codex-mobile-total'; 5418 var buttons=document.createElement('div');buttons.className='codex-mobile-buttons'; 5419 if(total)totalRow.appendChild(total); 5420 wanted.forEach(function(b){buttons.appendChild(b);}); 5421 panel.appendChild(totalRow);panel.appendChild(buttons);dock.appendChild(panel); 5422 dock.classList.add('codex-mobile-ready'); 5423 } 5424 if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',function(){setTimeout(init,0);});else setTimeout(init,0); 5425 })(); 5426 5427 5428 p