Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 222c7e21

Von Moritz Bunkus vor fast 18 Jahren hinzugefügt

  • ID 222c7e21002f029efe1e9af5579b8464187a1a53
  • Vorgänger 7f418ee9
  • Nachfolger cfc8ce07

Bei Auftragsbestätigungen und Lieferantenaufträgen ein Feld "Geliefert" eingeführt, das komplett manuell zu setzen ist.

Unterschiede anzeigen:

SL/OE.pm
65 65
  my $query = qq|SELECT o.id, o.ordnumber, o.transdate, o.reqdate,
66 66
                 o.amount, ct.name, o.netamount, o.$form->{vc}_id,
67 67
		 ex.$rate AS exchangerate,
68
		 o.closed, o.quonumber, o.shippingpoint, o.shipvia,
68
		 o.closed, o.delivered, o.quonumber, o.shippingpoint, o.shipvia,
69 69
		 e.name AS employee
70 70
	         FROM oe o
71 71
	         JOIN $form->{vc} ct ON (o.$form->{vc}_id = ct.id)
......
126 126
    $query .= ($form->{open}) ? " AND o.closed = '0'" : " AND o.closed = '1'";
127 127
  }
128 128

  
129
  if (($form->{"notdelivered"} || $form->{"delivered"}) &&
130
      ($form->{"notdelivered"} ne $form->{"delivered"})) {
131
    $query .= $form->{"delivered"} ?
132
      " AND o.delivered " : " AND NOT o.delivered";
133
  }
134

  
129 135
  my $sortorder = join ', ',
130 136
    ("o.id", $form->sort_columns(transdate, $ordnumber, name));
131 137
  $sortorder = $form->{sort} if $form->{sort};
......
460 466
	      intnotes = '$form->{intnotes}',
461 467
	      curr = '$form->{currency}',
462 468
	      closed = '$form->{closed}',
469
	      delivered = '| . ($form->{delivered} ? "t" : "f") . qq|',
463 470
	      proforma = '$form->{proforma}',
464 471
	      quotation = '$quotation',
465 472
	      department_id = $form->{department_id},
......
724 731
		o.curr AS currency, e.name AS employee, o.employee_id,
725 732
		o.$form->{vc}_id, cv.name AS $form->{vc}, o.amount AS invtotal,
726 733
		o.closed, o.reqdate, o.quonumber, o.department_id, o.cusordnumber,
727
		d.description AS department, o.payment_id, o.language_id, o.taxzone_id, o.delivery_customer_id, o.delivery_vendor_id, o.proforma, o.shipto_id
734
		d.description AS department, o.payment_id, o.language_id, o.taxzone_id,
735
                o.delivery_customer_id, o.delivery_vendor_id, o.proforma, o.shipto_id,
736
                o.delivered
728 737
		FROM oe o
729 738
	        JOIN $form->{vc} cv ON (o.$form->{vc}_id = cv.id)
730 739
	        LEFT JOIN employee e ON (o.employee_id = e.id)
bin/mozilla/oe.pl
328 328
sub form_header {
329 329
  $lxdebug->enter_sub();
330 330

  
331
  $checkedopen   = ($form->{closed}) ? ""        : "checked";
332
  $checkedclosed = ($form->{closed}) ? "checked" : "";
331
  my $checkedclosed = $form->{"closed"} ? "checked" : "";
332
  my $checkeddelivered = $form->{"delivered"} ? "checked" : "";
333 333

  
334 334
  map { $form->{$_} =~ s/\"/"/g }
335 335
    qw(ordnumber quonumber shippingpoint shipvia notes intnotes shiptoname
......
380 380
    $openclosed = qq|
381 381
      <tr>
382 382
        <td colspan=2 align=center>
383
	  <table>
384
	    <tr>
385
	      <th nowrap><input name=closed type=radio class=radio value=0 $checkedopen> |
386
      . $locale->text('Open') . qq|</th>
387
	      <th nowrap><input name=closed type=radio class=radio value=1 $checkedclosed> |
388
      . $locale->text('Closed') . qq|</th>
389
	    </tr>
390
	  </table>
391
	</td>
383
          <input name="closed" id="closed" type="checkbox" class="checkbox" value="1" $checkedclosed>
384
          <label for="closed">| . $locale->text('Closed') . qq|</label>
385
|;
386

  
387
    if (($form->{"type"} eq "sales_order") ||
388
        ($form->{"type"} eq "purchase_order")) {
389
      $openclosed .= qq|
390
          <input name="delivered" id="delivered" type="checkbox" class="checkbox" value="1" $checkeddelivered>
391
          <label for="delivered">| . $locale->text('Delivered') . qq|</label>
392
|;
393
    }
394

  
395
    $openclosed .= qq|
396
        </td>
392 397
      </tr>
393 398
|;
394 399
  }
......
1383 1388
|;
1384 1389
  }
