//salary job editing if (wf_CheckPost(array('editsalaryjobid', 'editsalaryemployeeid', 'editsalaryjobtypeid'))) { $salary->jobEdit($_POST['editsalaryjobid'], $_POST['editsalaryemployeeid'], $_POST['editsalaryjobtypeid'], $_POST['editsalaryfactor'], $_POST['editsalaryoverprice'], $_POST['editsalarynotes']); rcms_redirect($salary::URL_TS . $_GET['edittask']); } //salary job creation if (wf_CheckPost(array('newsalarytaskid', 'newsalaryemployeeid', 'newsalaryjobtypeid'))) { $salary->createSalaryJob($_POST['newsalarytaskid'], $_POST['newsalaryemployeeid'], $_POST['newsalaryjobtypeid'], $_POST['newsalaryfactor'], $_POST['newsalaryoverprice'], $_POST['newsalarynotes']); rcms_redirect($salary::URL_TS . $_GET['edittask']); } } //display task change form ts_TaskChangeForm($_GET['edittask']); //photostorage integration if ($altCfg['PHOTOSTORAGE_ENABLED']) { $photoStorage = new PhotoStorage('TASKMAN', $_GET['edittask']); $photostorageControl = wf_Link('?module=photostorage&scope=TASKMAN&mode=list&itemid=' . $_GET['edittask'], wf_img('skins/photostorage.png') . ' ' . __('Upload images'), false, 'ubButton'); $photostorageControl .= wf_delimiter(); $photosList = $photoStorage->renderImagesRaw(); show_window(__('Photostorage'), $photostorageControl . $photosList); } //additional comments if ($altCfg['ADCOMMENTS_ENABLED']) { $adcomments = new ADcomments('TASKMAN'); show_window(__('Additional comments'), $adcomments->renderComments($_GET['edittask'])); } } } else { show_window(__('Typical problems'), ts_TaskProblemsEditForm()); } } else {
<?php $altCfg = $ubillingConfig->getAlter(); if ($altCfg['PHOTOSTORAGE_ENABLED']) { if (cfr('PHOTOSTORAGE')) { if (wf_CheckGet(array('scope', 'itemid'))) { $photoStorage = new PhotoStorage($_GET['scope'], $_GET['itemid']); //catch ajax webcam upload request if (wf_CheckGet(array('uploadcamphoto'))) { $photoStorage->catchWebcamUpload(); } //catch file upload request if (wf_CheckGet(array('uploadfilephoto'))) { $photoStorage->catchFileUpload(); } //catch file download if (wf_CheckGet(array('download'))) { $photoStorage->catchDownloadImage($_GET['download']); } //catch file deletion event if (wf_CheckGet(array('delete'))) { $photoStorage->catchDeleteImage($_GET['delete']); } //show webcam snapshot form if (wf_CheckGet(array('mode'))) { $modeSet = $_GET['mode']; //webcamera snapshot if ($modeSet == 'cam') { show_window(__('Webcamera snapshot'), $photoStorage->renderWebcamForm(false)); } //webcamera cropped snapshot
/** * Renders itemtype storage availability view * * @param int $itemtypeId * @return string */ public function reportAllStoragesRemainsView($itemtypeId) { $itemtypeId = vf($itemtypeId, 3); $result = ''; $tmpArr = array(); if (isset($this->allItemTypes[$itemtypeId])) { $itemtypeData = $this->allItemTypes[$itemtypeId]; $itemtypeUnit = $this->unitTypes[$itemtypeData['unit']]; $itemtypeName = $this->allItemTypeNames[$itemtypeId]; $cells = wf_TableCell(__('Warehouse item types')); $cells .= wf_TableCell(__('Warehouse storage')); $cells .= wf_TableCell(__('Count')); $cells .= wf_TableCell(__('Actions')); $rows = wf_TableRow($cells, 'row1'); if (!empty($this->allStorages)) { foreach ($this->allStorages as $storageId => $StorageName) { $tmpArr = $this->remainsOnStorage($storageId); if (!empty($tmpArr)) { foreach ($tmpArr as $io => $count) { if ($io == $itemtypeId) { if ($count > 0) { $actLinks = ''; if (cfr('WAREHOUSEOUT')) { $actLinks .= wf_Link(self::URL_ME . '&' . self::URL_OUT . '&storageid=' . $storageId . '&outitemid=' . $itemtypeId, wf_img_sized('skins/whoutcoming_icon.png', '', '10', '10') . ' ' . __('Outcoming')) . ' '; } if (cfr('WAREHOUSERESERVE')) { $actLinks .= wf_Link(self::URL_ME . '&' . self::URL_RESERVE . '&storageid=' . $storageId . '&itemtypeid=' . $itemtypeId, wf_img_sized('skins/whreservation.png', '', '10', '10') . ' ' . __('Reservation')); } $cells = wf_TableCell($itemtypeName); $cells .= wf_TableCell($StorageName); $cells .= wf_TableCell($count . ' ' . $itemtypeUnit); $cells .= wf_TableCell($actLinks); $rows .= wf_TableRow($cells, 'row3'); } } } } } } $result .= wf_TableBody($rows, '100%', 0, 'sortable'); if ($this->altCfg['PHOTOSTORAGE_ENABLED']) { $photoStorage = new PhotoStorage(self::PHOTOSTORAGE_SCOPE, $itemtypeId); $result .= $photoStorage->renderImagesRaw(); } } else { $result = $this->messages->getStyledMessage(__('Something went wrong') . ' EX_WRONG_ITEMTYPE_ID', 'error'); } return $result; }