Esempio n. 1
0
//    (at your option) any later version.
//
//    Pastèque is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with Pastèque.  If not, see <http://www.gnu.org/licenses/>.
namespace StockMultilocations;

$message = null;
$error = null;
$srv = new \Pasteque\LocationsService();
if (isset($_POST['delete-location'])) {
    if ($srv->delete($_POST['delete-location'])) {
        $message = \i18n("Changes saved");
    } else {
        $error = \i18n("Unable to delete location. A location cannot be deleted when stock is assigned to it.", PLUGIN_NAME);
    }
}
$locations = $srv->getAll();
?>
<h1><?php 
\pi18n("Locations", PLUGIN_NAME);
?>
</h1>

<?php 
\Pasteque\tpl_msg_box($message, $error);
?>