1385 1390

  
1391
  my $delivered;
1392
  if (($form->{"type"} eq "sales_order") ||
1393
      ($form->{"type"} eq "purchase_order")) {
1394
    $delivered = qq|
1395
        <tr>
1396
          <td><input name="notdelivered" id="notdelivered" class="checkbox" type="checkbox" value="1" checked>
1397
            <label for="notdelivered">|. $locale->text('Not delivered') . qq|</label></td>
1398
          <td><input name="delivered" id="delivered" class="checkbox" type="checkbox" value="1" checked>
1399
            <label for="delivered">| . $locale->text('Delivered') . qq|</label></td>
1400
        </tr>
1401
|;
1402
  }
1403

  
1386 1404
  # use JavaScript Calendar or not
1387 1405
  $form->{jsscript} = $jscalendar;
1388 1406
  $jsscript = "";
......
1450 1468
          <td colspan=5>
1451 1469
	    <table>
1452 1470
	      $openclosed
1471
        $delivered
1453 1472
	      <tr>
1454 1473
		<td><input name="l_id" class=checkbox type=checkbox value=Y>
1455 1474
		| . $locale->text('ID') . qq|</td>
......
1525 1544

  
1526 1545
  # construct href
1527 1546
  $href =
1528
    "$form->{script}?path=$form->{path}&action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}&$ordnumber=$number&$form->{vc}=$name&department=$department&warehouse=$warehouse";
1547
    "$form->{script}?path=$form->{path}&action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}&notdelivered=$form->{notdelivered}&delivered=$form->{delivered}&$ordnumber=$number&$form->{vc}=$name&department=$department&warehouse=$warehouse";
1529 1548

  
1530 1549
  # construct callback
1531 1550
  $number     = $form->escape($form->{$ordnumber},    1);
......
1534 1553
  $warehouse  = $form->escape($form->{warehouse},     1);
1535 1554

  
1536 1555
  $callback =
1537
    "$form->{script}?path=$form->{path}&action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}&$ordnumber=$number&$form->{vc}=$name&department=$department&warehouse=$warehouse";
1556
    "$form->{script}?path=$form->{path}&action=orders&type=$form->{type}&vc=$form->{vc}&login=$form->{login}&password=$form->{password}&transdatefrom=$form->{transdatefrom}&transdateto=$form->{transdateto}&open=$form->{open}&closed=$form->{closed}&notdelivered=$form->{notdelivered}&delivered=$form->{delivered}&$ordnumber=$number&$form->{vc}=$name&department=$department&warehouse=$warehouse";
1538 1557

  
1539 1558
  @columns =
1540 1559
    $form->sort_columns("transdate", "reqdate",   "id",      "$ordnumber",
1541 1560
                        "name",      "netamount", "tax",     "amount",
1542 1561
                        "curr",      "employee",  "shipvia", "open",
1543
                        "closed");
1562
                        "closed",    "delivered");
1544 1563

  
1545 1564
  $form->{l_open} = $form->{l_closed} = "Y"
1546 1565
    if ($form->{open} && $form->{closed});
1547 1566

  
1567
  $form->{"l_delivered"} = "Y"
1568
    if ($form->{"delivered"} && $form->{"notdelivered"});
