|
|
@@ -92,6 +92,36 @@ class Route_UrlAction_ProjektyProNetMediaZamZlec extends RouteBase {// TODO: Url
|
|
|
if (1 != V::get('_print', '', $_GET)) UI::dol();
|
|
|
}
|
|
|
|
|
|
+ public function reinstallAction() {
|
|
|
+ UI::gora();
|
|
|
+ try {
|
|
|
+ DB::getPDO()->execSql(" alter table CRM_LISTA_ZASOBOW_ORDERS add INVOICE enum('0','1') NOT NULL DEFAULT '0' ");
|
|
|
+ DB::getPDO()->execSql(" alter table CRM_LISTA_ZASOBOW_ORDERS_HIST add INVOICE varchar(6) NOT NULL DEFAULT 'N/S;' ");
|
|
|
+ } catch (Exception $e) {
|
|
|
+ if (fales !== strpos($e->getMessage(), 'Duplicate column name')) {
|
|
|
+ UI::alert('warning', $e->getMessage());
|
|
|
+ } else {
|
|
|
+ UI::alert('danger', $e->getMessage());
|
|
|
+ DBG::log($e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ DB::getPDO()->execSql(" alter table CRM_LISTA_ZASOBOW_ORDERS add PAYMENT enum('0','1') NOT NULL DEFAULT '0' ");
|
|
|
+ DB::getPDO()->execSql(" alter table CRM_LISTA_ZASOBOW_ORDERS_HIST add PAYMENT varchar(6) NOT NULL DEFAULT 'N/S;' ");
|
|
|
+ } catch (Exception $e) {
|
|
|
+ if (fales !== strpos($e->getMessage(), 'Duplicate column name')) {
|
|
|
+ UI::alert('warning', $e->getMessage());
|
|
|
+ } else {
|
|
|
+ UI::alert('danger', $e->getMessage());
|
|
|
+ DBG::log($e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ UI::alert('info', "Koniec");
|
|
|
+ UI::dol();
|
|
|
+ }
|
|
|
+
|
|
|
public function getWidgetProject() {
|
|
|
$widgetProject = array();
|
|
|
$widgetProject['idTabela'] = 1656;// TODO: idZasob for TABELA Projekty
|