public function saveMultipleService($values)
 {
     $newMultipleService = new Act();
     $newMultipleService->setDesignation($values['designation']);
     $newMultipleService->setShortenedDesignation($values['shortened_designation']);
     $newMultipleService->setComment($values['comment']);
     $newMultipleService->setQuantity($values['quantity']);
     $newMultipleService->setUnityId($values['unity_id']);
     $newMultipleService->setMonetaryAccount($values['monetary_account']);
     $newMultipleService->setActTypeId($values['act_type_id']);
     $newMultipleService->setDisabled(0);
     $newMultipleService->save();
     ActTable::createActPrice($newMultipleService->id);
 }
Beispiel #2
0
</td>
            </tr>
        <?php 
    }
    ?>
            
        </tbody>
    </table>
    </form>
    <br />
    <?php 
    $person_form = generate_formarray('person', 'view');
    $act_form = generate_formarray('act', 'view');
    $inv_form = generate_formarray('involvement', 'view');
    $person = new Person();
    $act = new Act();
    $inv = new Involvement();
    //travers through
    foreach ($vp_list as $key => $record) {
        echo '<br /><h3>' . _t('ACT_') . ++$key . ' : ' . get_mt_term($record['type_of_act']) . '</h3><br />';
        //print victim details
        echo '<h4>' . _t('VICTIM') . ' : ' . $record['vname'] . '</h4><br />';
        $person->LoadFromRecordNumber($record['victim_record_number']);
        $person->LoadRelationships();
        popuate_formArray($person_form, $person);
        shn_form_get_html_labels($person_form, false);
        echo "<br class='page_break' />";
        //print act details
        echo '<h4>' . _t('ACT_DETAILS') . ' : ' . get_mt_term($record['type_of_act']) . '</h4><br />';
        $act->LoadFromRecordNumber($record['act_record_number']);
        $act->LoadRelationships();
 public function act_delete_act()
 {
     if (isset($_POST['no'])) {
         set_redirect_header('events', 'vp_list');
         return;
     }
     if ($_GET['act_id']) {
         $act_ids = array($_GET['act_id']);
     } else {
         $act_ids = $_POST['acts'];
     }
     $this->act_ids = $act_ids;
     $this->del_confirm = true;
     if (isset($_POST['yes'])) {
         if (isset($_POST['act'])) {
             array_push($act_ids, $_POST['act']);
         } else {
             if (isset($_POST['inv'])) {
                 array_push($_POST['invs'], $_POST['inv']);
             }
         }
         //if multiplt events are selected
         if (is_array($act_ids)) {
             foreach ($act_ids as $act) {
                 $c = new Act();
                 $c->DeleteFromRecordNumber($act);
             }
         } else {
             if (is_array($_POST['invs'])) {
                 foreach ($_POST['invs'] as $inv) {
                     $i = new Involvement();
                     $i->DeleteFromRecordNumber($inv);
                 }
             }
         }
         set_redirect_header('events', 'vp_list');
         return;
     }
     if (isset($act_ids)) {
         $this->vp_list = Browse::getVpListArray($act_ids);
     } else {
         if (isset($_POST['invs'])) {
             $this->vp_list = Browse::getVpListInvArray($_POST['invs']);
         }
     }
 }