1569

  
1548 1570
  foreach $item (@columns) {
1549 1571
    if ($form->{"l_$item"} eq "Y") {
1550 1572
      push @column_index, $item;
......
1630 1652
    qq|<th class=listheading>| . $locale->text('O') . qq|</th>|;
1631 1653
  $column_header{closed} =
1632 1654
    qq|<th class=listheading>| . $locale->text('C') . qq|</th>|;
1655
  $column_header{"delivered"} =
1656
    qq|<th class="listheading">| . $locale->text("Delivered") . qq|</th>|;
1633 1657

  
1634 1658
  $column_header{employee} =
1635 1659
    qq|<th><a class=listheading href=$href&sort=employee>$employee</a></th>|;
......
1757 1781
      $column_data{closed} = "<td>&nbsp;</td>";
1758 1782
      $column_data{open}   = "<td align=center>X</td>";
1759 1783
    }
1784
    $column_data{"delivered"} = "<td>" .
1785
      ($oe->{"delivered"} ? $locale->text("Yes") : $locale->text("No")) .
1786
      "</td>";
1760 1787

  
1761 1788
    $i++;
1762 1789
    $i %= 2;
locale/de/all
317 317
  'Delete'                      => 'L?schen',
318 318
  'Delete Account'              => 'Konto l?schen',
319 319
  'Delete Dataset'              => 'Datenbank l?schen',
320
  'Delivered'                   => 'Geliefert',
320 321
  'Delivery Date'               => 'Lieferdatum',
321 322
  'Department'                  => 'Abteilung',
322 323
  'Department deleted!'         => 'Abteilung gel?scht.',
......
658 659
  'Non-taxable Purchases'       => 'Nicht zu versteuernde Eink?ufe',
659 660
  'Non-taxable Sales'           => 'Nicht zu versteuernde Verk?ufe',
660 661
  'Not Discountable'            => 'Nicht rabattierf?hig',
662
  'Not delivered'               => 'Nicht geliefert',
661 663
  'Notes'                       => 'Bemerkungen',
662 664
  'Nothing entered!'            => 'Es wurde nichts eingegeben.',
663 665
  'Nothing selected!'           => 'Es wurde nichts ausgew?hlt!',
locale/de/oe
63 63
  'Dec'                         => 'Dez',
64 64
  'December'                    => 'Dezember',
65 65
  'Delete'                      => 'L?schen',
66
  'Delivered'                   => 'Geliefert',
66 67
  'Delivery Date'               => 'Lieferdatum',
67 68
  'Department'                  => 'Abteilung',
68 69
  'Description'                 => 'Beschreibung',
......
116 117
  'May '                        => 'Mai',
117 118
  'Message'                     => 'Nachricht',
118 119
  'Name'                        => 'Name',
120
  'No'                          => 'Nein',
119 121
  'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden',
120 122
  'No Vendor was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein H?ndler gefunden',
121 123
  'No employee was found matching the search parameters.' => 'Es wurde kein Angestellter gefunden, auf den die Suchparameter zutreffen.',
122 124
  'No part was found matching the search parameters.' => 'Es wurde kein Artikel gefunden, auf den die Suchparameter zutreffen.',
123 125
  'No project was found matching the search parameters.' => 'Es wurde kein Projekt gefunden, auf das die Suchparameter zutreffen.',
124 126
  'No.'                         => 'Position',
127
  'Not delivered'               => 'Nicht geliefert',
125 128
  'Notes'                       => 'Bemerkungen',
126 129
  'Nothing entered!'            => 'Es wurde nichts eingegeben.',
127 130
  'Nothing to transfer!'        => 'Es gibt nichts zum Umlagern!',
sql/Pg-upgrade2/oe_delivered.sql
1
-- @tag: oe_delivered
2
-- @description: Neues Feld f&uuml;r Status &quot;geliefert&quot; bei Auftragsbest&auml;tigungen und Lieferantenauftr&auml;gen
3
-- @depends: release_2_4_1
4
ALTER TABLE oe ADD COLUMN delivered boolean;
5
ALTER TABLE oe ALTER COLUMN delivered SET DEFAULT 'f';
6
UPDATE oe SET delivered = 'f';

Auch abrufbar als: Unified diff