print '<tr><td valign="top" class="fieldrequired">' . $langs->trans("CashDeskThirdPartyForSell") . '</td>'; print '<td colspan="3">'; print $form->select_company(isset($_POST["soc"]) ? $_POST["soc"] : 1, 'soc', 's.client=1 or s.client=3', 1, 1); print '</td></tr>'; print '<tr><td align="center" colspan="4"><input value="' . $langs->trans("CreateCash") . '" type="submit" class="button"></td></tr>'; print '</form>'; print '</table>'; } else { if (($id || $ref) && $action != 'edit') { $cash = new Cash($db); $cash->fetch($id, $ref); /* * Affichage onglets */ // Onglets $head = cash_prepare_head($cash); dol_fiche_head($head, 'cashname', $langs->trans("Cash"), 0, 'barcode'); /* * Confirmation to delete */ if ($action == 'delete') { $ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $cash->id, $langs->trans("DeleteCash"), $langs->trans("ConfirmDeleteCash"), "confirm_delete", '', '', 1); if ($ret == 'html') { print '<br>'; } } print '<table class="border" width="100%">'; // Code print '<tr><td valign="top" width="25%">' . $langs->trans("Code") . '</td>'; print '<td colspan="3">'; print $form->showrefnav($cash, 'ref', '', 1, 'name', 'ref');
$sql .= " GROUP BY dm"; $sql .= " ORDER BY dm"; $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); $i = 0; while ($i < $num) { $row = $db->fetch_row($resql); $encaiss[$row[1]] += $row[0]; $i++; } } else { dol_print_error($db); } // Onglets $head = cash_prepare_head($acct); dol_fiche_head($head, 'annual', $langs->trans("Cash"), 0, 'cashdesk'); $title = $langs->trans("FinancialAccount") . " : " . $acct->label; $lien = $year_start ? "<a href='" . $_SERVER["PHP_SELF"] . "?id=" . $acct->id . "&year_start=" . ($year_start - 1) . "'>" . img_previous() . "</a> " . $langs->trans("Year") . " <a href='" . $_SERVER["PHP_SELF"] . "?id=" . $acct->id . "&year_start=" . ($year_start + 1) . "'>" . img_next() . "</a>" : ""; print '<table class="border" width="100%">'; // Ref print '<tr><td valign="top" width="25%">' . $langs->trans("Code") . '</td>'; print '<td colspan="3">'; if ($id || $ref) { print $acct->code; } else { print $langs->trans("AllAccounts"); } print '</td></tr>'; // Label print '<tr><td valign="top">' . $langs->trans("Name") . '</td>';