Fix(market): restore "max per merchant" click in send-resources tab

The marketplace send tab (17.tpl) was refactored with an empty <script>
block, which dropped the `haendler` (available merchants) and `carry`
(per-merchant capacity) globals that add_res()/upd_res() in unx.js rely on.
Without them `ic = haendler * carry` evaluates to NaN, so clicking the
"(capacity)" link next to a resource (or the resource icon) no longer fills
the input. Restore the two globals so the max-per-merchant fill works again.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Ferywir
2026-06-15 12:34:28 +02:00
committed by Catalin Novgorodschi
parent a2f5cfdbac
commit 6edd4cc4a9
+3 -1
View File
@@ -69,7 +69,9 @@ if (isset($_GET['z'])) {
<?php include("17_menu.tpl");?>
<script language="JavaScript">
// Globals used by add_res()/upd_res() in unx.js for the "max per merchant" click.
var haendler = <?php echo $merchantAvail; ?>;
var carry = <?php echo $maxcarry; ?>;
</script>
<?php if ($showConfirm && $target):?>