diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 2df6e96e7c2..322caca9ab2 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4761,6 +4761,13 @@ else if ($id > 0 || ! empty($ref)) } } + // POS Ticket + if (! empty($conf->takepos->enabled) && $object->module_source != '') + { + $receipt_url=DOL_URL_ROOT."/takepos/receipt.php"; + print '
'; + } + // Classify paid if ($object->statut == 1 && $object->paye == 0 && $usercanissuepayment && (($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && $resteapayer <= 0) || ($object->type == Facture::TYPE_CREDIT_NOTE && $resteapayer >= 0)) || ($object->type == Facture::TYPE_DEPOSIT && $object->paye == 0 && $object->total_ttc > 0 && $resteapayer == 0 && $usercanissuepayment && empty($discount->id)) diff --git a/htdocs/takepos/class/actions_takepos.class.php b/htdocs/takepos/class/actions_takepos.class.php index 2ed4a27525b..8e35d4a05b0 100644 --- a/htdocs/takepos/class/actions_takepos.class.php +++ b/htdocs/takepos/class/actions_takepos.class.php @@ -94,40 +94,6 @@ class ActionsTakePos } - /** - * Overloading the doActions function : replacing the parent's function with the one below - * - * @param array() $parameters Hook metadatas (context, etc...) - * @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...) - * @param string $action Current action (if set). Generally create or edit or null - * @param HookManager $hookmanager Hook manager propagated to allow calling another hook - * @return int < 0 on error, 0 on success, 1 to replace standard code - */ - public function addMoreActionsButtons($parameters, &$object, &$action, $hookmanager) - { - global $conf, $user, $langs; - - $error = 0; // Error counter - - /* print_r($parameters); print_r($object); echo "action: " . $action; */ - if (in_array($parameters['currentcontext'], array('invoicecard'))) // do something only for the context 'somecontext1' or 'somecontext2' - { - - $receipt_url=DOL_URL_ROOT."/takepos/receipt.php"; - print ''; - } - - if (! $error) { - $this->results = array('myreturn' => 999); - $this->resprints = 'A text to show'; - return 0; // or return 1 to replace standard code - } else { - $this->errors[] = 'Error message'; - return -1; - } - } - - /** * Overloading the addMoreMassActions function : replacing the parent's function with the one below *