Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e07e9534

Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt

  • ID e07e9534d0c611913e31bc620c65e46701e5f000
  • Vorgänger 9a795b85
  • Nachfolger 9d679693

Mehr Codeteile entfernt, die zur Vorbereitung von Mehrlagerfähigkeit in SQL-Ledger gedient haben und nie benutzt wurden.

Unterschiede anzeigen:

bin/mozilla/am.pl
3238 3238
  $lxdebug->leave_sub();
3239 3239
}
3240 3240

  
3241
sub add_warehouse {
3242
  $lxdebug->enter_sub();
3243

  
3244
  $form->{title} = "Add";
3245

  
3246
  $form->{callback} =
3247
    "$form->{script}?action=add_warehouse&path=$form->{path}&login=$form->{login}&password=$form->{password}"
3248
    unless $form->{callback};
3249

  
3250
  &warehouse_header;
3251
  &form_footer;
3252

  
3253
  $lxdebug->leave_sub();
3254
}
3255

  
3256
sub edit_warehouse {
3257
  $lxdebug->enter_sub();
3258

  
3259
  $form->{title} = "Edit";
3260

  
3261
  AM->get_warehouse(\%myconfig, \%$form);
3262

  
3263
  &warehouse_header;
3264
  &form_footer;
3265

  
3266
  $lxdebug->leave_sub();
3267
}
3268

  
3269
sub list_warehouse {
3270
  $lxdebug->enter_sub();
3271

  
3272
  AM->warehouses(\%myconfig, \%$form);
3273

  
3274
  $form->{callback} =
3275
    "$form->{script}?action=list_warehouse&path=$form->{path}&login=$form->{login}&password=$form->{password}";
3276

  
3277
  $callback = $form->escape($form->{callback});
3278

  
3279
  $form->{title} = $locale->text('Warehouses');
3280

  
3281
  @column_index = qw(description);
3282

  
3283
  $column_header{description} =
3284
      qq|<th class=listheading width=100%>|
3285
    . $locale->text('Description')
3286
    . qq|</th>|;
3287

  
3288
  $form->header;
3289

  
3290
  print qq|
3291
<body>
3292

  
3293
<table width=100%>
3294
  <tr>
3295
    <th class=listtop>$form->{title}</th>
3296
  </tr>
3297
  <tr height="5"></tr>
3298
  <tr>
3299
    <td>
3300
      <table width=100%>
3301
        <tr class=listheading>
3302
|;
3303

  
3304
  map { print "$column_header{$_}\n" } @column_index;
3305

  
3306
  print qq|
3307
        </tr>
3308
|;
3309

  
3310
  foreach $ref (@{ $form->{ALL} }) {
3311

  
3312
    $i++;
3313
    $i %= 2;
3314

  
3315
    print qq|
3316
        <tr valign=top class=listrow$i>
3317
|;
3318

  
3319
    $column_data{description} =
3320
      qq|<td><a href=$form->{script}?action=edit_warehouse&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{description}</td>|;
3321

  
3322
    map { print "$column_data{$_}\n" } @column_index;
3323

  
3324
    print qq|
3325
	</tr>
3326
|;
3327
  }
3328

  
3329
  print qq|
3330
      </table>
3331
    </td>
3332
  </tr>
3333
  <tr>
3334
  <td><hr size=3 noshade></td>
3335
  </tr>
3336
</table>
3337

  
3338
<br>
3339
<form method=post action=$form->{script}>
3340

  
3341
<input name=callback type=hidden value="$form->{callback}">
3342

  
3343
<input type=hidden name=type value=warehouse>
3344

  
3345
<input type=hidden name=path value=$form->{path}>
3346
<input type=hidden name=login value=$form->{login}>
3347
<input type=hidden name=password value=$form->{password}>
3348

  
3349
<input class=submit type=submit name=action value="|
3350
    . $locale->text('Add') . qq|">
3351

  
3352
  </form>
3353

  
3354
  </body>
3355
  </html>
3356
|;
3357

  
3358
  $lxdebug->leave_sub();
3359
}
3360

  
3361
sub warehouse_header {
3362
  $lxdebug->enter_sub();
3363

  
3364
  $form->{title} = $locale->text("$form->{title} Warehouse");
3365

  
3366
  # $locale->text('Add Warehouse')
3367
  # $locale->text('Edit Warehouse')
3368

  
3369
  $form->{description} =~ s/\"/&quot;/g;
3370

  
3371
  if (($rows = $form->numtextrows($form->{description}, 60)) > 1) {
3372
    $description =
3373
      qq|<textarea name="description" rows=$rows cols=60 wrap=soft>$form->{description}</textarea>|;
3374
  } else {
3375
    $description =
3376
      qq|<input name=description size=60 value="$form->{description}">|;
3377
  }
3378

  
3379
  $form->header;
3380

  
3381
  print qq|
3382
<body>
3383

  
3384
<form method=post action=$form->{script}>
3385

  
3386
<input type=hidden name=id value=$form->{id}>
3387
<input type=hidden name=type value=warehouse>
3388

  
3389
<table width=100%>
3390
  <tr>
3391
    <th class=listtop colspan=2>$form->{title}</th>
3392
  </tr>
3393
  <tr height="5"></tr>
3394
  <tr>
3395
    <th align=right>| . $locale->text('Description') . qq|</th>
3396
    <td>$description</td>
3397
  </tr>
3398
  <tr>
3399
    <td colspan=2><hr size=3 noshade></td>
3400
  </tr>
3401
</table>
3402
|;
3403

  
3404
  $lxdebug->leave_sub();
3405
}
3406

  
3407
sub save_warehouse {
3408
  $lxdebug->enter_sub();
3409

  
3410
  $form->isblank("description", $locale->text('Description missing!'));
3411
  AM->save_warehouse(\%myconfig, \%$form);
3412
  $form->redirect($locale->text('Warehouse saved!'));
3413

  
3414
  $lxdebug->leave_sub();
3415
}
3416

  
3417
sub delete_warehouse {
3418
  $lxdebug->enter_sub();
3419

  
3420
  AM->delete_warehouse(\%myconfig, \%$form);
3421
  $form->redirect($locale->text('Warehouse deleted!'));
3422

  
3423
  $lxdebug->leave_sub();
3424
}
3425

  
3426 3241
sub continue {
3427 3242
  $lxdebug->enter_sub();
3428 3243

  

Auch abrufbar als: Unified diff